OriginChainDB
Database endpoints

Update vector records

Change one vector record by ID, or update matching metadata in a background job.

POST /v1/tenants/{tenant}/vector-indexes/{index}/records/update

Change one record or matching metadataA filtered update runs as background work instead of a single-record write.
  1. Choose ID or filterSelect the intended record or matching record set.
  2. Specify the exact changesChoose metadata merge, removal or replacement deliberately.
  3. Inspect receipt or job progressKeep revision tokens and follow background outcomes.

Before you start

Use your database bearer token.

Connection setup

Use an existing record or a matching filter. For a conditional single-record update, send its revision_token as if_revision_token.

Path parameters

FieldTypeRequired
tenantstringRequired
indexstringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Request body

application/json

Limits and accepted values
  • Exactly one selector: id, or a filter (filter_expr is the native filter expression, filter the legacy metadata filter;
  • send at most one);
  • otherwise 400 exactly_one_selector.
  • By id: metadata_remove holds 1-1,024 unique keys;
  • an unknown id answers 404 record_not_found;
  • a stale if_revision_token answers 409;
  • dry_run: true is refused with 400.
  • By filter: only metadata_merge and/or metadata_remove;
  • an empty filter is refused (400 filter_empty_for_mutation);
  • dry_run: true counts the matches and writes nothing.
  • A filtered job updates at most 100,000 records, then ends limit_reached.
  • One running and 100 retained filtered jobs per namespace;
  • beyond either, 429 job_limit_reached (retryable;
  • details.bound, details.limit).
  • A filtered job needs a key of at least 32 bytes (403 key_scope_insufficient).
  • The job is read at GET .../jobs/{job_id}
  • and stopped at POST .../jobs/{job_id}/cancel.
FieldTypeRequired
dry_runbooleanOptional
filterobjectOptional
filter_exprobjectOptional
idstringOptional
if_revision_tokenstringOptional
metadata_mergeobjectOptional
metadata_removestring[]Optional
Fields in metadata_remove
FieldTypeRequired
metadata_removestringOptional
FieldTypeRequiredDescription
metadata_replaceobjectOptional—
namespacestringRequired—
sparse_valuesobjectOptionalUnique indices in any order, with one value per index.
Fields in sparse_values
FieldTypeRequired
indicesinteger[]Required
Fields in indices
FieldTypeRequired
indicesintegerOptional
FieldTypeRequired
valuesnumber[]Required
Fields in values
FieldTypeRequired
valuesnumberOptional
FieldTypeRequired
text_removestring[]Optional
Fields in text_remove
FieldTypeRequired
text_removestringOptional
FieldTypeRequired
text_setobjectOptional
valuesnumber[]Optional
Fields in values
FieldTypeRequired
valuesnumberOptional

Read the result

For a single ID, inspect its returned receipt and revision token. A filter update starts background work instead; follow the job's progress. Metadata merge, removal and replacement are different operations, so choose only the intended change.

Response statuses

HTTP status reference
StatusWhat to do
200OK
202Accepted
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
409Resolve the conflict before retrying.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd