Retrieve consumption data by its id

Required capabilities: projectsAcl:LIST

Retrieves consumption data by its meterId.

  • Without start and numberOfDatapoints: Returns meter metadata.
  • With start and numberOfDatapoints: Returns historical time-series data with averaged values.
Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
meterId
required
string

Metering is identified by an id containing the service name and a service-scoped metering name.

For instance atlas.monthly_ai_tokens is the id of the atlas service metering monthly_ai_tokens.

Service and metering names are always in lower_snake_case.

query Parameters
start
string <date-time>

Start timestamp (inclusive) for historical data. When provided along with end and numberOfDatapoints, returns time-series data.

end
string <date-time>

End timestamp (inclusive) for historical data. Defaults to the current time if not provided.

numberOfDatapoints
integer <int32> [ 0 .. 600 ]
Default: 0

Number of data points to return between start and end. The time range is divided into equal buckets, and the average value for each bucket is returned.

header Parameters
cdf-version
required
string
Value: "20230101-alpha"
Responses
200

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.

401

The response for a failed request.

get/metering/meters/{meterId}
Request samples
Response samples
application/json
{
  • "meterId": "atlas.monthly_ai_tokens",
  • "datapoints": [
    • {
      }
    ]
}