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 264abf9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/out.openapi.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -39440,7 +39440,7 @@ paths:
39440
39440
- $ref: "#/components/parameters/AppCategories"
39441
39441
/analytics/meta:
39442
39442
get:
39443
-
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.'
39443
+
description: 'Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
39444
39444
operationId: 'getAnalyticsMeta'
39445
39445
responses:
39446
39446
'200':
@@ -39590,7 +39590,7 @@ paths:
39590
39590
- $ref: "#/components/parameters/AppCategories"
39591
39591
/analytics/query:
39592
39592
post:
39593
-
description: 'Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
39593
+
description: 'Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
Copy file name to clipboardExpand all lines: docs/sdks/analytics/README.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ with OpenRouter(
62
62
63
63
## get_analytics_meta
64
64
65
-
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
65
+
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
66
66
67
67
### Example Usage
68
68
@@ -109,7 +109,7 @@ with OpenRouter(
109
109
110
110
## query_analytics
111
111
112
-
Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
112
+
Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Copy file name to clipboardExpand all lines: src/openrouter/analytics.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -281,7 +281,7 @@ def get_analytics_meta(
281
281
) ->operations.GetAnalyticsMetaResponse:
282
282
r"""Get available analytics metrics and dimensions
283
283
284
-
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
284
+
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
285
285
286
286
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
r"""Get available analytics metrics and dimensions
410
410
411
-
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
411
+
Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
412
412
413
413
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
414
414
This is used to track API usage per application.
@@ -558,7 +558,7 @@ def query_analytics(
558
558
) ->operations.QueryAnalyticsResponse:
559
559
r"""Query analytics data
560
560
561
-
Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
561
+
Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
562
562
563
563
:param metrics:
564
564
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
758
+
Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
759
759
760
760
:param metrics:
761
761
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
0 commit comments