Billing Costs Analysisedit

Get costs overview for the organizationedit

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. Note: there is currently a three-month maximum date range.

to

string

N

A datetime for the end of the desired range for which to fetch costs. Defaults to the current date. Note: there is currently a three-month maximum date range.git s

Responsesedit

200

(CostsOverview) Top-level cost overview for the organization

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

Request exampleedit

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

Get deployments costs for the organizationedit

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. Note: there is currently a three-month maximum date range.

to

string

N

A datetime for the end of the desired range for which to fetch activity. Defaults to end of current month. Note: there is currently a three-month maximum date range.

Responsesedit

200

(DeploymentsCosts) The costs associated to a set of products

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

Request exampleedit

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

Get itemized costs by deploymentsedit

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. Note: there is currently a three-month maximum date range.

to

string

N

A datetime for the end of the desired range for which to fetch costs. Defaults to end of current month. Note: there is currently a three-month maximum date range.

Responsesedit

200

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

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

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"

Get itemized costs for the organizationedit

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. Note: there is currently a three-month maximum date range.

to

string

N

A datetime for the end of the desired range for which to fetch costs. Defaults to end of current month. Note: there is currently a three-month maximum date range.

Responsesedit

200

(ItemsCosts) The costs associated to a set of items

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

Request exampleedit

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