Skip to main content

Query CCU usage of the organization

Queries the CCU usage per cluster within the organization or the specified account.

NOTE

This operation requires the application key of the organization root account member and the View and manage billing privilege.

Request

Basic information
HTTP URLhttps://cloud-api.celerdata.com/api/1.0/org/cluster/usage
HTTP methodPOST
Frequency600/minute

Header parameters

ParameterExample valueRequiredTypeDescription
AuthorizationBearer OGQ5MDA4MZGTNJMWNS0ZY2Y2LWFJNZYTOTBINMZIYTGZZDUYYesStringThe access token used to access the CelerData Cloud BYOC API. Format: Bearer <access_token>.

See Obtain access token.

Query parameters

ParameterExample valueRequiredTypeDescription
account_ids["acc_01","acc_02"]NoArrayThe ID(s) of the account you want to query the CCU usage for.
start_date20230701YesStringThe start date of the time range to query. Format: yyyyMMdd.
end_date20230731YesStringThe end date of the time range to query. Format: yyyyMMdd.
The start_date must be less than or equal to the end_date, and the result of subtracting start_date from start_date must range from 0 to 31.
show_daily_detailtrueNoBooleanWhether to allow the system to return the daily usage of the cluster. Valid Values: true and false(Default).

Example:

{
// Queries the organization's CCU usage between 2025-06-01 00:00:00 UTC and 2025-06-30 23:59:59 UTC, and the daily usage of the clusters.
"start_date": "20250601",
"end_date": "20250630",
"show_daily_detail": true
}

Response

Sample response

{
"code": 20000,
"data": {
"total_usage": "3.253717",
"accounts": [
{
"account_id": "lbyx05t5a",
"account_name": "123",
"account_email": "test@celerdata.com",
"total_usage": "2.240385",
"clusters": [
{
"cluster_id": "e19feed8-f29b-48a3-bd52-db391a912121",
"cluster_name": "test_elastic_tutorial",
"total_usage": "2.240385",
"daily_usages": [
{
"usage": "2.240385",
"date": 20250310,
"time_stamp": 1741564800
}
]
}
]
},
{
"account_id": "0qhbudg4w",
"account_name": "456",
"account_email": "test2@celerdata.com",
"total_usage": "1.013332",
"clusters": [
{
"cluster_id": "fea50468-c18b-446e-b05d-a66fce1094f2",
"cluster_name": "test002",
"total_usage": "1.013332",
"daily_usages": [
{
"usage": "1.013332",
"date": 20250331,
"time_stamp": 1743379200
}
]
}
]
}
]
}
}

Response elements

ParameterExample valueTypeDescription
code20000IntegerThe error code. If the error code returned is 20000, the request succeeded. If any other error code is returned, the request failed.
data-ObjectThe result of the API call. The data object may not be returned for some API actions. It consists of the following elements:
  • total_usage
  • usage_details
data.total_usage3.253717StringThe total CCU usage of the organization or specified account(s) over the selected time range.
data.accounts-ArrayThe CCU usage details per account when the organization total usage is not 0. It consists of the following elements:
  • account_id
  • account_name
  • account_email
  • total_usage
  • clusters
data.accounts.account_idlbyx0bt7aStringThe ID of the account.
data.accounts.account_nameacc_01StringThe name of the account.
data.accounts.account_emailx1@xxx.comStringThe email address of the account.
data.accounts.total_usage5.064104StringThe CCU usage of the account over the selected time range.
data.accounts.clusters-ArrayThe CCU usage details per cluster when the account total usage is not 0. It consists of the following elements:
  • cluster_id
  • cluster_name
  • total_usage
  • daily_usages
data.accounts.clusters.cluster_id9d4b52ce-c272-48fb-9bdf-7c55ed7925abStringThe ID of the cluster.
data.accounts.clusters.cluster_namecluster_01StringThe name of the cluster.
data.accounts.clusters.total_usage1.013332StringThe CCU usage of the cluster over the selected time range.
data.accounts.clusters.daily_usages1.013332ArrayThe daily CCU usage details of the cluster. It consists of the following elements:
  • usage
  • date
  • time_stamp
data.accounts.clusters.daily_usages.usage1.013332StringThe CCU usage of the cluster on a specific day.
data.accounts.clusters.daily_usages.date20250601StringThe date of the recorded cluster CCU usage.
data.accounts.clusters.daily_usages.time_stamp1743379200IntegerThe timestamp (in seconds) corresponding to 0:00:00 of the date.
messageparam start_date is invalidStringThe error message. This element is returned only when the code returned is not 20000.
NOTICE
Do not conclude whether a request succeeded or failed based on the return value of message.