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
View JSON Schema on GitHub

JSON Schema

metering-usage-query-request-schema.json Raw ↑
{
  "$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"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/metering-usage-query-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.