Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Query an usage report

Queries usage over any time range, bucketed and grouped: the usage summary the console charts.

This method is not served on the public API. api.sylphx.com does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Queries usage over any time range, bucketed and grouped: the usage summary the console charts. Reads rollups; never raw events.

Not available yet. Sylphx Billing is declared in the registry but no backend serves it: every call answers 501 with the problem code UNIMPLEMENTED.

  • Path POST https://api.sylphx.com/v1/orgs/acme/usage_reports:query
  • Scope billing:read
  • Effect read — nothing is written.
  • Collection usage_reports

#Request

FieldTypeWhat it is
parentstringThe org to query. Required.
start_timetimestampThe start of the range, inclusive. Required.
end_timetimestampThe end of the range, exclusive; at most 400 days after start_time. Required.
granularityUsageGranularityThe bucket width. Required. One of hour, day, period.
projectsstring[]Only these projects; empty means every project.
metersstring[]Only these meter ids; empty means every meter.
group_projectsboolGroup by project in addition to meter.
group_dimensionsstring[]Dimension keys to group by, for example model.

#Response

FieldTypeWhat it is
rowsUsageRow[]One row per bucket and group, in time order; at most 10,000.
completenessdoubleThe share of the range's usage that has reached Billing, from 0 to 1.
compute_timetimestampThe instant the answer reflects.
watermarksmap<string, timestamp>Each emitting service's watermark: the time of the oldest usage it has not yet delivered.

#UsageRow

FieldTypeWhat it is
start_timetimestampThe start of the bucket. Output only.
end_timetimestampThe end of the bucket. Output only.
projectstringThe project, when grouped by project. Output only.
meterstringThe meter id. Output only.
dimensionsmap<string, string>The dimensions grouped on. Output only.
quantityint64The aggregated quantity, in the meter's base unit. Output only.
servicestringThe service that emits the meter. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/usage_reports:query" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_time":{},"granularity":"hour","start_time":{}}'