v61

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-018131,3812.6 MB
OpenMeter Features

Query feature cost

Pre-release Endpoint This endpoint is currently in beta and is subject to change.

Query the cost of a feature.

post/v3/openmeter/features/{featureId}/cost/query

Path parameters

featureIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

fromstring date-time

The start of the period the usage is queried from.

tostring date-time

The end of the period the usage is queried to.

granularity'PT1M' | 'PT1H' | 'P1D' | 'P1M'

The size of the time buckets to group the usage into. If not specified, the usage is aggregated over the entire period.

time_zonestring

The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). The time zone is used to determine the start and end of the time buckets. If not specified, the UTC timezone will be used.

group_by_dimensionsstring[]

The dimensions to group the results by.

Example request

{
  "from": "2023-01-01T00:00:00Z",
  "to": "2023-01-02T00:00:00Z",
  "granularity": "P1D",
  "time_zone": "UTC"
}

Response

The request has succeeded.

fromstring date-time

Start of the queried period.

tostring date-time

End of the queried period.

Example response

{
  "from": "2023-01-01T01:01:01.001Z",
  "to": "2023-01-01T01:01:01.001Z",
  "data": [
    {
      "currency": "USD",
      "from": "2023-01-01T01:01:01.001Z",
      "to": "2023-01-01T01:01:01.001Z"
    }
  ]
}