Amberflo · Schema
UsageQueryRequest
Request body for querying usage data
Usage-Based BillingMeteringFinOpsAI Cost ManagementBillingMonetization
Properties
| Name | Type | Description |
|---|---|---|
| meterApiName | string | Name of the meter to query |
| startTimeInSeconds | integer | Query start time in Unix seconds |
| endTimeInSeconds | integer | Query end time in Unix seconds |
| aggregation | string | Aggregation function to apply |
| timeGroupingInterval | string | Time interval for grouping results |
| groupBy | array | Dimensions to group results by |
| customerFilter | array | List of customer IDs to filter by |
| filter | object | Key-value filter for dimension-based filtering |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/amberflo/refs/heads/main/json-schema/metering-usage-query-request-schema.json",
"title": "UsageQueryRequest",
"description": "Request body for querying usage data",
"type": "object",
"properties": {
"meterApiName": {
"type": "string",
"description": "Name of the meter to query",
"example": "api-calls"
},
"startTimeInSeconds": {
"type": "integer",
"description": "Query start time in Unix seconds",
"example": 1718100000
},
"endTimeInSeconds": {
"type": "integer",
"description": "Query end time in Unix seconds",
"example": 1718186400
},
"aggregation": {
"type": "string",
"description": "Aggregation function to apply",
"enum": [
"SUM",
"MAX",
"COUNT"
],
"example": "SUM"
},
"timeGroupingInterval": {
"type": "string",
"description": "Time interval for grouping results",
"enum": [
"HOUR",
"DAY",
"WEEK",
"MONTH"
],
"example": "DAY"
},
"groupBy": {
"type": "array",
"description": "Dimensions to group results by",
"items": {
"type": "string"
},
"example": [
"customerId"
]
},
"customerFilter": {
"type": "array",
"description": "List of customer IDs to filter by",
"items": {
"type": "string"
}
},
"filter": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Key-value filter for dimension-based filtering"
}
},
"required": [
"meterApiName",
"startTimeInSeconds",
"endTimeInSeconds",
"aggregation",
"timeGroupingInterval"
]
}