For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Cluster Logs

Retrieves MongoDB logs based on the given parameters.

get
Authorizations
AuthorizationstringRequired

For 'Basic' authentication, take your credentials by first combining the username and password with a colon (username:password) and then encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Example Request Header

Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl

More details: https://en.wikipedia.org/wiki/Basic_access_authentication

Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Query parameters
startstring · date-timeOptional

The start time for the query in 'RFC3339' format. Must not be more than 30 days ago but, before the end parameter. The default is 30 days ago.

endstring · date-timeOptional

The end time for the query in 'RFC3339' format. Must not be greater than now. The default is the current timestamp.

directionstring · enumOptional

The direction in which to scan through the logs. The logs are returned in order of the direction.

Default: BACKWARDPossible values:
limitinteger · min: 1 · max: 5000Optional

The maximal number of log lines to return. If the maximum limit is reached, then log lines will be cut at the end, depending on which direction MongoDB is scanning the log.

Default: 100
Responses
200

Successful operation.

application/json

The logs of the MongoDB cluster.

get/clusters/{clusterId}/logs
GET /databases/mongodb/clusters/{clusterId}/logs HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "instances": [
    {
      "name": "mongodb-cluster-0",
      "messages": [
        {
          "time": "2021-09-06T10:00:38.253+02:00",
          "message": "Hello World"
        }
      ]
    }
  ]
}

Last updated

Was this helpful?