Compose Database-as-a-Service Help and Documentation

Everything you need to know about Compose, Hosted or Enterprise, is here in our help system. Whether you run one database for your businesses' sole application or six different databases to support an entire corporation, we've got the information you need.

Historical Logs

❗️

This is the older REST API and is now deprecated.

Go to the dedicated apidocs.compose.com for details of the current API which works with all Compose databases with the exception of the MongoDB Classic deployments.

Common Parameters

ParamDescription
:accountAn account slug
:deploymentA deployment id or name

GET /deployments/:account/:deployment/historical_logs

Querystring Params

NameTypeDescription
dayDate (ISO 8601)Date of the logs to retrieve.
grepStringElasticsearch-compliant regexp.
searchStringOnly show log entries containing this string.
excludeStringOnly show logs that don’t include this string.
fromIntegerLog entry number to start from. Defaults to 0.
sizeIntegerNumber of log entries to display. Defaults to 50.
from_dateDate (ISO 8601)Query the logs starting from this date.
to_dateDate (ISO 8601)Query the logs ending at this date.
sortStringSort results in asc or desc order.

Request

curl -i -X GET 'https://api.compose.io/deployments/your-account/deployment-1/historical_logs' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: 2014-06' \
-H 'Authorization: Bearer [OAUTH_TOKEN]'

Response

{
  "awesome.deployment.com:10000": {
    logs: [
      {
        ts: "2014-06-16T00:01:34.000Z",
        message: "Mon Jun 16 00:01:33.926 [conn298038] end connection 10.0.0.1:37028 (4 connections now open)"
      },
      // ...
    ],
    total: 1245
  },
  // ...
}

Still Need Help?

If this article didn't solve things, summon a human and get some help!

Updated 11 months ago

Historical Logs


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.