v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
Metadata Indexes API

Create a Metadata Index

Use this endpoint to create a metadata index for a specific entity type. Metadata indexes improve query performance when filtering or searching by custom metadata fields.

post/v1/settings/metadata-indexes/entities/{entity_name}

Path parameters

entity_name'organization' | 'ledger' | 'asset' | 'segment' | 'portfolio' | 'account' | 'transaction' | 'operation' | 'account_type' | 'operation_route' | 'transaction_route' required

The name of the entity for which the metadata index will be created or managed.

Headers

Content-Typestring

The type of media of the resource. Recommended value is application/json.

X-Request-Idstring uuid

A unique identifier used to trace and track each request.

Authorizationstring

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

Request body

metadataKeystring required

The metadata key to be indexed. This key must match the metadata field name used in your entities.

uniqueboolean

Indicates whether the index enforces uniqueness. When set to true, duplicate values for this metadata key will not be allowed.

sparseboolean

Indicates whether the index is sparse. When set to true, only documents containing the indexed field will be included in the index.

Example request

{
  "metadataKey": "tier",
  "sparse": true
}

Response

Indicates that the metadata index was successfully created and the operation was completed as expected.

indexNamestring required

The name of the index in the database.

entityNamestring required

The name of the entity associated with the index.

metadataKeystring required

The metadata key used in the index.

uniqueboolean required

Indicates whether the index enforces uniqueness.

sparseboolean required

Indicates whether the index is sparse (ignores documents without the indexed field).

Example response

{
  "indexName": "metadata.tier_1",
  "entityName": "transaction",
  "metadataKey": "tier",
  "sparse": true
}