Get itemized costs by deployments. Currently unavailable in self-hosted ECE.
EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the given deployment.
Headers
-
Accept string
Determines the response body format. Can be either application/json or text/csv.
Path parameters
-
Identifier for the organization
-
Id of a Deployment
Responses
-
The costs associated to a set items billed for a single deployment.
-
The specified date range is invalid. (code:
costs.invalid_date_range
) -
The current user does not have access to the requested organization. (code:
organization.invalid_access
) -
- The organization was not found. (code:
organization.not_found
) - The Elasticsearch cluster was not found. (code:
billing_service.es_cluster_id_not_found
)
- The organization was not found. (code:
-
An error occurred when fetching the itemized costs for the given deployment of the organization. (code:
billing_service.failed_request
)
GET /billing/costs/{organization_id}/deployments/{deployment_id}/items
curl \
-X GET https://{{hostname}}/api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/items \
-H "Accept: string"
Response examples (200)
{
"costs": {
"total": 42.0,
"dimensions": [
{
"type": "capacity",
"cost": 42.0
}
]
},
"data_transfer_and_storage": [
{
"cost": 42.0,
"name": "string",
"quantity": {
"value": 42,
"formatted_value": "string"
},
"rate": {
"value": 42.0,
"formatted_value": "string"
},
"sku": "string",
"type": "string"
}
],
"resources": [
{
"hours": 42,
"instance_count": 42,
"period": {
"start": "2024-05-04T09:42:00+00:00",
"end": "2024-05-04T09:42:00+00:00"
},
"kind": "elasticsearch",
"price": 42.0,
"price_per_hour": 42.0,
"name": "string",
"sku": "string"
}
]
}
Response examples (400)
# Headers
x-cloud-error-codes: costs.invalid_date_range
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (403)
# Headers
x-cloud-error-codes: organization.invalid_access
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (500)
# Headers
x-cloud-error-codes: billing_service.failed_request
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}