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 parameters | db |
| Body | JSON, canonical Extended JSON or BSON |
| Responses | 200, 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 parameters | id |
| Body | None |
| Responses | 200, 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 parameters | id |
| Body | None |
| Responses | 200, 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 parameters | None |
| Body | JSON, canonical Extended JSON or BSON |
| Responses | 200, 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 parameters | None |
| Body | None |
| Responses | 200, default |
Shell
curl https://<node>:27080/v1/openapi.json \
-H "Authorization: Bearer $TESELADB_API_KEY"