Billing Costs Analysisedit

Get costs overview for the organization. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves an overview of the costs by organization ID.

Requestedit

GET /api/v1/billing/costs/{organization_id}

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

from

string

N

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

to

string

N

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

Responsesedit

200

(CostsOverview)

Top-level cost overview for the organization

400

(BasicFailedReply)

The specified date range is invalid. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

Organization not found. (code: organization.not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found])
The error codes associated with the response
500

(BasicFailedReply)

An error occurred when fetching an overview of the costs for the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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

Get charts for the organization. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves the usage charts for the organization.

Requestedit

GET /api/v1/billing/costs/{organization_id}/charts

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

bucketing_strategy

string; allowed values: [daily, monthly]; default: "Daily"

N

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

from

string

N

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

to

string

N

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

Responsesedit

200

(ChartItems)

The usage charts of an organization.

400

(BasicFailedReply)

The specified date range is invalid. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

Organization not found. (code: organization.not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found])
The error codes associated with the response
429

(BasicFailedReply)

Too many requests. (code: billing_service.rate_limited)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.rate_limited])
The error codes associated with the response
500

(BasicFailedReply)

Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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

Get deployments costs for the organization. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves the costs associated with all deployments for the organization.

Requestedit

GET /api/v1/billing/costs/{organization_id}/deployments

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

from

string

N

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

to

string

N

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

Headersedit

Name Type Required Description

Accept

string

N

Accept header containing the content preference.

Responsesedit

200

(DeploymentsCosts)

The costs associated to a set of products

400

(BasicFailedReply)

Invalid date range specified. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

Organization not found. (code: organization.not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found])
The error codes associated with the response
500

(BasicFailedReply)

An error occurred when fetching the costs associated with all deployments for the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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

Get charts by deployment. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves the usage charts for the given deployment.

Requestedit

GET /api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/charts

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Id of a Deployment

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

bucketing_strategy

string; allowed values: [daily, monthly]; default: "Daily"

N

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

from

string

N

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

to

string

N

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

Responsesedit

200

(ChartItems)

The usage charts of a deployment.

400

(BasicFailedReply)

The specified date range is invalid. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

Organization not found. (code: organization.not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found])
The error codes associated with the response
429

(BasicFailedReply)

Too many requests. (code: billing_service.rate_limited)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.rate_limited])
The error codes associated with the response
500

(BasicFailedReply)

Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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

Get itemized costs by deployments. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the given deployment.

Requestedit

GET /api/v1/billing/costs/{organization_id}/deployments/{deployment_id}/items

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Id of a Deployment

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

from

string

N

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

to

string

N

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

Headersedit

Name Type Required Description

Accept

string

N

Determines the response body format. Can be either application/json or text/csv.

Responsesedit

200

(ItemsCosts)

The costs associated to a set items billed for a single deployment.

400

(BasicFailedReply)

The specified date range is invalid. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

  • The organization was not found. (code: organization.not_found)
  • The Elasticsearch cluster was not found. (code: billing_service.es_cluster_id_not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found, billing_service.es_cluster_id_not_found])
The error codes associated with the response
500

(BasicFailedReply)

An error occurred when fetching the itemized costs for the given deployment of the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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

Get itemized costs for the organization. Currently unavailable in self-hosted ECE.edit

EXPERIMENTAL (it may change in future versions): Retrieves the itemized costs for the organization.

Requestedit

GET /api/v1/billing/costs/{organization_id}/items

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the organization

Query parametersedit

Name Type Required Description

from

string

N

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

to

string

N

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

Responsesedit

200

(ItemsCosts)

The costs associated to a set of items

400

(BasicFailedReply)

The specified date range is invalid. (code: costs.invalid_date_range)

Headers

x-cloud-error-codes (string; allowed values: [costs.invalid_date_range])
The error codes associated with the response
403

(BasicFailedReply)

The current user does not have access to the requested organization. (code: organization.invalid_access)

Headers

x-cloud-error-codes (string; allowed values: [organization.invalid_access])
The error codes associated with the response
404

(BasicFailedReply)

Organization not found. (code: organization.not_found)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found])
The error codes associated with the response
500

(BasicFailedReply)

Error fetching the itemized costs for the organization. (code: billing_service.failed_request)

Headers

x-cloud-error-codes (string; allowed values: [billing_service.failed_request])
The error codes associated with the response

Request exampleedit

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