Get usage data
admin.usage.list(UsageListParams**kwargs) -> SyncOpaqueCursorPage[UsageListResponse]
GET/compute/v1/admin/usage
Retrieve aggregated usage data across the organization, optionally grouped by workspace and/or application.
Parameters
ending_at: Union[str, datetime]
End of the time range as an ISO 8601 date-time with timezone, for example 2026-04-08T18:56:46Z
formatdate-time
starting_at: Union[str, datetime]
Start of the time range as an ISO 8601 date-time with timezone, for example 2026-04-08T18:56:46Z
formatdate-time
limit: Optional[int]
Maximum number of buckets to return
minimum1
page: Optional[str]
Cursor for pagination
Returns
Get usage data
import os
from datetime import datetime
from boltz_api import Boltz
client = Boltz(
api_key=os.environ.get("BOLTZ_API_KEY"), # This is the default and can be omitted
)
page = client.admin.usage.list(
ending_at=datetime.fromisoformat("2019-12-27T18:11:19.117"),
starting_at=datetime.fromisoformat("2019-12-27T18:11:19.117"),
window_size="HOUR",
)
page = page.data[0]
print(page.workspace_id){
"data": [
{
"end_time": "2019-12-27T18:11:19.117Z",
"quantity": 0,
"start_time": "2019-12-27T18:11:19.117Z",
"application": "structure_and_binding",
"workspace_id": "workspace_id"
}
],
"has_more": true,
"next_page": "next_page"
}Returns Examples
{
"data": [
{
"end_time": "2019-12-27T18:11:19.117Z",
"quantity": 0,
"start_time": "2019-12-27T18:11:19.117Z",
"application": "structure_and_binding",
"workspace_id": "workspace_id"
}
],
"has_more": true,
"next_page": "next_page"
}