You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a8274d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/out.openapi.yaml
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,10 @@ components:
116
116
example: 0.015
117
117
format: 'double'
118
118
type: 'number'
119
+
workspace_id:
120
+
description: 'ID of the workspace this activity is attributed to. Only present when `group_by=workspace` is passed; the response is then split per workspace. Activity recorded before workspace resolution existed is attributed to the account default workspace.'
description: 'ID of the workspace this generation is attributed to. Null for accounts without workspaces. Generations created before workspace resolution existed are attributed to the account default workspace.'
9441
+
example: '550e8400-e29b-41d4-a716-446655440000'
9442
+
type:
9443
+
- 'string'
9444
+
- 'null'
9434
9445
required:
9435
9446
- 'id'
9436
9447
- 'upstream_id'
@@ -9473,6 +9484,7 @@ components:
9473
9484
- 'user_agent'
9474
9485
- 'http_referer'
9475
9486
- 'data_region'
9487
+
- 'workspace_id'
9476
9488
type: 'object'
9477
9489
required:
9478
9490
- 'data'
@@ -25300,7 +25312,7 @@ openapi: '3.1.0'
25300
25312
paths:
25301
25313
/activity:
25302
25314
get:
25303
-
description: 'Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
25315
+
description: 'Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.'
25304
25316
operationId: 'getUserActivity'
25305
25317
parameters:
25306
25318
- description: 'Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).'
@@ -25327,6 +25339,24 @@ paths:
25327
25339
description: 'Filter by org member user ID. Only applicable for organization accounts.'
25328
25340
example: 'user_abc123'
25329
25341
type: 'string'
25342
+
- description: 'Set to ''workspace'' to split each row per workspace and include `workspace_id` on every item. Omitted by default, in which case rows are aggregated across workspaces (by date, model, and endpoint) and `workspace_id` is not returned β preserving the historical response shape.'
25343
+
in: 'query'
25344
+
name: 'group_by'
25345
+
required: false
25346
+
schema:
25347
+
description: 'Set to ''workspace'' to split each row per workspace and include `workspace_id` on every item. Omitted by default, in which case rows are aggregated across workspaces (by date, model, and endpoint) and `workspace_id` is not returned β preserving the historical response shape.'
25348
+
enum:
25349
+
- 'workspace'
25350
+
example: 'workspace'
25351
+
type: 'string'
25352
+
- description: 'Filter by workspace ID (UUID). Returns only activity attributed to that workspace. The workspace must belong to the authenticated account.'
25353
+
in: 'query'
25354
+
name: 'workspace_id'
25355
+
required: false
25356
+
schema:
25357
+
description: 'Filter by workspace ID (UUID). Returns only activity attributed to that workspace. The workspace must belong to the authenticated account.'
25358
+
example: '550e8400-e29b-41d4-a716-446655440000'
25359
+
type: 'string'
25330
25360
responses:
25331
25361
'200':
25332
25362
content:
@@ -25400,6 +25430,7 @@ paths:
25400
25430
summary: 'Get user activity grouped by endpoint'
25401
25431
tags:
25402
25432
- 'Analytics'
25433
+
x-speakeasy-max-method-params: 5
25403
25434
parameters:
25404
25435
- $ref: "#/components/parameters/AppIdentifier"
25405
25436
- $ref: "#/components/parameters/AppDisplayName"
@@ -25692,7 +25723,7 @@ paths:
25692
25723
- format: 'double'
25693
25724
type: 'number'
25694
25725
type: 'array'
25695
-
description: 'Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` β numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` β Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` β workspace UUID, not the workspace name; `app` β numeric app ID, not the app title; `model` β permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.'
25726
+
description: 'Filter value (scalar or array depending on operator). Several dimensions are enriched in responses (returned as human-readable labels), but filters must use the underlying ID: `api_key_id` β numeric ID (from generation metadata) or key hash (64-char hex from GET /api/v1/keys, resolved server-side); `user` β Clerk user ID (e.g. "user_abc123"), not the display name; `workspace` β workspace UUID, not the workspace name (filtering or grouping by the account default workspace also covers activity recorded before workspace resolution existed, which is attributed to that default workspace); `app` β numeric app ID, not the app title; `model` β permaslug (e.g. "openai/gpt-4o"), not the display name. Other dimensions (provider, origin, country, etc.) are not enriched and accept the value as returned.'
0 commit comments