Skip to main content
GET
Python (SDK)

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 (Unix seconds), inclusive

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1704067200

end_time
integer

End time (Unix seconds), exclusive

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1704153600

bucket_width
enum<string>
default:1d

Width of each time bucket (1m, 1h, 1d)

Available options:
1m,
1h,
1d
Example:

"1d"

limit
integer

Number of buckets to return

Required range: 1 <= x <= 1440
Example:

30

page
string

Pagination cursor

Example:

"cursor_abc123"

user_ids
string[]

Filter by platform user IDs (the same dimension group_by=user_id reports)

Example:
external_user_ids
string[]

Filter by delegated end-user IDs (externalUserId, i.e. X-On-Behalf-Of subs)

Example:
all_orgs
string

Aggregate usage across all organizations (cluster admins only)

org_ids
string[]

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

Example:
group_by
enum<string>[]

Group by specified fields

Available options:
user_id,
api_key_id

Response

200 - application/json

OK

object
any
required
data
object[]
required
has_more
boolean
required

Whether there are more pages

next_page
string | null
required

Cursor for next page, null if no more pages