The /indexes route allows you to create, manage, and delete your indexes.
/indexes
route allows you to create, manage, and delete your indexes.
Learn more about indexes.
Name | Type | Default value | Description |
---|---|---|---|
uid | String | N/A | Unique identifier of the index. Once created, it cannot be changed |
createdAt | String | N/A | Creation date of the index, represented in RFC 3339 format. Auto-generated on index creation |
updatedAt | String | N/A | Latest date of index update, represented in RFC 3339 format. Auto-generated on index creation or update |
primaryKey | String / null | null | Primary key of the index. If not specified, Meilisearch guesses your primary key from the first document you add to the index |
offset
and limit
query parameters.
Query parameter | Description | Default value |
---|---|---|
offset | Number of indexes to skip | 0 |
limit | Number of indexes to return | 20 |
Name | Type | Description |
---|---|---|
results | Array | An array of indexes |
offset | Integer | Number of indexes skipped |
limit | Integer | Number of indexes returned |
total | Integer | Total number of indexes |
200 Ok
Name | Type | Description |
---|---|---|
index_uid * | String | uid of the requested index |
200 Ok
Name | Type | Default value | Description |
---|---|---|---|
uid * | String | N/A | uid of the requested index |
primaryKey | String / null | null | Primary key of the requested index |
202 Accepted
taskUid
to track the status of your request.
uid
.Name | Type | Description |
---|---|---|
index_uid * | String | uid of the requested index |
Name | Type | Default value | Description |
---|---|---|---|
primaryKey * | String / null | N/A | Primary key of the requested index |
202 Accepted
taskUid
to track the status of your request.
Name | Type | Description |
---|---|---|
index_uid * | String | uid of the requested index |
202 Accepted
taskUid
to track the status of your request.
indexA
and indexB
will also replace every mention of indexA
by indexB
and vice-versa in the task history. enqueued
tasks are left unmodified.
To learn more about index swapping, refer to this short guide.
indexes
.
Name | Type | Default value | Description |
---|---|---|---|
indexes * | Array of strings | N/A | Array of the two indexUid s to be swapped |
indexes
array must contain only two elements: the indexUid
s of the two indexes to be swapped. Sending an empty array ([]
) is valid, but no swap operation will be performed.
indexSwap
is a global task, the indexUid
is always null
.taskUid
to track the status of your request.