Workspace activity trends and period comparison
GET /v1/activity
GET /v1/activity
Non-billable read requiring usage:read. Filters recorded metered attempts by an inclusive/exclusive UTC range of at most 366 days. Hourly charts support at most 31 days. Current and previous equal-duration summaries, top-eight groups plus Other, and zero-filled series use the same filters. All queries are isolated to the credential workspace. Member labels are available only to first-party sessions. Missing latency stays null. Spend includes current non-error reservations and does not change workspace quota or balance.
Authorization
This operation requires a bearer credential. The description defines additional role, scope or first-party-session restrictions; an API key does not grant those permissions by itself.
Parameters
| Property | Type | Required | Details |
|---|---|---|---|
from (query) | string | yes | Inclusive UTC ISO timestamp. The range must be positive and at most 366 days. |
to (query) | string | yes | Exclusive UTC ISO timestamp. Future calendar boundaries are allowed. |
granularity (query) | "day" ∣ "hour" | no | UTC buckets. Hourly charts support at most 31 days. |
group_by (query) | "tool" ∣ "key" ∣ "member" ∣ "connection" ∣ "channel" ∣ "environment" ∣ "status" | no | |
tool (query) | string ∣ null | no | |
key_id (query) | string ∣ null | no | |
member_id (query) | string ∣ null | no | |
connection_id (query) | string ∣ null | no | |
channel (query) | "rest" ∣ "mcp" ∣ null | no | |
environment (query) | "live" ∣ "test" ∣ null | no | |
status (query) | "reserved" ∣ "success" ∣ "error" ∣ null | no | |
q (query) | string ∣ null | no | Literal substring search of request ID or tool metadata. |
Request body
No request body.
Responses
| HTTP | Details | Type |
|---|---|---|
| 200 | Successful Response | application/json: ActivityReport |
| 401 | Unauthorized | application/problem+json: ProblemDetails |
| 403 | Forbidden | application/problem+json: ProblemDetails |
| 404 | Not Found | application/problem+json: ProblemDetails |
| 422 | Unprocessable Entity | application/problem+json: ProblemDetails |
| 503 | Service Unavailable | application/problem+json: ProblemDetails |
Response: ActivityReport
| Property | Type | Required | Details |
|---|---|---|---|
from | string | yes | |
to | string | yes | |
granularity | "day" ∣ "hour" | yes | |
group_by | "tool" ∣ "key" ∣ "member" ∣ "connection" ∣ "channel" ∣ "environment" ∣ "status" | yes | |
totals | ActivityMetrics | yes | |
previous | ActivityComparison | yes | Immediately preceding equal-duration interval with the same filters. |
groups | ActivityGroup[] | yes | Top eight groups by requests, followed by Other when needed. |
buckets | ActivityBucket[] | yes | Zero-filled UTC buckets with the same group identifiers as groups. |
truncated_groups | boolean | yes |
Full schema
{
"properties": {
"from": {
"type": "string",
"format": "date-time",
"title": "From"
},
"to": {
"type": "string",
"format": "date-time",
"title": "To"
},
"granularity": {
"type": "string",
"enum": [
"day",
"hour"
],
"title": "Granularity"
},
"group_by": {
"type": "string",
"enum": [
"tool",
"key",
"member",
"connection",
"channel",
"environment",
"status"
],
"title": "Group By"
},
"totals": {
"$ref": "#/components/schemas/ActivityMetrics"
},
"previous": {
"$ref": "#/components/schemas/ActivityComparison",
"description": "Immediately preceding equal-duration interval with the same filters."
},
"groups": {
"items": {
"$ref": "#/components/schemas/ActivityGroup"
},
"type": "array",
"title": "Groups",
"description": "Top eight groups by requests, followed by Other when needed."
},
"buckets": {
"items": {
"$ref": "#/components/schemas/ActivityBucket"
},
"type": "array",
"title": "Buckets",
"description": "Zero-filled UTC buckets with the same group identifiers as groups."
},
"truncated_groups": {
"type": "boolean",
"title": "Truncated Groups"
}
},
"type": "object",
"required": [
"from",
"to",
"granularity",
"group_by",
"totals",
"previous",
"groups",
"buckets",
"truncated_groups"
],
"title": "ActivityReport"
}This page is generated from OpenAPI; examples are schemas, not a fabricated successful response.