API

Files vector databases (PATCH /api/vector databases/{name}/files/{fileId})

Files vector databases. This applies only the supplied changes.

PATCH/api/vector-databases/{name}/files/{fileId}
Preview

Files vector databases. This applies only the supplied changes.

Operation ID patchapiVectorDatabasesNameFilesFileId

Operation details

Purpose

Files vector databases. This applies only the supplied changes.

When to use it

Use this when the caller has read the current state and is authorised to change the documented fields or lifecycle state.

When not to use it

Do not use this to create an unrelated resource or bypass a purpose built transition, validation, or permission check operation.

Contract

Availability

Product version
Next Product release
Licence
An active Product licence is required except for health, authentication, and licence remediation operations.
Entitlements
vector.enabled
Service roles
vector
Deployment
customer managed installation
Feature state
preview

Security

Access

Sign in: Use a session cookie or Bearer session token.

Actor
Authenticated Pūnaha actor authorised for the selected tenant and resource
Permission
document.update, documents.manage, documents.update
Resource
document / update / example fileid
Tenant rule
Tenant scoped unless the selected actor is performing an explicitly documented platform action. The x organization id header or authenticated session context selects the tenant. It does not grant access.
Explicit deny
An applicable explicit deny overrides an allow. Knowing or supplying a resource identifier never grants access.

Address, query and header fields

FieldLocationPresenceTypeMeaningLimits and example
x-request-idheaderOptionalstringOptional caller supplied correlation identifier. Pūnaha returns the effective value in the response header.Minimum length: 1. Maximum length: 200. Example: example request 001
fileIdpathRequiredstringThe file id that identifies the resource selected by this operation.Minimum length: 1. Example: example fileid
namepathRequiredstringThe name that identifies the resource selected by this operation.Minimum length: 1. Example: example name

Request body

Content type: application/json. Presence: Required.

Operation request. Every property documents omission, null, sensitivity, source, mutability, availability, access, and lifecycle semantics through JSON Schema and x punaha-* annotations.

Request fields5 documented fields

Request fields

FieldPresenceTypeMeaningEmpty and defaultLimits and exampleAccess, sensitivity and lifecycle
descriptionoptionalstringDocument summary used to explain the source content.Omission retains the description. An empty string clears it. Null is not a documented value. Default: Omission retains the current value. No client default is applied.Example: A fictitious policy used in API examples.Changing this field requires the operation's exact update action. Inherits the operation availability. No special sensitivity is marked. Treat tenant authored text according to the tenant data classification and retention policy. Lifecycle: Next Product release.
titleoptionalstringHuman readable document title used in knowledge results.Omission retains the title. An empty string is ignored. Null is not a documented value. Default: Omission retains the current value. No client default is applied.Minimum length: 1. Example: Example policyChanging this field requires the operation's exact update action. Inherits the operation availability. No special sensitivity is marked. Treat tenant authored text according to the tenant data classification and retention policy. Lifecycle: Next Product release.
tocoptionallist of DomainTOCEntryResponseReplacement table of contents extracted from or assigned to the document.Omission retains the table of contents. An empty array clears it. Null is ignored and should not be sent. Default: Omission retains the current value. No client default is applied.Example: {"level":1,"title":"Introduction"}Changing this field requires the operation's exact update action. Inherits the operation availability. No special sensitivity is marked. Treat tenant authored text according to the tenant data classification and retention policy. Lifecycle: Next Product release.
toc[].levelrequiredinteger in int64 formatThe level associated with this resource or operation.The field is present. Empty strings or collections are valid only when the field constraints and operation rules allow them. Default: No client default is assumed unless a JSON Schema default is present.Example: 1Inherits the operation access rules. Inherits the operation availability unless an operation specific rule says otherwise. No special sensitivity is marked. No special handling is inferred beyond normal tenant access, audit, retention, and data classification controls. Lifecycle: Next Product release.
toc[].titlerequiredstringThe title associated with this resource or operation.The field is present. Empty strings or collections are valid only when the field constraints and operation rules allow them. Default: No client default is assumed unless a JSON Schema default is present.Example: example valueInherits the operation access rules. Inherits the operation availability unless an operation specific rule says otherwise. No special sensitivity is marked. No special handling is inferred beyond normal tenant access, audit, retention, and data classification controls. Lifecycle: Next Product release.
Complete representative request using synthetic data
{
  "description": "A fictitious policy used in API examples.",
  "title": "Example policy",
  "toc": [
    {
      "level": 1,
      "title": "example-value"
    }
  ]
}
Smallest schema valid request
{}

Responses

StatusMeaning and correction boundaryBody
200The operation completed and the response contains the current operation specific representation.application/json, object
400The operation failed with HTTP 400. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
401The operation failed with HTTP 401. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
402The operation failed with HTTP 402. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
403The operation failed with HTTP 403. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
404The operation failed with HTTP 404. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
409The operation failed with HTTP 409. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
423The operation failed with HTTP 423. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
500The operation failed with HTTP 500. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
503The operation failed with HTTP 503. Inspect error.code and error.details, apply the documented correction, and retain x request id.application/json, APIError
200 response fields1 documented field

