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

edit

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.

Request

edit

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

Path parameters

edit
Name Type Required Description

organization_id

string

Y

Identifier for the organization

Query parameters

edit
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.

Responses

edit
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 example

edit
curl -XGET https://{{hostname}}/api/v1/billing/costs/{organization_id} \
-H "Authorization: ApiKey $ECE_API_KEY"