Skip to content

Commit 1d14871

Browse files
author
OpenRouter SDK Bot
committed
chore: update OpenAPI spec [sdk-bot]
1 parent 9d1d438 commit 1d14871

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ components:
9494
example: 0.015
9595
format: 'double'
9696
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.'
99+
example: '550e8400-e29b-41d4-a716-446655440000'
100+
type: 'string'
97101
required:
98102
- 'date'
99103
- 'model'
@@ -9083,6 +9087,7 @@ components:
90839087
usage: 0.0015
90849088
user_agent: 'Mozilla/5.0'
90859089
web_search_engine: 'exa'
9090+
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
90869091
properties:
90879092
data:
90889093
description: 'Generation data'
@@ -9351,6 +9356,12 @@ components:
93519356
type:
93529357
- 'string'
93539358
- 'null'
9359+
workspace_id:
9360+
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'
93549365
required:
93559366
- 'id'
93569367
- 'upstream_id'
@@ -9393,6 +9404,7 @@ components:
93939404
- 'user_agent'
93949405
- 'http_referer'
93959406
- 'data_region'
9407+
- 'workspace_id'
93969408
type: 'object'
93979409
required:
93989410
- 'data'
@@ -25119,7 +25131,7 @@ openapi: '3.1.0'
2511925131
paths:
2512025132
/activity:
2512125133
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.'
2512325135
operationId: 'getUserActivity'
2512425136
parameters:
2512525137
- description: 'Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).'
@@ -25146,6 +25158,24 @@ paths:
2514625158
description: 'Filter by org member user ID. Only applicable for organization accounts.'
2514725159
example: 'user_abc123'
2514825160
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'
2514925179
responses:
2515025180
'200':
2515125181
content:
@@ -25219,6 +25249,7 @@ paths:
2521925249
summary: 'Get user activity grouped by endpoint'
2522025250
tags:
2522125251
- 'Analytics'
25252+
x-speakeasy-max-method-params: 5
2522225253
/analytics/meta:
2522325254
get:
2522425255
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:
2549925530
- format: 'double'
2550025531
type: 'number'
2550125532
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.'
2550325534
required:
2550425535
- 'field'
2550525536
- 'operator'

0 commit comments

Comments
 (0)