Create an index on a ledger
Changed onRegisters a new index on the ledger. An existing canonical index on this ledger is rejected with INDEX_ALREADY_EXISTS (HTTP 409), even while building or retyping, without changing its definition or progress. Replaying an identical batch with its retained Idempotency-Key returns the original result. The indexbuilder processes the accepted creation. The request body carries the target IndexID in canonical form (see DELETE /v3/{ledgerName}/indexes/{canonicalId} for the format). Requires ledger:WriteLedger scope.
Request
- Base URLhttp://localhost:9000
- URLhttp://localhost:9000/v3/{ledgerName}/indexes
- Auth
- HTTP bearer
- or none
Path parameters
Name of the ledger
Headers
Request body
Example request
{
"id": "metadata:TARGET_TYPE_ACCOUNT:color"
}Response
Index creation queued. The body carries the canonical id of the created index (round-trip normalized), usable directly on the follow-up GET/DELETE /v3/{ledgerName}/indexes/{canonicalId} routes.
Example response
{
"data": {
"id": "metadata:TARGET_TYPE_ACCOUNT:color"
}
}Changes
- info
api operation id
createIndexremoved and replaced withv3CreateIndex
- info
- info
added the media type
text/plainfor the response with the status - info
added the media type
text/plainfor the response with the status - info
added the non-success response with the status
- info