Chart one usage metric of an account by day, optionally for one project; returns the daily series with a total and a per-project breakdown. Requires account.billing.read.
Arguments
inputUsageSeriesInput!requiredinput.fromStringinput.toStringinput.granularityStringinput.groupBy[String!]project for resource metrics; credits also supports model, api_key and member.
input.compareStringinput.metricString!requiredcredits, storage, bandwidth or api_calls
input.presetString7d, 30d or 90d. Defaults to 30d.
input.timezoneStringIANA time zone for daily bucket boundaries. Defaults to UTC.
input.projectReferenceStringProject ID or slug that narrows the read to one project of the account
Responses
query UsageSeries($input: UsageSeriesInput!) { usageSeries(input: $input) { scope { kind accountId projectId } groupBy metric label unit summary { value } timeframe { from to granularity timezone bucketCount } series { bucketStart value } projects { projectId projectName projectSlug value } }}{ "data": { "usageSeries": { "scope": { "kind": "string", "accountId": "string", "projectId": "string" }, "groupBy": [ "string" ], "metric": "string", "label": "string", "unit": "string", "summary": { "value": 0 }, "timeframe": { "from": "string", "to": "string", "granularity": "string", "timezone": "string", "bucketCount": 0 }, "series": [ { "bucketStart": "string", "value": 0 } ], "projects": [ { "projectId": "string", "projectName": "string", "projectSlug": "string", "value": 0 } ] } }}The UsageSeries! in data.usageSeries.