Query usage data from Image Processor
Query the Consumption dataset from the GraphiQL Playground for the count of images Image Processor transformed.
Query the total number of images processed by Image Processor from the GraphiQL Playground, using the workloadConsumptionMetrics dataset.
Azion retains this data for up to 24 months, and you can export the results to a third-party platform for further analysis.
Prerequisites
- An Azion account, signed in. The consumption endpoint returns an error to an unauthenticated request.
Query the total images processed
To retrieve the count for a specific time range:
Open the GraphiQL Playground
Access https://api.azion.com/v4/consumption/graphql.
Send the query
Send a query in this format:
GraphQL
Where:
| Field | Description |
|---|---|
filter | Defines the criteria used to filter the data returned by the query. |
tsRange | A subfield of filter. Specifies a time range for filtering data. It includes begin and end fields to define the start and end timestamps. Format: "YYYY-MM-DDTHH:mm:ss"; example: "2024-04-11T00:00:00". |
sum: accounted | As a subfield of aggregate, calculates the total accounted usage for events matching the query’s filters and groups. |
limit | Specifies the maximum number of results to return. System maximum: 10000. |
groupBy | Specifies the fields by which the query results should be grouped. Example: [clientId, metricName]. |
productId | Unique identifier of the product being used. In this case, 1441110021 for Image Processor. |
metricName | Name of the calculated metric for analytics. In this case, images_processed. |
Review the response
JSON
Where:
| Field | Description |
|---|---|
clientId | Client unique identifier on Azion. Example: 8437r. |
workloadId | Identifier for the workload associated with the usage. Example: 4829301746. |
productId | Unique identifier of the product being used. In this case, 1441110021 for Image Processor. |
metricName | Name of the measured metric for analytics. Example: images_processed. |
total | Total number of images processed by Image Processor. This field is the result of a sum. Example: 268675. |
The response returns the total number of images processed for each client and workload in the queried period.
Next steps
- Applications limits - Check the maximum values this usage counts against.
- Image Processor settings - Find the other places this usage data surfaces in Console.
- Consumption GraphQL API Fields - Explore every field the consumption dataset exposes.