Hanzo
OpenapiIndex

Delete many documents by primary key in one call

Removes every named document from the caller's own index. The body is the dialect's own: a bare array of primary keys, which may be strings or numbers.

POST /v1/index/indexes/{uid}/documents/delete-batch

Addresshttps://api.hanzo.ai/v1/index/indexes/{uid}/documents/delete-batch
MethodPOST
Operationpost_index_indexes_by_uid_documents_delete-batch
AuthAuthorization: Bearer $HANZO_API_KEY

Removes every named document from the caller's own index. The body is the dialect's own: a bare array of primary keys, which may be strings or numbers. A key that is not there is not an error, so a client reconciling its own corpus can send one list rather than checking each key first.

The tenant is the org minted from the VALIDATED bearer's owner claim, never a client-supplied header. Without a validated principal the answer is 403 carrying the dialect's invalid_api_key body.

The 202 and its enqueued task are DIALECT COMPATIBILITY, not a promise of later work: the documents are already gone when this answers.

Request

2 fields, body application/json.

FieldInTypeRequiredDescription
uidpathstringyes
(body)bodystring[] | number[]yes

Response

StatusBodyMeaning
2XXindexEnqueuedSuccess

2XX body — 5 fields.

FieldInTypeAlwaysDescription
enqueuedAtbodystringEnqueuedAt is when the task was recorded, RFC 3339 — which is also when it completed.
indexUidbodystringIndexUID names the index the write landed in.
statusbodystringStatus is always enqueued, for dialect compatibility.
taskUidbodyintegerTaskUID identifies the task for a client that polls it.
typebodystringType is the dialect's name for the kind of write: indexCreation, indexDeletion, settingsUpdate, documentAdditionOrUpdate, documentDeletion.

Failure carries the platform error shape — see Errors.

Examples

hanzo index indexes documents delete-batch <uid>

Index API · All Hanzo APIs · Interactive reference

How is this guide?

On this page