> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get usage series

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

`usageSeries(input: UsageSeriesInput!): UsageSeries!`

Requires account.billing.read.

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`UsageSeriesInput!`](https://veryfront.com/docs/cloud/graphql/types/usageseriesinput) | Yes |

## Input fields

### input

[`UsageSeriesInput`](https://veryfront.com/docs/cloud/graphql/types/usageseriesinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `metric` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | credits, storage, bandwidth or api\_calls |
| `preset` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | 7d, 30d or 90d. Defaults to 30d. |
| `timezone` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | IANA time zone for daily bucket boundaries. Defaults to UTC. |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Project ID or slug that narrows the read to one project of the account |

## Response

Returns [`UsageSeries!`](https://veryfront.com/docs/cloud/graphql/types/usageseries). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `metric` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `label` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `unit` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Unit of the values, such as credits, calls or bytes |
| `summary` | [`UsageSeriesSummary!`](https://veryfront.com/docs/cloud/graphql/types/usageseriessummary) | |
| `timeframe` | [`UsageTimeframe!`](https://veryfront.com/docs/cloud/graphql/types/usagetimeframe) | |
| `series` | [`[UsageSeriesBucket!]!`](https://veryfront.com/docs/cloud/graphql/types/usageseriesbucket) | |
| `projects` | [`[UsageSeriesProject!]!`](https://veryfront.com/docs/cloud/graphql/types/usageseriesproject) | |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query UsageSeries($input: UsageSeriesInput!) {
  usageSeries(input: $input) {
    label
    metric
    unit
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "metric": "example",
    "projectReference": "00000000-0000-4000-8000-000000000001"
  }
}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.