Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search Indexes

Retrieving all search indexes

get
Preview

Retrieves the search indexes for every searchable type on the tenant: custom schema types, customer, and legal-entity. Each item includes type.

When sort is omitted, indexes are ordered by metadata.createdAt descending. When the X-Total-Count request header is true, the response includes the X-Total-Count header with the number of indexes. The response body stays an array.

Required scopes
This endpoint requires the following scopes:
  • : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1 · max: 2000Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

Comma-separated list of properties used to sort the results. The order of properties indicates their priority.

Possible values:

  • {fieldName}
  • {fieldName}:ASC
  • {fieldName}:DESC

When the direction is omitted, the field is sorted in ascending order. When sort is omitted, results are ordered by metadata.createdAt descending.

Example: name:ASC
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard practises - Query parameter

fieldsstringOptional

Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.

Example: id,name,status
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response.

  • If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
  • If the header is set to *, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
  • If none of the requested languages has a translation, the localized fields are omitted from the response.
X-Total-CountbooleanOptional

Flag indicating whether the total count of retrieved items should be returned.

Default: false
Responses
200

The request succeeded. The body is the current page of indexes.

application/json
get/search/{tenant}/search/indexes
GET /search/{tenant}/search/indexes HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "vehicles",
    "type": "VEHICLE",
    "name": {
      "en": "Vehicles"
    },
    "description": {
      "en": "Search vehicles by name and power"
    },
    "status": "ready",
    "metadata": {
      "version": 1,
      "createdAt": "2026-03-12T10:00:00.000Z",
      "modifiedAt": "2026-03-12T10:00:00.000Z"
    }
  },
  {
    "id": "bikes",
    "type": "BIKE",
    "name": {
      "en": "Bikes"
    },
    "description": {
      "en": "Search bikes by name"
    },
    "status": "ready",
    "metadata": {
      "version": 1,
      "createdAt": "2026-03-13T10:00:00.000Z",
      "modifiedAt": "2026-03-13T10:00:00.000Z"
    }
  }
]

Retrieving search indexes

get
Preview

Retrieves the search indexes for one type.

When sort is omitted, indexes are ordered by metadata.createdAt descending. When the X-Total-Count request header is true, the response includes the X-Total-Count header with the number of indexes. The response body stays an array.

Required scopes
This endpoint requires the following scopes:
  • : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Type of documents to search. Use a custom schema type, customer, or legal-entity.

Example: VEHICLE
Query parameters
pageNumberinteger · min: 1Optional

Page number to be retrieved. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1 · max: 2000Optional

Number of items to be retrieved per page.

Default: 60
sortstringOptional

Comma-separated list of properties used to sort the results. The order of properties indicates their priority.

Possible values:

  • {fieldName}
  • {fieldName}:ASC
  • {fieldName}:DESC

When the direction is omitted, the field is sorted in ascending order. When sort is omitted, results are ordered by metadata.createdAt descending.

Example: name:ASC
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard practises - Query parameter

fieldsstringOptional

Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.

Example: id,name,status
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response.

  • If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
  • If the header is set to *, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
  • If none of the requested languages has a translation, the localized fields are omitted from the response.
X-Total-CountbooleanOptional

Flag indicating whether the total count of retrieved items should be returned.

Default: false
Responses
200

The request succeeded. The body is the current page of indexes.

application/json
get/search/{tenant}/search/{type}/indexes
GET /search/{tenant}/search/{type}/indexes HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "vehicles",
    "type": "VEHICLE",
    "name": {
      "en": "Vehicles"
    },
    "description": {
      "en": "Search vehicles by name and power"
    },
    "status": "ready",
    "metadata": {
      "version": 1,
      "createdAt": "2026-03-12T10:00:00.000Z",
      "modifiedAt": "2026-03-12T10:00:00.000Z"
    }
  }
]

Retrieving a search index

get
Preview

Retrieves one search index.

Required scopes
This endpoint requires the following scopes:
  • : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Type of documents to search. Use a custom schema type, customer, or legal-entity.

Example: VEHICLE
idstringRequired

Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.

Example: vehiclesPattern: ^[\w-]{1,66}$
Query parameters
fieldsstringOptional

