---
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/4371/api/doc/cloud-billing/operation/operation-getchartsbyinstancev2
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/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)
- `instance_id` (string)

## 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)
  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.
- `to` (string)
  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.
- `bucketing_strategy` (enum)
  The desired bucketing strategy for the charts.
  Values: `daily`, `monthly`
- `instance_type` (enum)
  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)
    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)
      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

#### Console

```console
GET /api/v2/billing/organizations/{organization_id}/instances/{instance_id}/charts?from={from}&to={to}
```

#### curl

```curl
curl -X GET "https://cloud.elastic.co/api/v2/billing/organizations/{organization_id}/instances/{instance_id}/charts?from={from}&to={to}"
```

