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.
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"
}