/indexes route allows you to create, manage, and delete your indexes.
Learn more about indexes.
Index object
List all indexes
GET
/indexes
offset and limit query parameters.
Query parameters
Response
Example
Response: 200 Ok
Get one index
GET
/indexes/{index_uid}
Path parameters
Example
Response: 200 Ok
Create an index
POST
/indexes
Body
Example
Response: 202 Accepted
taskUid to track the status of your request.
Update an index
PATCH
/indexes/{index_uid}
Path parameters
Body
Example
Response: 202 Accepted
taskUid to track the status of your request.
Delete an index
DELETE
/indexes/{index_uid}
Path parameters
Example
Response: 202 Accepted
taskUid to track the status of your request.
Swap indexes
POST
/swap-indexes
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.
Body
An array of objects with the following fields:
Each
indexes array must contain only two elements: the indexUids of the two indexes to be swapped. Sending an empty array ([]) is valid, but no swap operation will be performed.
Use rename: false if you are swapping two existing indexes. Use rename: true if the second index in your array does not exist.
Example
Response
Since
indexSwap is a global task, the indexUid is always null.taskUid to track the status of your request.