Commands, cursors and transactions

The Commands, cursors and transactions routes of the REST API, with an example of each.

Operations

Runs any MongoDB command on a database. It also continues or closes a cursor, commits a transaction and downloads this OpenAPI document.

POST /v1/databases/{db}/command

Equivalent to MongoDB's command command.

Path parametersdb
BodyJSON, canonical Extended JSON or BSON
Responses200, default
Shell
curl -X POST https://<node>:27080/v1/databases/{db}/command \
  -H "Authorization: Bearer $TESELADB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /v1/cursors/{id}

Equivalent to MongoDB's getMore command.

Path parametersid
BodyNone
Responses200, default
Shell
curl https://<node>:27080/v1/cursors/{id} \
  -H "Authorization: Bearer $TESELADB_API_KEY"

DELETE /v1/cursors/{id}

Equivalent to MongoDB's killCursors command.

Path parametersid
BodyNone
Responses200, default
Shell
curl -X DELETE https://<node>:27080/v1/cursors/{id} \
  -H "Authorization: Bearer $TESELADB_API_KEY"

POST /v1/transactions

Equivalent to MongoDB's transaction command.

Path parametersNone
BodyJSON, canonical Extended JSON or BSON
Responses200, default
Shell
curl -X POST https://<node>:27080/v1/transactions \
  -H "Authorization: Bearer $TESELADB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /v1/openapi.json

Equivalent to MongoDB's command.

Path parametersNone
BodyNone
Responses200, default
Shell
curl https://<node>:27080/v1/openapi.json \
  -H "Authorization: Bearer $TESELADB_API_KEY"

See also