Skip to content

Data Usage Service API

Coralogix provides an API in support of our Detailed Data Usage Report, which presents you with all data sent, per policy, for either the current month or retroactively 30 or 90 days. The API allows you to query your data consumption in given a time period.

Prerequisites

  • Coralogix Alerts, Rules and Tags AP Key. Access this in your navigation pane by clicking Data Flow > API Keys.

  • Management API Endpoint

Fetch Detailed Data Usage Group by Application and Subsystem Name

grpcurl -H "Authorization: Bearer <YOUR-API-KEY>" -d @ <CORALOGIX-DOMAIN> com.coralogix.datausage.v2.DataUsageService/GetTeamDetailedDataUsage <<EOF
{
  "resolution": "6h",
  "date_range": {
    "from_date": "2023-03-20T01:30:15.01Z",
      "to_date": "2023-03-21T01:30:15.01Z"
  }
}
EOF

Request args

FieldDescription
ResolutionDescribes the precision by which to group your data. In this example, the response contains the data usage per Application and Subsystem every 6h
Team IdID of the team you are seeking
Date RangeDate range of the requested data in ISO 8601 format

Response

The response will be a list of data, such as the following:

[{
  "timestamp": "2023-03-20T16:00:00Z",
  "sizeGb": 0.000011989847,
  "units": 0.000004795939,
  "dimensions": [
    {
      "tier": "TCO_TIER_HIGH"
    },
    {
      "genericDimension": {
        "key": "subsystem_name",
        "value": "vzmgr-server"
      }
    },
    {
      "pillar": "PILLAR_LOGS"
    },
    {
      "severity": "SEVERITY_CRITICAL"
    },
    {
      "genericDimension": {
        "key": "application_name",
        "value": "staging"
      }
    }
  ]
}]
FieldDescriptionFieldDescription
timestampDate of the sample
sizeGbSize in GB of the processed data
unitsAmount in units
dimensionList of dimensions by which data has been groupedgenericDimensionGeneric label of the data. Example: application_name and subsystem_name.
tierData priority label: TCO_TIER_HIGH, TCO_TIER_MEDIUM, TCO_TIER_LOW, TCO_TIER_BLOCKED
pillarPillar information: PILLAR_LOGS, PILLAR_METRICS, PILLAR_SPANS
severitySeverity just for PILLAR_LOGS: SEVERITY_UNSPECIFIED, SEVERITY_DEBUG, SEVERITY_VERBOSE, SEVERITY_INFO, SEVERITY_WARNING,SEVERITY_ERROR,SEVERITY_CRITICAL

Additional Resources

Data Usage

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].