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 URL | https://cloud-api.celerdata.com/api/1.0/org/cluster/usage |
HTTP method | POST |
Frequency | 600/minute |
Header parameters
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
Authorization | Bearer OGQ5MDA4MZGTNJMWNS0ZY2Y2LWFJNZYTOTBINMZIYTGZZDUY | Yes | String | The access token used to access the CelerData Cloud BYOC API. Format: Bearer <access_token> . |
See Obtain access token.
Query parameters
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
account_ids | ["acc_01","acc_02"] | No | Array | The ID(s) of the account you want to query the CCU usage for. |
start_date | 20230701 | Yes | String | The start date of the time range to query. Format: yyyyMMdd . |
end_date | 20230731 | Yes | String | The 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_detail | true | No | Boolean | Whether 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
Parameter | Example value | Type | Description |
---|---|---|---|
code | 20000 | Integer | The error code. If the error code returned is 20000 , the request succeeded. If any other error code is returned, the request failed. |
data | - | Object | The result of the API call. The data object may not be returned for some API actions. It consists of the following elements:
|
data.total_usage | 3.253717 | String | The total CCU usage of the organization or specified account(s) over the selected time range. |
data.accounts | - | Array | The CCU usage details per account when the organization total usage is not 0 . It consists of the following elements:
|
data.accounts.account_id | lbyx0bt7a | String | The ID of the account. |
data.accounts.account_name | acc_01 | String | The name of the account. |
data.accounts.account_email | x1@xxx.com | String | The email address of the account. |
data.accounts.total_usage | 5.064104 | String | The CCU usage of the account over the selected time range. |
data.accounts.clusters | - | Array | The CCU usage details per cluster when the account total usage is not 0 . It consists of the following elements:
|
data.accounts.clusters.cluster_id | 9d4b52ce-c272-48fb-9bdf-7c55ed7925ab | String | The ID of the cluster. |
data.accounts.clusters.cluster_name | cluster_01 | String | The name of the cluster. |
data.accounts.clusters.total_usage | 1.013332 | String | The CCU usage of the cluster over the selected time range. |
data.accounts.clusters.daily_usages | 1.013332 | Array | The daily CCU usage details of the cluster. It consists of the following elements:
|
data.accounts.clusters.daily_usages.usage | 1.013332 | String | The CCU usage of the cluster on a specific day. |
data.accounts.clusters.daily_usages.date | 20250601 | String | The date of the recorded cluster CCU usage. |
data.accounts.clusters.daily_usages.time_stamp | 1743379200 | Integer | The timestamp (in seconds) corresponding to 0:00:00 of the date. |
message | param start_date is invalid | String | The 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 . |