API How-Tos
The Cloud API lets you manage MongoDB database clusters programmatically by using the conventional HTTP requests. The creation of MongoDB cluster functionality that is available in the IONOS Cloud DCD is also available through the API.
You can also use the Cloud API to perform the following actions: modify cluster attributes, create sharded clusters, enable the BI connector, manage user access to clusters, access logs, migration of databases, and restore a database cluster.
Quick Links
Create a MongoDB Cluster
Learn how to create a MongoDB cluster.
Create a Sharded Database Cluster
Learn how to create a MongoDB sharded cluster.
Modify Cluster Attributes
Learn how to modify a MongoDB cluster attributes.
Enable the BI Connector
Learn how to enable the BI Connector.
Users Management
Learn how to create, view, and delete users using MongoDB clusters.
Access Logs
Learn how to access the logs via the API.
Database Migration
Learn how to migrate your MongoDB data from one cluster to another one.
Restore a Database
Learn how to restore a database cluster.
Connect from Kubernetes
Learn how to connect to a MongoDB cluster from your managed Kubernetes cluster.
DBaaS API - OpenAPI Specification
Endpoint: https://api.ionos.com/databases/mongodb
To make authenticated requests to the API, you need to include a few fields in the request headers. Following are the relevant request parameters and descriptions:
Request parameter headers
Authorization
yes
string
HTTP Basic authorization. A base64 encoded string of a username and password separated by a colon. [email protected]:password
X-Contract-Number
no
integer
Users with more than one contract may apply this header to indicate the applicable contract.
Content-Type
yes
string
Set this to application/json
.
Examples
We use curl
in our examples, as this tool is available on Windows 10, Linux and macOS. Please refer to our blogpost about curl
on Windows if you encounter any problems:
Last updated
Was this helpful?