Comma-separated list of index properties to return. When the parameter is omitted, the index is returned in full.

Example: id,name,status
Header parameters
Accept-LanguagestringOptional

List of language codes acceptable for the response.

  • If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
  • If the header is set to *, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
  • If none of the requested languages has a translation, the localized fields are omitted from the response.
Responses
200

The index exists.

application/json

A search index.

idstringOptional

Index id.

Example: vehicles
typestringOptional

Type this index belongs to. A custom schema type, customer, or legal-entity.

Example: VEHICLE
statusstring · enumOptional

Build state of the index.

Example: readyPossible values:
get/search/{tenant}/search/{type}/indexes/{id}
GET /search/{tenant}/search/{type}/indexes/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "vehicles",
  "type": "VEHICLE",
  "name": {
    "en": "Vehicles"
  },
  "description": {
    "en": "Search vehicles by name and power"
  },
  "fields": [
    {
      "path": "name.en",
      "text": true,
      "autocomplete": "PREFIX"
    },
    {
      "path": "code",
      "text": true,
      "exact": true
    }
  ],
  "status": "ready",
  "metadata": {
    "version": 1,
    "createdAt": "2026-03-12T10:00:00.000Z",
    "modifiedAt": "2026-03-12T10:00:00.000Z"
  }
}

Upserting a search index

put
Preview

Creates or updates the search index identified by {id} for one type: a custom schema type, customer, or legal-entity. Unknown properties in the body are ignored.

A new index returns 202 Accepted and the id of a job that builds the index. Saving an index whose status is building or failed, or whose field definition changed, also returns 202 Accepted and starts an update job. Analyzers are part of that definition. An index whose status is ready and whose field definition is unchanged returns 204 No Content and does not start a job. name and description can still change in that case. A job that is already in progress for this index returns 409 Conflict.

metadata can be omitted when the index is created and when it is updated. A missing metadata.version still updates an existing index. When metadata.version is sent, it is the optimistic lock: a value that does not match the stored index returns 409 Conflict.

Required scopes
This endpoint requires the following scopes:
  • : Needed to create, update, and delete saved searches and search indexes.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Type of documents to search. Use a custom schema type, customer, or legal-entity.

Example: VEHICLE
idstringRequired

Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.

Example: vehiclesPattern: ^[\w-]{1,66}$
Header parameters
Content-LanguagestringOptional

Language of the localized name and description in the request body. Each language key in those maps must be configured for the tenant.

Example: en
Body

Definition of a search index. Unknown properties are ignored.

idstringOptional

Index id. Optional. When it is present, it must equal the {id} path parameter.

Example: vehicles
Responses
202

The index build has started. The body is the job id.

application/json

Identifier of an index job.

idstringOptional

Job id.

Example: 66f1a2b3c4d5e6f708192a3b
put/search/{tenant}/search/{type}/indexes/{id}
PUT /search/{tenant}/search/{type}/indexes/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 238

{
  "name": {
    "en": "Vehicles"
  },
  "description": {
    "en": "Search vehicles by name and power"
  },
  "fields": [
    {
      "path": "name.en",
      "text": true,
      "autocomplete": "PREFIX"
    },
    {
      "path": "code",
      "text": true,
      "exact": true
    },
    {
      "path": "mixins.brand.horsepower",
      "exact": true
    }
  ]
}
{
  "id": "66f1a2b3c4d5e6f708192a3b"
}

Deleting a search index

delete
Preview

Starts deletion of one search index. The response is the id of the job that removes the index.

Required scopes
This endpoint requires the following scopes:
  • : Needed to create, update, and delete saved searches and search indexes.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
typestringRequired

Type of documents to search. Use a custom schema type, customer, or legal-entity.

Example: VEHICLE
idstringRequired

Index id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.

Example: vehiclesPattern: ^[\w-]{1,66}$
Responses
202

Index deletion has started. The body is the job id.

application/json

Identifier of an index job.

idstringOptional

Job id.

Example: 66f1a2b3c4d5e6f708192a3b
delete/search/{tenant}/search/{type}/indexes/{id}
DELETE /search/{tenant}/search/{type}/indexes/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "66f1a2b3c4d5e6f708192a3c"
}

Last updated

Was this helpful?