Upgrade the MongoDB Version

Note: To get the list of all available MongoDB versions, use API.

curl --include \
    --user "[email protected]:Mb2.r5oHf-0t" \
    --header "Content-Type: application/json" \
    https://api.ionos.com/databases/mongodb/versions

To see which MongoDB Versions are supported for your cluster, use the following request:

curl --include \
    --user "[email protected]:Mb2.r5oHf-0t" \
    --header "Content-Type: application/json" \
    https://api.ionos.com/databases/mongodb/clusters/d02de413-d5af-4104-a6f9-3a3c2766ee61/versions

For more information, see API.

To set a new MongoDB major version, send a PATCH request with the target mongoDBVersion.

Endpoint

Use the following endpoint to set a new MongoDB version: https://api.ionos.com/databases/mongodb/clusters/{clusterId}

Note: The sample UUID is d02de413-d5af-4104-a6f9-3a3c2766ee61.

Request

curl --include \
    --request PATCH \
    --user "[email protected]:Mb2.r5oHf-0t" \
    --header "Content-Type: application/json" \
    --data-binary '{
      "properties": {
        "mongoDBVersion": "7.0"
      }
    }'
    https://api.ionos.com/databases/mongodb/clusters/d02de413-d5af-4104-a6f9-3a3c2766ee61

Note:

  • You cannot downgrade mongoDBVersion to a version older than your current version.

  • MongoDB does not allow upgrading more than one version at a time. It is possible to trigger multiple major upgrades after one another sequentially, but it is not recommended.

  • A cluster can only be restored from snapshots created for the same or the previous major version. It can lead to a situation where you can only restore from the last snapshot created directly before the upgrade when performing multiple upgrades in a row. It can lead to a situation where you can only restore from the last snapshot created directly before the upgrade when performing multiple upgrades in a row.

Last updated

Was this helpful?