Skip to main content

Query Daily Usage
Public Preview

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
Base URL

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.

This endpoint is currently in Public Preview. If you have encountered any issue related to this endpoint, please contact Zilliz Cloud support.

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 Bodyapplication/json
startstring

The start time of the query period, in the format of YYYY-MM-DD.

endstring

The end time of the query period, in the format of YYYY-MM-DD.

export TOKEN="YOUR_API_KEY"

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

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

codeinteger

Response code.

dataobject
resultsarray
[]resultsobject
intervalStartstring

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

intervalEndstring

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.

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 actual cost recorded in the cost item in cents.

currentPageinteger

The current page number of the query result.

Value Range: ≥ 1
pageSizeinteger

The number of items per page of the query result.

Value Range: ≥ 1≤ 100
totalinteger

The total number of items of the query result.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"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
}
}
]
}
],
"currentPage": 1,
"pageSize": 100,
"total": 10000
}
}