Writes

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

Operations

Writes documents with any MongoDB operation, one by one or in batches with bulkWrite.

POST /v1/databases/{db}/collections/{coll}/insertOne

Equivalent to MongoDB's insert command.

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

POST /v1/databases/{db}/collections/{coll}/insertMany

Equivalent to MongoDB's insert command.

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

POST /v1/databases/{db}/collections/{coll}/updateOne

Equivalent to MongoDB's update command.

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

POST /v1/databases/{db}/collections/{coll}/updateMany

Equivalent to MongoDB's update command.

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

POST /v1/databases/{db}/collections/{coll}/replaceOne

Equivalent to MongoDB's update command.

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

POST /v1/databases/{db}/collections/{coll}/deleteOne

Equivalent to MongoDB's delete command.

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

POST /v1/databases/{db}/collections/{coll}/deleteMany

Equivalent to MongoDB's delete command.

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

POST /v1/databases/{db}/collections/{coll}/findOneAndUpdate

Equivalent to MongoDB's findAndModify command.

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

POST /v1/databases/{db}/collections/{coll}/findOneAndReplace

Equivalent to MongoDB's findAndModify command.

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

POST /v1/databases/{db}/collections/{coll}/findOneAndDelete

Equivalent to MongoDB's findAndModify command.

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

POST /v1/databases/{db}/collections/{coll}/bulkWrite

Equivalent to MongoDB's bulkWrite command.

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

See also