Indexes
The Indexes routes of the REST API, with an example of each.
Operations
Shows the classic and search indexes of a collection, creates new ones and drops the ones that are not needed.
GET /v1/databases/{db}/collections/{coll}/indexes
Equivalent to MongoDB's listIndexes command.
| Path parameters | dbcoll |
| Body | None |
| Responses | 200, default |
Shell
curl https://<node>:27080/v1/databases/{db}/collections/{coll}/indexes \
-H "Authorization: Bearer $TESELADB_API_KEY"POST /v1/databases/{db}/collections/{coll}/indexes
Equivalent to MongoDB's createIndexes command.
| Path parameters | dbcoll |
| Body | JSON, canonical Extended JSON or BSON |
| Responses | 200, default |
Shell
curl -X POST https://<node>:27080/v1/databases/{db}/collections/{coll}/indexes \
-H "Authorization: Bearer $TESELADB_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'DELETE /v1/databases/{db}/collections/{coll}/indexes/{name}
Equivalent to MongoDB's dropIndexes command.
| Path parameters | dbcollname |
| Body | None |
| Responses | 200, default |
Shell
curl -X DELETE https://<node>:27080/v1/databases/{db}/collections/{coll}/indexes/{name} \
-H "Authorization: Bearer $TESELADB_API_KEY"GET /v1/databases/{db}/collections/{coll}/searchIndexes
Equivalent to MongoDB's aggregate command.
| Path parameters | dbcoll |
| Body | None |
| Responses | 200, default |
Shell
curl https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes \
-H "Authorization: Bearer $TESELADB_API_KEY"POST /v1/databases/{db}/collections/{coll}/searchIndexes
Equivalent to MongoDB's createSearchIndexes command.
| Path parameters | dbcoll |
| Body | JSON, canonical Extended JSON or BSON |
| Responses | 200, default |
Shell
curl -X POST https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes \
-H "Authorization: Bearer $TESELADB_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'GET /v1/databases/{db}/collections/{coll}/searchIndexes/{name}
Equivalent to MongoDB's aggregate command.
| Path parameters | dbcollname |
| Body | None |
| Responses | 200, default |
Shell
curl https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes/{name} \
-H "Authorization: Bearer $TESELADB_API_KEY"PATCH /v1/databases/{db}/collections/{coll}/searchIndexes/{name}
Equivalent to MongoDB's updateSearchIndex command.
| Path parameters | dbcollname |
| Body | JSON, canonical Extended JSON or BSON |
| Responses | 200, default |
Shell
curl -X PATCH https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes/{name} \
-H "Authorization: Bearer $TESELADB_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'DELETE /v1/databases/{db}/collections/{coll}/searchIndexes/{name}
Equivalent to MongoDB's dropSearchIndex command.
| Path parameters | dbcollname |
| Body | None |
| Responses | 200, default |
Shell
curl -X DELETE https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes/{name} \
-H "Authorization: Bearer $TESELADB_API_KEY"