Database endpoints
Delete vector records
Delete vector records by ID, by metadata filter, or across a whole namespace.
POST /v1/tenants/{tenant}/vector-indexes/{index}/records/delete
- Choose one deletion scopeUse IDs, a non-empty filter or all records.
- Review the requestFor delete-all, confirmation must match the namespace.
- Inspect counts or job progressA filtered job can continue in the background.
Before you start
Use your database bearer token.
Choose one selector: IDs, a metadata filter, or the whole namespace. The example deletes only v1.
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
- Three forms;
- exactly one of ids, a filter (filter_expr or filter, at most one) or all: true, otherwise 400 exactly_one_selector.
- By ids: ids holds 1-1,000 distinct ids of at most 1,024 bytes (dry_run: true refused with 400).
- By filter: an empty filter is refused (400 filter_empty_for_mutation);
- dry_run: true counts the matches and writes nothing;
- a filtered job deletes at most 1,000,000 records, then ends limit_reached;
- on a namespace holding more than 100,000 records it is refused 501 not_implemented (details.reason = delete_by_filter_namespace_too_large, a provisional bound).
- 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.
- Delete-all: all: true with confirm equal to namespace;
- dry_run: true returns the count without deleting.
| Field | Type | Required |
|---|---|---|
all | boolean | Optional |
confirm | string | Optional |
dry_run | boolean | Optional |
filter | object | Optional |
filter_expr | object | Optional |
ids | string[] | Optional |
Fields in ids
| Field | Type | Required |
|---|---|---|
ids | string | Optional |
| Field | Type | Required |
|---|---|---|
namespace | string | Required |
Read the result
By-ID results report deleted and missing counts. A filtered delete can instead start a job; track that job to learn how much work completed. For delete-all, confirm must match the namespace exactly.
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. |