API keys

The API keys routes of the REST API, with an example of each.

Operations

Shows the API keys of the user, creates new ones and revokes the ones it no longer uses.

GET /v1/apiKeys

Equivalent to MongoDB's listApiKeys command.

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

POST /v1/apiKeys

Equivalent to MongoDB's createApiKey command.

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

DELETE /v1/apiKeys/{id}

Equivalent to MongoDB's revokeApiKey command.

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

See also