---
type: api
title: Get the usage charts for the instance of an organization.
description: Retrieves the usage charts for the organization's instance.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-billing/operation/operation-getchartsbyinstancev2
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-billing/operation/operation-getchartsbyinstancev2
products:
  - Elastic Cloud Hosted
---

# Get the usage charts for the instance of an organization.

- Server: `https://cloud.elastic.co` (Public)

## Paths

- `GET` `/api/v2/billing/organizations/{organization_id}/instances/{instance_id}/charts`

#### Path parameters

- `organization_id` (string) — required
- `instance_id` (string) — required

## Description

Retrieves the usage charts for the organization's instance.
Admin callers receive the data unconditionally; non-admin user callers
receive 403 if the instance is not in their accessible cloud resources.

## Query string parameters

- `from` (string) — required
  A datetime for the beginning of the desired range. Non-UTC offsets are converted to UTC internally. Responses always contain UTC values. If no timezone offset is specified, the request is rejected.
  Example: `2021-04-21T00:00:00+00:00`
- `to` (string) — required
  A datetime for the end of the desired range. Non-UTC offsets are converted to UTC internally. Responses always contain UTC values. If no timezone offset is specified, the request is rejected.
  Example: `2021-04-21T00:00:00+00:00`
- `bucketing_strategy` (enum) — optional
  The desired bucketing strategy for the charts.
  Values: `daily`, `monthly`
- `instance_type` (enum) — optional
  The type of the instances to be returned.
  Values: `all`, `deployments`, `projects`

## Responses

#### `200`

Successfully return the usage charts of an organization's instance.

`application/json`

- `data` (object[])
  The list of chart item.
  - `timestamp` (integer · format: int64)
    Axis X position.
  - `values` (object[])
    The collection of values to plot the chart item.
    - `id` (string)
      The id of chart item value.
    - `name` (string)
      The name of the chart item value.
    - `type` (string)
      Item type.
    - `value` (number · format: double)
      The actual value of the chart item value.
#### `401`

Unauthorized

`text/plain`

Type: `string`

#### `403`

Caller does not have access to the requested instance.

#### `404`

Not found.

#### `424`

Failed dependency.

#### `500`

Internal Server Error.

## Code examples

#### curl

```curl
curl -X GET "https://cloud.elastic.co/api/v2/billing/organizations/${ORGANIZATION_ID}/instances/${INSTANCE_ID}/charts?from=2021-04-21T00%3A00%3A00%2B00%3A00&to=2021-04-21T00%3A00%3A00%2B00%3A00"
```

