Data Usage Query Service

Query data usage

Returns billable data usage aggregated into daily or hourly buckets. Supports filtering and grouping by labels listed by the capabilities endpoint.

Requires the following permissions:

  • data-usage:Read
post/dataplan/data-usage/v1/query

Request

  • Base URL: https://api.eu1.coralogix.com/mgmt/openapi/5
  • URL: https://api.eu1.coralogix.com/mgmt/openapi/5/dataplan/data-usage/v1/query
  • Auth: API key in header Authorization

Request body

OR

Example request

{
  "filters": [
    {
      "key": "pillar",
      "values": [
        "logs"
      ]
    }
  ],
  "groupBy": {
    "keys": [
      "feature_id"
    ]
  },
  "hourly": {
    "timeRange": {
      "end": "2026-06-08T00:00:00.000Z",
      "start": "2026-06-01T00:00:00.000Z"
    }
  }
}

Response

Example response

{
  "buckets": [
    {
      "entries": [
        {
          "labels": [
            {
              "key": "feature_id",
              "value": "logs_ingestion"
            }
          ],
          "measurements": [
            {
              "cxQuotaUnits": {
                "value": "1.5"
              }
            }
          ]
        }
      ],
      "range": {
        "end": "2026-06-08T00:00:00.000Z",
        "start": "2026-06-01T00:00:00.000Z"
      }
    }
  ],
  "queryRange": {
    "end": "2026-06-08T00:00:00.000Z",
    "start": "2026-06-01T00:00:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.