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 1d14871
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/in.openapi.yaml
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,10 @@ components:
94
94
example: 0.015
95
95
format: 'double'
96
96
type: 'number'
97
+
workspace_id:
98
+
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.'
9361
+
example: '550e8400-e29b-41d4-a716-446655440000'
9362
+
type:
9363
+
- 'string'
9364
+
- 'null'
9354
9365
required:
9355
9366
- 'id'
9356
9367
- 'upstream_id'
@@ -9393,6 +9404,7 @@ components:
9393
9404
- 'user_agent'
9394
9405
- 'http_referer'
9395
9406
- 'data_region'
9407
+
- 'workspace_id'
9396
9408
type: 'object'
9397
9409
required:
9398
9410
- 'data'
@@ -25119,7 +25131,7 @@ openapi: '3.1.0'
25119
25131
paths:
25120
25132
/activity:
25121
25133
get:
25122
-
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.'
25134
+
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.'
25123
25135
operationId: 'getUserActivity'
25124
25136
parameters:
25125
25137
- description: 'Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).'
@@ -25146,6 +25158,24 @@ paths:
25146
25158
description: 'Filter by org member user ID. Only applicable for organization accounts.'
25147
25159
example: 'user_abc123'
25148
25160
type: 'string'
25161
+
- 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.'
25162
+
in: 'query'
25163
+
name: 'group_by'
25164
+
required: false
25165
+
schema:
25166
+
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.'
25167
+
enum:
25168
+
- 'workspace'
25169
+
example: 'workspace'
25170
+
type: 'string'
25171
+
- description: 'Filter by workspace ID (UUID). Returns only activity attributed to that workspace. The workspace must belong to the authenticated account.'
25172
+
in: 'query'
25173
+
name: 'workspace_id'
25174
+
required: false
25175
+
schema:
25176
+
description: 'Filter by workspace ID (UUID). Returns only activity attributed to that workspace. The workspace must belong to the authenticated account.'
25177
+
example: '550e8400-e29b-41d4-a716-446655440000'
25178
+
type: 'string'
25149
25179
responses:
25150
25180
'200':
25151
25181
content:
@@ -25219,6 +25249,7 @@ paths:
25219
25249
summary: 'Get user activity grouped by endpoint'
25220
25250
tags:
25221
25251
- 'Analytics'
25252
+
x-speakeasy-max-method-params: 5
25222
25253
/analytics/meta:
25223
25254
get:
25224
25255
description: 'Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
@@ -25499,7 +25530,7 @@ paths:
25499
25530
- format: 'double'
25500
25531
type: 'number'
25501
25532
type: 'array'
25502
-
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.'
25533
+
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