List group billing usage in a given period

GET /groups/{groupId}/measurements

List the request, compute, sync, and data transfer usage in a given period for billing purposes.

Path parameters

Query parameters

  • start string

    The ISO 8601 date and time of the start of the query period. Default is 00:00:00 UTC on the first day of the current month.

  • end string

    The ISO 8601 date and time of the end of the query period. Default is 23:59:59 UTC on the last day of the current month.

  • granularity string

    Specifies the granularity of the query period, either P31D (31 day) or PT1H (1 hour). Default is P31D.

    Values are P31D or PT1H.

Responses

  • 200 application/json

    The measurements were successfully returned.

    Hide response attributes Show response attributes object
    • start string

      The RFC 3339 date and time of the start of the query period, which can be specified with the start query parameter.

    • end string

      The RFC 3339 date and time of the end of the query period, which can be specified with the end query parameter.

    • granularity string

      The granularity, which can be specified with the granularity query parameter.

    • group_id string

      The Atlas Group ID.

    • measurements array[object]

      The array of measurements.

      Hide measurements attributes Show measurements attributes object
      • name string

        The usage metric represented by each data point. See billing.

        Values are request_count, compute_time, data_out, or sync_time.

      • units string

        The unit of the value of each data point.

        Values are <empty string>, HOURS, or GIGABYTES.

      • data_points array[object]

        The array of data points for this measurement. A finer granularity results in more data points.

        Hide data_points attributes Show data_points attributes object
        • timestamp string

          The ISO 8601 date and time of the data point.

        • value number

          The value at the time in the unit of the measurement.

  • 400 application/json

    There is an error in the request.

    Hide response attributes Show response attributes object
    • error string

      A message that describes the error.

    • error_code string

      The error type.

GET /groups/{groupId}/measurements
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/measurements' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "start": "string",
  "end": "string",
  "granularity": "string",
  "group_id": "string",
  "measurements": [
    {
      "name": "request_count",
      "units": "<empty string>",
      "data_points": [
        {
          "timestamp": "string",
          "value": 42.0
        }
      ]
    }
  ]
}
Response examples (400)
{
  "error": "string",
  "error_code": "string"
}