Hanzo
OpenapiIndex

Creates an index.

Creates an index. Registers a named index in the caller's own org and answers the dialect's EnqueuedTask.

POST /v1/index/indexes

Addresshttps://api.hanzo.ai/v1/index/indexes
MethodPOST
Operationpost_index_indexes
AuthAuthorization: Bearer $HANZO_API_KEY

Creates an index.

Registers a named index in the caller's own org and answers the dialect's EnqueuedTask. It is idempotent: creating an index that already exists returns the same receipt and changes nothing, which is what lets a client create on startup without checking first.

primaryKey is optional — the first write establishes one when it is omitted. An index is a ROW here rather than a table, so an unusual uid is stored verbatim instead of being sanitised into a schema name.

The 202 and its enqueued task are DIALECT COMPATIBILITY, not a promise of later work: the write is already applied when this answers. A client that polls waitForTask resolves immediately.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
primaryKeybodystringPrimaryKey is the document field that identifies a row.
uidbodystringUID is the index's name within the org.

Response

StatusBodyMeaning
202indexEnqueuedaccepted

202 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 create

Index API · All Hanzo APIs · Interactive reference

How is this guide?

On this page