# Manage & Operate › Cost Center › Cost Explorer API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Manage & Operate product's sections: https://developers.eu.ovhcloud.com/reference/manage-operate/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/manage-operate/cost-center/cost-explorer.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/manage-operate/cost-center/cost-explorer.json?format=openapi3

## Operations

- `POST /finops/costExplorer/breakdown` — Start the computation of a cost breakdown
- `GET /finops/costExplorer/breakdown/{breakdownId}` — Get a cost breakdown computation and its result
- `GET /finops/costExplorer/dimension` — List the dimensions that a cost breakdown can filter on or group by
- `POST /finops/costExplorer/dimensionValue` — Start the listing of the values of every dimension in the cost lines of a range
- `GET /finops/costExplorer/dimensionValue/{dimensionValueId}` — Get a dimension values listing and its result

## Start the computation of a cost breakdown

`POST /v2/finops/costExplorer/breakdown`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/#createCostBreakdown

**Status:** Beta version  
**IAM actions:** `account:apiovh:finops/costExplorer/get`

Starts the asynchronous computation of the cost of the account over a range, split into periods of the granularity and into series of the groupBy dimension.

The amount of a period is the cost recognized during that period: the cost that first appears in the billing data during the period, not the cost of the usage of the period.

The granularity is the finest one used: when the range holds more than 744 periods of this width, the computation uses a coarser one, and the result gives the one used.

Read the progress and the result with GET /v2/finops/costExplorer/breakdown/{breakdownId}.

Returns 400 when:

- from is not before to;
- two filters name the same dimension;
- groupBy or a filter names a dimension that GET /v2/finops/costExplorer/dimension does not list.

Returns 400 with the class `Client::BadRequest::FeatureUnavailable` when the account is not enrolled in the Cost Explorer.

Returns 400 with the class `Client::BadRequest::DataUnavailable` when the Cost Explorer has no data of the account before the end of the range.

### Request body (required)

