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 parametersdbcoll
BodyNone
Responses200, 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 parametersdbcoll
BodyJSON, canonical Extended JSON or BSON
Responses200, 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 parametersdbcollname
BodyNone
Responses200, 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 parametersdbcoll
BodyNone
Responses200, 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 parametersdbcoll
BodyJSON, canonical Extended JSON or BSON
Responses200, 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 parametersdbcollname
BodyNone
Responses200, 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 parametersdbcollname
BodyJSON, canonical Extended JSON or BSON
Responses200, 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 parametersdbcollname
BodyNone
Responses200, default
Shell
curl -X DELETE https://<node>:27080/v1/databases/{db}/collections/{coll}/searchIndexes/{name} \
  -H "Authorization: Bearer $TESELADB_API_KEY"

See also