ElasticS Billing API

Hi all,

Currently, i am trying to fetch the billing details of my organization using the below API call

curl -XGET https://api.elastic-cloud.com/api/v1/billing/costs/{organization_id} \
-H "Authorization: ApiKey $EC_API_KEY"

I do get the response as

{'costs': {'total': mycost,
'dimensions': [{'type': 'capacity', 'cost': mycost},
{'type': 'data_in', 'cost': 0.0},
{'type': 'data_internode', 'cost': mycost},
{'type': 'data_out', 'cost': mycost},
{'type': 'storage_api', 'cost': mycost},
{'type': 'storage_bytes', 'cost': mycost}]},
'trials': 0.0,
'hourly_rate': mycost,
'balance': {'available': 0.0, 'remaining': 0.0, 'line_items': }}

According to this document, I should have a date in the Line_items array
Definitions | Elasticsearch Service Documentation | Elastic

How can I know my billing details calculated from which dates??

You can use like the below

curl -XGET 'https://api.elastic-cloud.com/api/v1/billing/costs/{id}/deployments?from=2022-12-19&to=2022-12-19' \
-H "Authorization: ApiKey {API_KEY}"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.