---
title: Data usage service API
description: 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.
url: https://coralogix.com/docs/developer-portal/apis/data-management/data-usage-service-api/
product: dataplans
feature: Data Usage
feature_id: data-usage
feature_identifier: dataplans/data-usage
last_updated: '2026-11-11'
---

# Data usage service API

Coralogix provides an API in support of our [Detailed Data Usage Report](https://coralogix.com/docs/user-guides/account-management/payment-and-billing/data-usage.md), 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

* To use this API you need to [create](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys.md) a personal or team API key. It’s recommended to use permission presets, as they are automatically updated with all relevant permissions. Alternatively, you can manually add individual permissions.

| Preset    | Action                                                         | Description                                                      |
| --------- | -------------------------------------------------------------- | ---------------------------------------------------------------- |
| DataUsage | data-usage<!-- -->:Read<!-- --><br />data-usage<!-- -->:Manage | Manage Team Data Usage Metrics<br />View Team Data Usage Metrics |

* Choose the
  <!-- -->
  api.:443
  <!-- -->
  endpoint that corresponds to your Coralogix [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain.md) using the domain selector at the top of the page.

## Fetch detailed data usage group by Application and Subsystem name

```
grpcurl -H "Authorization: Bearer <cx_api_key>" -d @ api.eu2.coralogix.com:443 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

| Field      | Description                                                                                                                                                                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Resolution | Describes the precision by which to group your data. In this example, the response contains the data usage per [Application and Subsystem](https://coralogix.com/docs/user-guides/account-management/account-settings/application-and-subsystem-names.md) every 6h |
| Team Id    | ID of the team you are seeking                                                                                                                                                                                                                                     |
| Date Range | Date 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"

      }

    }

  ]

}]
```

| Field     | Description                                       | Field            | Description                                                                                                                                                     |
| --------- | ------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| timestamp | Date of the sample                                |                  |                                                                                                                                                                 |
| sizeGb    | Size in GB of the processed data                  |                  |                                                                                                                                                                 |
| units     | Amount in units                                   |                  |                                                                                                                                                                 |
| dimension | List of dimensions by which data has been grouped | genericDimension | Generic label of the data. Example: application\_name and subsystem\_name.                                                                                      |
|           |                                                   | tier             | Data priority label: TCO\_TIER\_HIGH, TCO\_TIER\_MEDIUM, TCO\_TIER\_LOW, TCO\_TIER\_BLOCKED                                                                     |
|           |                                                   | pillar           | Pillar information: PILLAR\_LOGS, PILLAR\_METRICS, PILLAR\_SPANS                                                                                                |
|           |                                                   | severity         | Severity just for PILLAR\_LOGS: SEVERITY\_UNSPECIFIED, SEVERITY\_DEBUG, SEVERITY\_VERBOSE, SEVERITY\_INFO, SEVERITY\_WARNING,SEVERITY\_ERROR,SEVERITY\_CRITICAL |

## Additional resources

|                     |                                                                                                           |
| ------------------- | --------------------------------------------------------------------------------------------------------- |
| Data Usage          | [Data Usage](https://coralogix.com/docs/user-guides/account-management/payment-and-billing/data-usage.md) |
| Coralogix Endpoints | [Coralogix Endpoints](https://coralogix.com/docs/integrations/coralogix-endpoints.md)                     |
