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": []
}
]
}Required capabilities:
projectsAcl:LIST
Retrieves multiple consumption data items by their IDs.
start and numberOfDatapoints: Returns meter metadata.start and numberOfDatapoints: Returns historical time-series data with averaged values.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": []
}
]
}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.
20230101-alpha 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.
List of metering IDs to retrieve.
1Show child attributes
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 timestamp (inclusive) for historical data, in milliseconds since epoch. Defaults to the current time if not provided.
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.
0 <= x <= 600The 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.
List of metering items with timestamped values. Order matches the request.
Show child attributes
Was this page helpful?