Skip to main content
GET
/
billing
/
costs
/
{organization_id}
/
deployments
/
{deployment_id}
/
charts
Get charts by deployment. Currently unavailable in self-hosted ECE.
curl --request GET \
  --url https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/charts \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "timestamp": "<long>",
      "values": [
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<double>"
        },
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<double>"
        }
      ]
    },
    {
      "timestamp": "<long>",
      "values": [
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<double>"
        },
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<double>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

organization_id
string
required

(Required) Identifier for the organization

Example:

"<string>"

deployment_id
string
required

(Required) Id of a Deployment

Example:

"<string>"

Query Parameters

from
string

A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month.

Example:

"<string>"

to
string

A datetime for the end of the desired range for which to fetch costs. Defaults to the current date.

Example:

"<string>"

bucketing_strategy
string

The desired bucketing strategy for the charts. Defaults to daily.

Example:

"Daily"

Response

The usage charts of a deployment.

data
object[]
Example:
[
{
"timestamp": "<long>",
"values": [
{
"id": "<string>",
"name": "<string>",
"value": "<double>"
},
{
"id": "<string>",
"name": "<string>",
"value": "<double>"
}
]
},
{
"timestamp": "<long>",
"values": [
{
"id": "<string>",
"name": "<string>",
"value": "<double>"
},
{
"id": "<string>",
"name": "<string>",
"value": "<double>"
}
]
}
]
I