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
- Choose ID or filterSelect the intended record or matching record set.
- Specify the exact changesChoose metadata merge, removal or replacement deliberately.
- Inspect receipt or job progressKeep revision tokens and follow background outcomes.
Before you start
Use your database bearer token.
Use an existing record or a matching filter. For a conditional single-record update, send its revision_token as if_revision_token.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
index | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API 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.
| Field | Type | Required |
|---|---|---|
dry_run | boolean | Optional |
filter | object | Optional |
filter_expr | object | Optional |
id | string | Optional |
if_revision_token | string | Optional |
metadata_merge | object | Optional |
metadata_remove | string[] | Optional |
Fields in metadata_remove
| Field | Type | Required |
|---|---|---|
metadata_remove | string | Optional |
| Field | Type | Required | Description |
|---|---|---|---|
metadata_replace | object | Optional | — |
namespace | string | Required | — |
sparse_values | object | Optional | Unique indices in any order, with one value per index. |
Fields in sparse_values
| Field | Type | Required |
|---|---|---|
indices | integer[] | Required |
Fields in indices
| Field | Type | Required |
|---|---|---|
indices | integer | Optional |
| Field | Type | Required |
|---|---|---|
values | number[] | Required |
Fields in values
| Field | Type | Required |
|---|---|---|
values | number | Optional |
| Field | Type | Required |
|---|---|---|
text_remove | string[] | Optional |
Fields in text_remove
| Field | Type | Required |
|---|---|---|
text_remove | string | Optional |
| Field | Type | Required |
|---|---|---|
text_set | object | Optional |
values | number[] | Optional |
Fields in values
| Field | Type | Required |
|---|---|---|
values | number | Optional |
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
| Status | What to do |
|---|---|
| 200 | OK |
| 202 | Accepted |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 404 | Check the resource ID and API route. |
| 409 | Resolve the conflict before retrying. |
| 413 | Split or reduce the request body. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 501 | Check deployment support for this operation. |
| 503 | Honor Retry-After when present; check write outcomes. |