Connect Elastic Cloud organization billing to Costory with an Organization API key. Covers setup, historical sync, and what cost grain and dimensions you get in Explorer.
Costory pulls costs from the Elastic Cloud Billing API using your Organization ID and an Elastic Cloud Organization API key. Data is normalized into so you can explore Elastic spend next to AWS, GCP, Azure, and other billing datasources.After setup, Elastic Cloud costs behave like other billing data in Explorer: same filters, breakdowns, and saved views. The sections below cover what one row represents and which dimensions you can rely on.
Manual setup
Terraform / API
Open Costory and go to Billing > Import new billing datasource > Elastic Cloud. The stepper guides you through each field.
In the Elastic Cloud Console, open your organization and copy the Organization ID (you need it for the Costory form).
Elastic Cloud console: organization settings with Organization ID and API key management.
Create an Elastic Cloud Organization API key with access to billing scope. Only organization owners can create these keys. See Elastic Cloud API keys.
In Costory, enter a datasource name, paste the API key and Organization ID, then submit. Validation calls the Billing API to confirm access.
Start Date is optional. Use it to narrow the first sync window or cap the range Costory ingests. If you leave them empty, Costory uses its default initial backfill (see Historical data).
On first sync, Costory backfills approximately 6 months of historical billing data (one day at a time). Incremental syncs then keep data current.
In the Elastic Cloud Console, copy your Organization ID and ensure you have an Elastic Cloud Organization API key with billing scope. Elastic does not provide Terraform resources for these credentials; create them in the console or via Elastic’s APIs. See Elastic Cloud API keys.
Elastic Cloud console: organization settings with Organization ID and API key management.
Elastic sends one daily snapshot per Elastic Cloud project; Costory expands each project’s product_line_items so that one billing row is one product line for that project and usage day (not a single rolled-up row per project per day).Dimensions and usage fieldsEach row below is a Standard Column in Explorer and breakdowns. Exports and advanced queries use the same names with a cos_ prefix, for example cos_service_name for Service name and cos_consumed_quantity for Consumed quantity.
Standard Column
Filled from Elastic
Example
Provider
Fixed for this datasource.
Elastic Cloud
Billing account id
Elastic project id.
e9cc2fb04b35414690b77a3b2c593602
Sub account id
Elastic project name.
My Elasticsearch project
Resource id
Same as Billing account id (project id).
e9cc2fb04b35414690b77a3b2c593602
Resource name
Same as Sub account id (project name).
My Elasticsearch project
Service name
Full Elastic product line label for that billing line.
Elasticsearch - General Purpose - Search VCU (GCP us-central1)
Costory calls Elastic’s instance costs endpoint (see Get costs for instances):GET https://cloud.elastic.co/api/v2/billing/organizations/{organization_id}/costs/instancesAuthentication uses an API key in the Authorization header. See Elastic Cloud API keys and the Elastic Cloud Billing API for details.