Outcome
Reads workspace data without changing service state.
Before you start
- Verify identity and the intended environment with topolo whoami before selecting an explicitly authorized organization.
- Discover the published workspace:read permission.
- Discover an accessible Blog workspace and set WORKSPACE_ID to that exact returned id. Pass workspace binding separately from action input.
Discover the target
topolo whoami --json
topolo actions get app_topolo_blog.analytics.overview --detail --json
topolo workspaces list topolo-blog --json
Request
GET /api/analytics
Inspect parameters and test this action.
Input fields
| Field | Required | Meaning |
|---|---|---|
days | No | Readership window. The handler clamps it to 1–90 days and forwards the separate configured Insights workspace. |
Worked examples
Documentation source snapshot: TopoloBlog 80d6961207a4ca688b7e9edb947dda720051ad32 (tree 534a285e739a27c1ea9e2c187ce8863824f6c590). The examples retain local fixture captures labeled baseline 2c64c35bf291a47bb3a0c597dcea46ccb47e2a08; their exact executed working tree is not established here. They were not rerun at this documentation snapshot. The production catalog marker topolo.app.json is not a deployed worker revision. Recovery metadata read-back on 18 October 2026 associates the current production Blog API and web deployments with this source through the 17 October release receipt. This establishes applicable deployed source; it does not make these examples current production captures.
Actual exported Blog Worker, local Miniflare D1/R2 and all committed migrations. Auth, Insights, DNS, Cloudflare for SaaS, error reporting, queue and scheduled-workflow boundaries are synthetic and outbound fetch is sealed. No deployed provider, delivery or scheduled execution outcome is established. English examples use the packaged test translation release; article checks and widget labels follow the verified request locale. No live translation release is proved by this fixture.
Save a reviewed input as payload.json. Replace fixture identifiers using discovery in the authorized context.
topolo actions validate app_topolo_blog.analytics.overview --data @payload.json --json
topolo actions plan app_topolo_blog.analytics.overview --resource-type workspace --resource-id "$WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_blog.analytics.overview --resource-type workspace --resource-id "$WORKSPACE_ID" --data @payload.json --detail --json
MCP uses the same reviewed input. Replace the synthetic workspace resourceId through discovery when a binding is shown:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_blog.analytics.overview",
"input": {
"days": 30
},
"resourceType": "workspace",
"resourceId": "ws_blog_fixture"
}
}
{
"tool": "topolo_read_action",
"arguments": {
"actionId": "app_topolo_blog.analytics.overview",
"input": {
"days": 30
},
"resourceType": "workspace",
"resourceId": "ws_blog_fixture",
"detail": true
}
}
Refused request · HTTP 409 · insights_workspace_not_linked
Input · payload.json:
{
"days": 30
}
Source-reviewed illustration (retained local fixture response; not a current production capture):
{
"error": "insights_workspace_not_linked"
}
Keep this analytics attempt read-only. Read app_topolo_blog.settings.get for the selected Blog workspace. If insightsWorkspaceId is empty, have a separately authorized Blog configuration owner with workspace:write discover the intended Insights workspace and retain the four current editorial/SEO values. Validate, plan and confirm app_topolo_blog.settings.update with those values and the intended insightsWorkspaceId; an empty string unlinks and omission keeps the existing link. Re-read settings.get to verify the link, then retry analytics under the reader's own Insights access. Linking grants no Insights permission. A refusal is not zero readership; do not change the link without authorization.
Successful response · HTTP 200
Input · payload.json:
{
"days": 30
}
Source-reviewed illustration (retained local fixture response; not a current production capture):
{
"data": {
"days": 30,
"views": 42,
"uniqueReaders": 17,
"fixture": true
}
}
Validate the response against outputSchema and confirm it belongs to the selected resource context.
Refused request · HTTP 503 · insights_not_configured
Input · payload.json:
{}
Source-reviewed illustration (retained local fixture response; not a current production capture):
{
"error": "insights_not_configured"
}
Restore the specifically named dependency or configuration; a refused analytics response is not zero readership.
Refused request · HTTP 401 · auth_error
Input · payload.json:
{
"days": 30
}
Source-reviewed illustration (retained local fixture response; not a current production capture):
{
"error": "Authentication token required"
}
Sign in again in the intended environment using a valid credential. Preserve the returned handler message; SDK auth_error can represent several authentication refusals.
Verify the result
- Validate the response against outputSchema and confirm it belongs to the selected resource context.
- Validate the returned analytics payload and selected Blog context. Read app_topolo_blog.settings.get for that same Blog workspace and verify insightsWorkspaceId identifies the intended separately discovered Insights workspace. An authorized settings change preserves the four required editorial/SEO values and requires its own confirmed plan. Re-read the link before retrying analytics; each reader still needs their own Insights access.
Errors and recovery
- HTTP 503 ·
insights_not_configured: Restore the specifically named dependency or configuration; a refused analytics response is not zero readership. - HTTP 409 ·
insights_workspace_not_linked: Keep this analytics attempt read-only. Read app_topolo_blog.settings.get for the selected Blog workspace. If insightsWorkspaceId is empty, have a separately authorized Blog configuration owner with workspace:write discover the intended Insights workspace and retain the four current editorial/SEO values. Validate, plan and confirm app_topolo_blog.settings.update with those values and the intended insightsWorkspaceId; an empty string unlinks and omission keeps the existing link. Re-read settings.get to verify the link, then retry analytics under the reader's own Insights access. Linking grants no Insights permission. A refusal is not zero readership; do not change the link without authorization. - HTTP 401 ·
auth_error: Sign in again in the intended environment using a valid credential. Preserve the returned handler message; SDK auth_error can represent several authentication refusals.
Inspect the raw handler error as well as the SDK code. These examples establish observed local refusals, not every possible provider failure.
Recovery boundary
This action does not change service state.
Evidence
Actual exported Blog Worker, local Miniflare D1/R2 and all committed migrations. Auth, Insights, DNS, Cloudflare for SaaS, error reporting, queue and scheduled-workflow boundaries are synthetic and outbound fetch is sealed. No deployed provider, delivery or scheduled execution outcome is established. English examples use the packaged test translation release; article checks and widget labels follow the verified request locale. No live translation release is proved by this fixture.
Documentation history
18 October 2026: Architecture reviewed the retained action guide against the pinned source declaration and named implementation boundaries, qualified local-capture provenance, and prepared paired human and agent amendments. This review does not record a product release, new fixture execution or publication.
2026-10-18: Architecture reaccepted this guide against the corrected published settings declarations and the retained 80D deployed-source association. The prior catalog/dependency content hold is resolved for this exact payload. Examples remain source-reviewed illustrations, not new production captures. No business settings or analytics request, guide publication or new deployment is recorded.