POST
/databases/mongodbCreate a MongoDB database
Creates a new MongoDB database. Provide the database and environment details in the request body, including the required identifiers server_uuid, project_uuid, environment_name, and environment_uuid. Use mongo_conf to provide MongoDB configuration.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Database configuration for the new MongoDB database. The schema marks server_uuid, project_uuid, environment_name, and environment_uuid as required.
descriptionstringoptional
Description of the database
destination_uuidstringoptional
UUID of the destination if the server has multiple destinations
environment_namestringrequired
Name of the environment. You need to provide at least one of environment_name or environment_uuid.
environment_uuidstringrequired
UUID of the environment. You need to provide at least one of environment_name or environment_uuid.
imagestringoptional
Docker Image of the database
instant_deploybooleanoptional
Instant deploy the database
is_publicbooleanoptional
Is the database public?
limits_cpu_sharesintegeroptional
CPU shares of the database
limits_cpusstringoptional
CPU limit of the database
limits_cpusetstringoptional
CPU set of the database
limits_memorystringoptional
Memory limit of the database
limits_memory_reservationstringoptional
Memory reservation of the database
limits_memory_swapstringoptional
Memory swap limit of the database
limits_memory_swappinessintegeroptional
Memory swappiness of the database
mongo_confstringoptional
MongoDB conf
mongo_initdb_root_usernamestringoptional
MongoDB initdb root username
namestringoptional
Name of the database
project_uuidstringrequired
UUID of the project
public_portintegeroptional
Public port of the database
public_port_timeoutintegeroptional
Public port timeout in seconds (default: 3600)
server_uuidstringrequired
UUID of the server
tagsarray<string>optional
Tags to assign to the database.
200Returns the result of creating or updating the MongoDB database.
400Returned when the request contains an invalid token.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
422Returned when the request fails validation.
errorsobjectoptional
messagestringoptional
Error handling
A 400 is returned for an invalid token, a 401 when the request is unauthenticated, and a 422 when the request fails validation. The schema marks server_uuid, project_uuid, environment_name, and environment_uuid as required; the environment field descriptions say to provide at least one of the two environment identifiers.