Type: `finops.costExplorer.BreakdownCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `currency` | finops.costExplorer.CurrencyEnum |  | Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them. — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `PLN`, `POINTS`, `SGD`, `TND`, … |
| `filters` | finops.costExplorer.BreakdownFilter[] |  | Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line. |
| `filters[].dimension` | string | yes | Key of the dimension to filter on, as GET /v2/finops/costExplorer/dimension lists it. Two filters of the same breakdown cannot name the same dimension. |
| `filters[].values` | string[] | yes | Values to keep, at least one, as POST /v2/finops/costExplorer/dimensionValue lists them. The comparison is exact and case-sensitive. An empty string keeps the cost lines that have no value for the dimension. |
| `from` | string (date-time) | yes | Start of the range, included |
| `granularity` | finops.costExplorer.GranularityEnum | yes | Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width. — one of `DAY`, `HOUR`, `MONTH` |
| `groupBy` | string |  | Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY. |
| `to` | string (date-time) | yes | End of the range, excluded. It must be after from. |

```json
{
  "currency": "AUD",
  "filters": [
    {
      "dimension": "string",
      "values": [
        "string"
      ]
    }
  ],
  "from": "2024-01-01T12:00:00Z",
  "granularity": "DAY",
  "groupBy": "string",
  "to": "2024-01-01T12:00:00Z"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | finops.costExplorer.BreakdownTask | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date when the computation was started |
| `errors` | finops.costExplorer.TaskError[] | read-only | Errors that ended the computation. Empty unless the status is ERROR. |
| `errors[].class` | string | read-only | Class of the error: - Client::BadRequest::CurrencyRequired: the cost spans several currencies. Start the breakdown again with one of those the message lists. - Server::ServiceUnavailable::Timeout: start again over a shorter range. - Server::ServiceUnavailable::Interrupted: start again. - Server::InternalServerError: unexpected failure. |
| `errors[].message` | string | read-only | Human-readable description of the error |
| `id` | string (uuid) | read-only | Unique identifier of the computation |
| `result` | finops.costExplorer.BreakdownResult | read-only | Cost breakdown. Null unless the status is DONE. |
| `result.currency` | finops.costExplorer.CurrencyEnum | read-only | Currency of every amount, for example EUR. Null when the range holds no cost. — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `PLN`, `POINTS`, `SGD`, `TND`, … |
| `result.from` | string (date-time) | read-only | Start of the range, included |
| `result.granularity` | finops.costExplorer.GranularityEnum | read-only | Width of the periods. It is the requested granularity, or a coarser one when the range holds more than 744 periods of the requested width. — one of `DAY`, `HOUR`, `MONTH` |
| `result.periods` | finops.costExplorer.Period[] | read-only | Cost of each period, in time order |
| `result.periods[].amounts` | object | read-only | Cost of each series during the period, in the currency of the breakdown, keyed by the values of series. Every series has an entry. |
| `result.periods[].end` | string (date-time) | read-only | End of the period, excluded, in UTC. The last period ends at the to of the range. |
| `result.periods[].start` | string (date-time) | read-only | Start of the period, included, in UTC. The first period starts at the from of the range. |
| `result.series` | string[] | read-only | Values of the groupBy dimension present in the result, by total cost descending. Each one is a key of the amounts of every period and of totals. An empty string groups the cost lines that have no value for the dimension. |
| `result.timezone` | finops.costExplorer.TimezoneEnum | read-only | IANA time zone that the periods align with. Always UTC for now. — one of `UTC` |
| `result.to` | string (date-time) | read-only | End of the range, excluded |
| `result.totals` | object | read-only | Cost of each series over all the periods, in the currency of the breakdown, keyed by the values of series |
| `result.truncated` | boolean | read-only | Whether cost data is missing for a part of the range, so the amounts of that part are incomplete |
| `status` | common.TaskStatusEnum | read-only | Status of the computation: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final. — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "class": "string",
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "result": {
    "currency": "AUD",
    "from": "2024-01-01T12:00:00Z",
    "granularity": "DAY",
    "periods": [
      {
        "amounts": {
          "key": 0
        },
        "end": "2024-01-01T12:00:00Z",
        "start": "2024-01-01T12:00:00Z"
      }
    ],
    "series": [
      "string"
    ],
    "timezone": "UTC",
    "to": "2024-01-01T12:00:00Z",
    "totals": {
      "key": 0
    },
    "truncated": true
  },
  "status": "DONE"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/finops/costExplorer/breakdown" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: finops.costExplorer.BreakdownCreation
result = client.post("/v2/finops/costExplorer/breakdown",
	currency = None, # Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them. (type: finops.costExplorer.CurrencyEnum, nullable)
	filters = None, # Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line. (type: array, nullable)
	from = None, # Start of the range, included (type: string)
	granularity = None, # Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width. (type: finops.costExplorer.GranularityEnum)
	groupBy = None, # Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY. (type: string, nullable)
	to = None, # End of the range, excluded. It must be after from. (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: finops.costExplorer.BreakdownCreation
$result = $ovh->post("/v2/finops/costExplorer/breakdown", array(
	currency => null, // Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them. (type: finops.costExplorer.CurrencyEnum, nullable)
	filters => null, // Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line. (type: array, nullable)
	from => null, // Start of the range, included (type: string)
	granularity => null, // Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width. (type: finops.costExplorer.GranularityEnum)
	groupBy => null, // Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY. (type: string, nullable)
	to => null, // End of the range, excluded. It must be after from. (type: string)
));

print_r($result);
?>
```

## Get a cost breakdown computation and its result

`GET /v2/finops/costExplorer/breakdown/{breakdownId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/#getCostBreakdown

**Status:** Beta version  
**IAM actions:** `account:apiovh:finops/costExplorer/get`

Returns the status of a computation started with POST /v2/finops/costExplorer/breakdown. Poll this route until the status is DONE or ERROR. The result is set when the status is DONE.

Returns 404 when:

- the account has no computation with this identifier;
- the computation has expired.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `breakdownId` | path | string (uuid) | yes | Breakdown ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | finops.costExplorer.BreakdownTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date when the computation was started |
| `errors` | finops.costExplorer.TaskError[] | read-only | Errors that ended the computation. Empty unless the status is ERROR. |
| `errors[].class` | string | read-only | Class of the error: - Client::BadRequest::CurrencyRequired: the cost spans several currencies. Start the breakdown again with one of those the message lists. - Server::ServiceUnavailable::Timeout: start again over a shorter range. - Server::ServiceUnavailable::Interrupted: start again. - Server::InternalServerError: unexpected failure. |
| `errors[].message` | string | read-only | Human-readable description of the error |
| `id` | string (uuid) | read-only | Unique identifier of the computation |
| `result` | finops.costExplorer.BreakdownResult | read-only | Cost breakdown. Null unless the status is DONE. |
| `result.currency` | finops.costExplorer.CurrencyEnum | read-only | Currency of every amount, for example EUR. Null when the range holds no cost. — one of `AUD`, `CAD`, `CZK`, `EUR`, `GBP`, `INR`, `LTL`, `MAD`, `PLN`, `POINTS`, `SGD`, `TND`, … |
| `result.from` | string (date-time) | read-only | Start of the range, included |
| `result.granularity` | finops.costExplorer.GranularityEnum | read-only | Width of the periods. It is the requested granularity, or a coarser one when the range holds more than 744 periods of the requested width. — one of `DAY`, `HOUR`, `MONTH` |
| `result.periods` | finops.costExplorer.Period[] | read-only | Cost of each period, in time order |
| `result.periods[].amounts` | object | read-only | Cost of each series during the period, in the currency of the breakdown, keyed by the values of series. Every series has an entry. |
| `result.periods[].end` | string (date-time) | read-only | End of the period, excluded, in UTC. The last period ends at the to of the range. |
| `result.periods[].start` | string (date-time) | read-only | Start of the period, included, in UTC. The first period starts at the from of the range. |
| `result.series` | string[] | read-only | Values of the groupBy dimension present in the result, by total cost descending. Each one is a key of the amounts of every period and of totals. An empty string groups the cost lines that have no value for the dimension. |
| `result.timezone` | finops.costExplorer.TimezoneEnum | read-only | IANA time zone that the periods align with. Always UTC for now. — one of `UTC` |
| `result.to` | string (date-time) | read-only | End of the range, excluded |
| `result.totals` | object | read-only | Cost of each series over all the periods, in the currency of the breakdown, keyed by the values of series |
| `result.truncated` | boolean | read-only | Whether cost data is missing for a part of the range, so the amounts of that part are incomplete |
| `status` | common.TaskStatusEnum | read-only | Status of the computation: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final. — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "class": "string",
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "result": {
    "currency": "AUD",
    "from": "2024-01-01T12:00:00Z",
    "granularity": "DAY",
    "periods": [
      {
        "amounts": {
          "key": 0
        },
        "end": "2024-01-01T12:00:00Z",
        "start": "2024-01-01T12:00:00Z"
      }
    ],
    "series": [
      "string"
    ],
    "timezone": "UTC",
    "to": "2024-01-01T12:00:00Z",
    "totals": {
      "key": 0
    },
    "truncated": true
  },
  "status": "DONE"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/finops/costExplorer/breakdown/{breakdownId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/finops/costExplorer/breakdown/{breakdownId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/finops/costExplorer/breakdown/{breakdownId}");

print_r($result);
?>
```

## List the dimensions that a cost breakdown can filter on or group by

`GET /v2/finops/costExplorer/dimension`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/#getCostDimensions

**Status:** Beta version  
**IAM actions:** `account:apiovh:finops/costExplorer/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | finops.costExplorer.Dimension[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string | read-only | Identifier of the dimension, for example CATEGORY, as the groupBy and the filters of a cost breakdown take it |
| `label` | string | read-only | Display name of the dimension, in English, for example `Product category` |

```json
[
  {
    "key": "string",
    "label": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/finops/costExplorer/dimension" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/finops/costExplorer/dimension")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/finops/costExplorer/dimension");

print_r($result);
?>
```

## Start the listing of the values of every dimension in the cost lines of a range

`POST /v2/finops/costExplorer/dimensionValue`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/#createCostDimensionValues

**Status:** Beta version  
**IAM actions:** `account:apiovh:finops/costExplorer/get`

Starts the asynchronous listing of the distinct values of every dimension that appear in the cost lines of the range. Each value can feed the matching filter of POST /v2/finops/costExplorer/breakdown.

Read the progress and the result with GET /v2/finops/costExplorer/dimensionValue/{dimensionValueId}.

Returns 400 when from is not before to.

Returns 400 with the class `Client::BadRequest::FeatureUnavailable` when the account is not enrolled in the Cost Explorer.

Returns 400 with the class `Client::BadRequest::DataUnavailable` when the Cost Explorer has no data of the account before the end of the range.

### Request body (required)

Type: `finops.costExplorer.DimensionValueCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | string (date-time) | yes | Start of the range, included |
| `to` | string (date-time) | yes | End of the range, excluded. It must be after from. |

```json
{
  "from": "2024-01-01T12:00:00Z",
  "to": "2024-01-01T12:00:00Z"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | finops.costExplorer.DimensionValueTask | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date when the listing was started |
| `errors` | finops.costExplorer.TaskError[] | read-only | Errors that ended the listing. Empty unless the status is ERROR. |
| `errors[].class` | string | read-only | Class of the error: - Client::BadRequest::CurrencyRequired: the cost spans several currencies. Start the breakdown again with one of those the message lists. - Server::ServiceUnavailable::Timeout: start again over a shorter range. - Server::ServiceUnavailable::Interrupted: start again. - Server::InternalServerError: unexpected failure. |
| `errors[].message` | string | read-only | Human-readable description of the error |
| `id` | string (uuid) | read-only | Unique identifier of the listing |
| `result` | finops.costExplorer.DimensionValueList[] | read-only | Values of each dimension, in the order of GET /v2/finops/costExplorer/dimension. Null unless the status is DONE. |
| `result[].dimension` | string | read-only | Key of the dimension that the values belong to, as GET /v2/finops/costExplorer/dimension lists it |
| `result[].values` | string[] | read-only | Distinct values of the dimension in the cost lines of the range, sorted. Each one can feed a filter of a cost breakdown. An empty string stands for the cost lines that have no value for the dimension. |
| `status` | common.TaskStatusEnum | read-only | Status of the listing: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final. — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "class": "string",
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "result": [
    {
      "dimension": "string",
      "values": [
        "string"
      ]
    }
  ],
  "status": "DONE"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/finops/costExplorer/dimensionValue" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: finops.costExplorer.DimensionValueCreation
result = client.post("/v2/finops/costExplorer/dimensionValue",
	from = None, # Start of the range, included (type: string)
	to = None, # End of the range, excluded. It must be after from. (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: finops.costExplorer.DimensionValueCreation
$result = $ovh->post("/v2/finops/costExplorer/dimensionValue", array(
	from => null, // Start of the range, included (type: string)
	to => null, // End of the range, excluded. It must be after from. (type: string)
));

print_r($result);
?>
```

## Get a dimension values listing and its result

`GET /v2/finops/costExplorer/dimensionValue/{dimensionValueId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/cost-center/cost-explorer/#getCostDimensionValues

**Status:** Beta version  
**IAM actions:** `account:apiovh:finops/costExplorer/get`

Returns the status of a listing started with POST /v2/finops/costExplorer/dimensionValue. Poll this route until the status is DONE or ERROR. The result is set when the status is DONE.

Returns 404 when:

- the account has no listing with this identifier;
- the listing has expired.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `dimensionValueId` | path | string (uuid) | yes | Dimension value ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | finops.costExplorer.DimensionValueTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date when the listing was started |
| `errors` | finops.costExplorer.TaskError[] | read-only | Errors that ended the listing. Empty unless the status is ERROR. |
| `errors[].class` | string | read-only | Class of the error: - Client::BadRequest::CurrencyRequired: the cost spans several currencies. Start the breakdown again with one of those the message lists. - Server::ServiceUnavailable::Timeout: start again over a shorter range. - Server::ServiceUnavailable::Interrupted: start again. - Server::InternalServerError: unexpected failure. |
| `errors[].message` | string | read-only | Human-readable description of the error |
| `id` | string (uuid) | read-only | Unique identifier of the listing |
| `result` | finops.costExplorer.DimensionValueList[] | read-only | Values of each dimension, in the order of GET /v2/finops/costExplorer/dimension. Null unless the status is DONE. |
| `result[].dimension` | string | read-only | Key of the dimension that the values belong to, as GET /v2/finops/costExplorer/dimension lists it |
| `result[].values` | string[] | read-only | Distinct values of the dimension in the cost lines of the range, sorted. Each one can feed a filter of a cost breakdown. An empty string stands for the cost lines that have no value for the dimension. |
| `status` | common.TaskStatusEnum | read-only | Status of the listing: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final. — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "class": "string",
      "message": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "result": [
    {
      "dimension": "string",
      "values": [
        "string"
      ]
    }
  ],
  "status": "DONE"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/finops/costExplorer/dimensionValue/{dimensionValueId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/finops/costExplorer/dimensionValue/{dimensionValueId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/finops/costExplorer/dimensionValue/{dimensionValueId}");

print_r($result);
?>
```
