Skip to main content
GET
/
api
/
v1
/
sandbox
/
usage
Python (SDK)
from meetkai_mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.sandbox_usage.get_usage_api_v1_sandbox_usage_get(start_time=870831, all_orgs=False)

    # Handle response
    print(res)
{
  "object": "page",
  "data": [
    {
      "start_time": 123,
      "end_time": 123,
      "object": "bucket",
      "results": [
        {
          "object": "organization.usage.sandbox.result",
          "num_operations": 0,
          "num_sessions": 0,
          "request_count": 0,
          "duration_ms": 0,
          "workspace_bytes_in": 0,
          "workspace_bytes_out": 0,
          "files_changed_count": 0,
          "oom_killed_count": 0,
          "peak_memory_mib": 123,
          "reserved_memory_mib": 123,
          "user_id": "<string>",
          "api_key_id": "<string>",
          "org_id": "<string>",
          "provider": "<string>"
        }
      ]
    }
  ],
  "has_more": false,
  "next_page": "<string>"
}

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Query Parameters

start_time
integer
required

Start time as Unix seconds, inclusive

end_time
integer | null

End time as Unix seconds, exclusive. Defaults to now.

bucket_width
enum<string>
default:1d

Time bucket width.

Available options:
1m,
1h,
1d
group_by
string[] | null

Repeat or comma-separate grouping dimensions.

all_orgs
boolean
default:false

Aggregate usage across all organizations (cluster admins only).

org_ids
string[] | null

Filter by organization IDs (cluster admins only, implies cluster scope).

Response

Successful Response

object
string
default:page
Allowed value: "page"
data
SandboxUsageBucket · object[]
has_more
boolean
default:false
next_page
string | null