Skip to main content
POST
/
metering
/
meters
/
byids
curl --request POST \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/metering/meters/byids \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'cdf-version: <cdf-version>' \
  --data '
{
  "items": [
    {
      "meterId": "atlas.monthly_ai_tokens"
    },
    {
      "meterId": "files.storage_bytes"
    }
  ]
}
'
{
  "items": [
    {
      "meterId": "atlas.monthly_ai_tokens",
      "datapoints": []
    },
    {
      "meterId": "files.storage_bytes",
      "datapoints": []
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Headers

cdf-version
enum<string>
required
Available options:
20230101-alpha

Body

application/json

Request body for multi-get endpoint.

Note: To protect backend resources, the number of IDs is limited. When requesting historical data, each ID returns numberOfDatapoints data points, so keep the number of IDs reasonable for optimal performance.

items
object[]
required

List of metering IDs to retrieve.

Minimum array length: 1
start
integer<int64>

Start timestamp (inclusive) for historical data, in milliseconds since epoch. When provided along with end and numberOfDatapoints, returns time-series data. If not provided, only the meter metadata is returned.

end
integer<int64>

End timestamp (inclusive) for historical data, in milliseconds since epoch. Defaults to the current time if not provided.

numberOfDatapoints
integer<int32>
default:0

Number of data points to return between start and end. The time range is divided into equal periods to match the number of datapoints requested. If not provided, only the meter metadata is returned.

Required range: 0 <= x <= 600

Response

The requested consumption data. Returns meter metadata unless 'start' and 'numberOfDataPoints' are provided. When they are provided, includes historical time-series data with averaged values.

Response for multi-get endpoint.

items
object[]
required

List of metering items with timestamped values. Order matches the request.

Last modified on April 23, 2026