200 response fields

FieldPresenceTypeMeaningEmpty and defaultLimits and exampleAccess, sensitivity and lifecycle
datarequiredJSON valueA JSON compatible value returned by this operation.The field is present. Empty strings or collections are valid only when the field constraints and operation rules allow them. Default: No client default is assumed unless a JSON Schema default is present.Example: example valueInherits the operation access rules. Inherits the operation availability unless an operation specific rule says otherwise. No special sensitivity is marked. No special handling is inferred beyond normal tenant access, audit, retention, and data classification controls. Lifecycle: Next Product release.
Successful response using synthetic data
{
  "data": "example-value"
}

Effects

Behaviour and other effects

Changes
Validates access and input, then applies the operation specific state change. A failed validation or authorisation check does not intentionally apply the requested change.
Audit events
document.updated
Background work
No background work is inferred. The success response represents completion of the HTTP action.
External effects
No external call is inferred from the route name. Operation specific service behaviour remains authoritative.
Transaction boundary
The HTTP success or error describes the synchronous boundary. Background operations have their own observable lifecycle and may outlive the request.

Operation

Reliability

Idempotent
No
Retry
Do not retry automatically after a timeout or lost response. Read current state first.
Concurrency
Use documented If Match or resource revision fields where exposed. Otherwise read current state before changing it and handle HTTP 409 conflicts.
Consistency
The response reflects the synchronous operation boundary. Background and provider backed state can converge later and must be read through its status operation.
Timeout
Client timeouts do not cancel completed or already started server work unless the operation explicitly supports cancellation.
Request ID
Send or record x request id and retain the returned value for diagnosis.

Errors and corrections

StatusCodeCauseCorrectionRetryablePartial work
400INVALID_REQUEST_BODYThe request body or supplied field values are invalid.Correct the named field or rule in error.details, then submit a new request. Retrying an unchanged request will not help.No unchanged retryNo requested mutation is expected before this failure boundary.
401AUTHENTICATION_REQUIREDA valid authenticated session or supported token is required.Authenticate again using a supported mechanism and confirm that the credential is current.No unchanged retryNo requested mutation is expected before this failure boundary.
402FEATURE_NOT_LICENSEDThe active licence does not include a required entitlement.Use an operation covered by the active entitlement or ask the System Owner to review the signed licence.No unchanged retryNo requested mutation is expected before this failure boundary.
403PERMISSION_REQUIREDThe authenticated actor does not have the exact permission or resource action.Select the correct tenant and resource, then ask an authorised administrator to grant the exact documented action if appropriate.No unchanged retryNo requested mutation is expected before this failure boundary.
404NOT_FOUNDThe selected resource does not exist in the authorised scope.Obtain the identifier from the related list or create operation and confirm the selected tenant.No unchanged retryNo requested mutation is expected before this failure boundary.
409STATE_CONFLICTCurrent resource state or a dependency prevents the requested change.Read current state, resolve the named dependency or lifecycle conflict, and submit a deliberate new request.No unchanged retryThe caller must read current resource or background operation state before retrying because work may have started before the failure became observable.
423LICENCE_REMEDIATION_REQUIREDThe installation is restricted and permits only licence remediation actions.Complete the indicated licence or membership remediation before retrying Product work.No unchanged retryThe caller must read current resource or background operation state before retrying because work may have started before the failure became observable.
500INTERNAL_ERRORPūnaha could not complete the operation because of an unexpected internal failure.Retain x request id and the stable error code, avoid blind retries, and investigate the operation or contact support. Code: INTERNAL_ERROR.No unchanged retryThe caller must read current resource or background operation state before retrying because work may have started before the failure became observable.
503DEPENDENCY_UNAVAILABLEA required node, database, provider, or service is temporarily unavailable.Retain x request id, check health and the named dependency, then retry with bounded backoff when safe.Yes, with the documented safeguardsThe caller must read current resource or background operation state before retrying because work may have started before the failure became observable.

Code examples

Use a supported credential and synthetic data. Do not disable TLS checks or retry a request that changes state blindly.

cURL example
curl --request PATCH "$PUNAHA_URL/api/vector-databases/example-name/files/example-fileid" \
  --header "Authorization: Bearer $PUNAHA_TOKEN" \
  --header "x-request-id: example-request-001" \
  --header "Content-Type: application/json" \
  --data '{"description":"A fictitious policy used in API examples.","title":"Example policy","toc":[{"level":1,"title":"example-value"}]}'

Version history

  • Next Product release: Operation documented from the current registered Go route and handler contract.

Pūnaha Docs

Search the guides

Enter at least two characters.

    Product screen

    View the full screenshot