Skip to main content

Query Daily Usage (V2)

Queries the daily usage of the specified organization in the specified time period. The current user should be an organization owner or a billing admin.

POST/v2/usage/query
Connection Endpoint

The base URL for this API is in the following format:

https://api.cloud.zilliz.com

📘Notes

The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.

If you have encountered any issue related to this endpoint, please contact Zilliz Cloud support.

shell
export BASE_URL="https://api.cloud.zilliz.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges.

Example Value: Bearer {{TOKEN}}
Request Body
startstring<date-time>

The start of the query period, in RFC 3339 format (for example, 2026-09-16T00:00:00Z). Must be midnight UTC. A non-UTC offset is converted to UTC first, which shifts the day. A start that is not midnight UTC silently returns that day's bucket with an empty items array and a total of 0.

endstring<date-time>

The end of the query period, in RFC 3339 format (for example, 2026-09-17T00:00:00Z). The end date is inclusive: setting end equal to start returns a single daily bucket.

bash
export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/usage/query" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"start": "2024-01-01T00:00:00Z",
"end": "2024-02-01T00:00:00Z"
}'
Responses

Returns the detailed daily usage of the specified organization in the specified time period.

Returns the detailed daily usage of the organization in the specified time period.

codeinteger

Response code.

dataobject

The usage query result. The full requested range is returned in a single response.

resultsarray
[]resultsobject
intervalStartstring<date-time>

The start time of the interval to query, in the format of YYYY-MM-DDTHH:mm:ssZ.

intervalEndstring<date-time>

The end time of the interval to query, in the format of YYYY-MM-DDTHH:mm:ssZ.

totalnumber

The total amount of the usage within the specified interval.

currencystring

The currency that applies to the total amount.

itemsarray

The breakdowns of the usage within the specified interval.

[]itemsobject
costTypestring

The type of the cost.

propertiesobject

The details of the current cost item.

projectIdstring

The ID of the project to which the cluster that generates the cost item belongs.

regionIdstring

The ID of the region to which the cluster that generates the cost item belongs.

cuTypestring

The type of the compute unit (CU) of the cluster that generates the cost item.

planstring

The subscription plan of the cluster that generates the cost item.

clusterIdstring

The ID of the cluster that generates the cost item.

resourceTypestring

The type of the billed resource.

resourceIdstring

The ID of the billed resource.

volumeNamestring

The name of the volume.

requestClassstring

The class of the billed request.

quantitynumber

The amount of the used resource corresponds to the cost item.

unitstring

The unit of the amount of the used resource corresponds to the cost item.

listPriceobject

The list price of the used resource corresponds to the cost item.

unitPricenumber

The unit price of the used resource.

priceobject

The actual price of the used resource corresponds to the cost item.

unitPricenumber

The unit price of the used resource.

amountnumber

The cost amount of the item, in the currency of the interval (currency).

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

Successjson
{
"code": 0,
"data": {
"results": [
{
"intervalStart": "2024-01-01T00:00:00Z",
"intervalEnd": "2024-01-02T00:00:00Z",
"total": 12345.12345678,
"currency": "USD",
"items": [
{
"costType": "compute",
"properties": {
"projectId": "prj-12jhiu212748391",
"regionId": "aws-us-west-2",
"cuType": "Performance-optimized",
"plan": "Standard",
"clusterId": "in01-xxxxx"
},
"quantity": 55.6778,
"unit": "CU-hours",
"listPrice": {
"unitPrice": 123
},
"price": {
"unitPrice": 123
},
"amount": 12345.12345678
},
{
"costType": "storage",
"properties": {
"projectId": "prj-12jhiu212748391",
"regionId": "aws-us-west-2",
"cuType": "Performance-optimized",
"plan": "Standard",
"clusterId": "in01-xxxxx"
},
"quantity": 55.6778,
"unit": "...",
"amount": 12345.12345678
},
{
"costType": "read_vcu",
"properties": {
"projectId": "prj-12jhiu212748391",
"regionId": "aws-us-west-2",
"clusterId": "in01-xxxxx"
},
"quantity": 8123789132,
"unit": "...",
"amount": 12345.12345678,
"listPrice": {
"unitPrice": 123
},
"price": {
"unitPrice": 123
}
}
]
}
]
}
}