usageSeries

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!required

  • input.fromString

  • input.toString

  • input.granularityString

  • input.groupBy[String!]

    project for resource metrics; credits also supports model, api_key and member.

  • input.compareString

  • input.metricString!required

    credits, storage, bandwidth or api_calls

  • input.presetString

    7d, 30d or 90d. Defaults to 30d.

  • input.timezoneString

    IANA time zone for daily bucket boundaries. Defaults to UTC.

  • input.projectReferenceString

    Project 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.