Outcome
List all customer accounts in the authorized workspace, ordered by latest update and then name. There is no pagination; the request can create the local workspace identity mirror.
Before you start
- Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
- The published application permission is workspace:read. Discover a granted Success workspace and bind that exact resource. Supplied identifiers do not grant access.
- Authorize the documented mirror, notification, metering, privacy or archival effects before CLI --confirm or MCP confirm:true. A GET request can initialize a local mirror.
Discover the target
topolo whoami --json
topolo actions get app_topolo_success.accounts.list --detail --json
topolo resources topolo-success --json
topolo workspaces list topolo-success --json
- Select the exact granted workspace id as SUCCESS_WORKSPACE_ID. Fixture ids authorize no live operation.
- Discover account ids through accounts.list or the reviewed accounts.create response.
Request
GET /api/accounts
Save action input as payload.json. Inspect the plan for the exact path, query and body. Set SUCCESS_WORKSPACE_ID from granted resource discovery.
Inspect and test this action in the signed action console, then perform the verification below.
Input fields
Supply an empty input object; credential and resource context are separate.
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}
Effects
- After static permission and platform workspace authorization, the route inserts the local identity-only workspace mirror if absent; even GET listing is a potential write.
- Selects accounts by both organization and verified workspace, ordered updated_at descending and name ascending; empty results are valid.
Interpret the response
Use response path $.accounts[].id for success_account. An empty list does not discover a target.
Use accounts[].id from the authorized response for health, milestone and task actions. An empty array discovers no account. Check risk_status and health_score against each account risk_threshold; this is not a timeline or milestone list.
The success schema below was checked against captured handler responses. Delegated Auth profile fields and sanitized notification payload fields can vary; exact outer envelopes and SQL row fields are source-reviewed. Error examples retain their actual refusal shapes.
Success schema:
{
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Source-defined string field."
},
"organization_id": {
"type": "string",
"description": "Source-defined string field."
},
"workspace_id": {
"type": "string",
"description": "Source-defined string field."
},
"created_at": {
"type": "string",
"description": "Source-defined string field."
},
"updated_at": {
"type": "string",
"description": "Source-defined string field."
},
"name": {
"type": "string",
"description": "Source-defined string field."
},
"owner_user_id": {
"type": "string",
"description": "Source-defined string field."
},
"health_score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"risk_threshold": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"risk_status": {
"type": "string",
"enum": [
"healthy",
"at_risk"
]
},
"renewal_at": {
"anyOf": [
{
"type": "string",
"description": "Source-defined string field."
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"organization_id",
"workspace_id",
"created_at",
"updated_at",
"name",
"owner_user_id",
"health_score",
"risk_threshold",
"risk_status",
"renewal_at"
],
"additionalProperties": false
}
}
},
"required": [
"accounts"
],
"additionalProperties": false
}
Worked examples
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Refused examples demonstrate boundaries and must not be executed as successful workflows.
Successful request
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: accounts.list.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_success.accounts.list --data @payload.json --json
topolo actions plan app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_success.accounts.list",
"input": {},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"accounts": []
}
HTTP 200. Use accounts[].id from the authorized response for health, milestone and task actions. An empty array discovers no account. Check risk_status and health_score against each account risk_threshold; this is not a timeline or milestone list.
Refused request · HTTP 403
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: workspace:read missing.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_success.accounts.list --data @payload.json --json
topolo actions plan app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"success": false,
"error": {
"code": "action_permission_required",
"message": "Action \"accounts.list\" requires permission \"workspace:read\".",
"action": "accounts.list"
}
}
HTTP 403. The handler refused this request. Resolve its exact cause before retrying; input validation can reject an invalid fixture before it reaches the handler.
Another supported request
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: empty list creates the identity mirror.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_success.accounts.list --data @payload.json --json
topolo actions plan app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_success.accounts.list",
"input": {},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"accounts": []
}
HTTP 200. Use accounts[].id from the authorized response for health, milestone and task actions. An empty array discovers no account. Check risk_status and health_score against each account risk_threshold; this is not a timeline or milestone list.
Another supported request
Actual exported Worker response with real local SQLite D1, synthetic Auth/grants and simulated Notify/Nexus/archive transport; no live delivery or deployment proof. Captured scenario: populated account list.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_success.accounts.list --data @payload.json --json
topolo actions plan app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_success.accounts.list --resource-type workspace --resource-id "$SUCCESS_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_success.accounts.list",
"input": {},
"resourceType": "workspace",
"resourceId": "<identifier returned by granted resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"accounts": [
{
"id": "successacct_854a49b4-6ddd-4b79-8325-8299814747e6",
"organization_id": "org_success_fixture",
"workspace_id": "ws_success_fixture",
"name": "Example Customer",
"owner_user_id": "usr_success_fixture",
"health_score": 100,
"risk_threshold": 40,
"risk_status": "healthy",
"renewal_at": "2027-03-31T00:00:00Z",
"created_at": "2026-10-04T05:10:03.146Z",
"updated_at": "2026-10-04T05:10:03.146Z"
}
]
}
HTTP 200. Use accounts[].id from the authorized response for health, milestone and task actions. An empty array discovers no account. Check risk_status and health_score against each account risk_threshold; this is not a timeline or milestone list.
Verify the result
- Use accounts[].id from the authorized response for health, milestone and task actions. An empty array discovers no account.
- Check risk_status and health_score against each account risk_threshold; this is not a timeline or milestone list.
Errors and recovery
invalid_action_input(HTTP 400): Correct only the input paths reported by the runtime or CLI validator; retain action id and exact context.action_permission_required(HTTP 403): The verified credential lacks the action permission. Stop this action and request the appropriate authorized grant; an identifier or organization ownership does not grant it.organization_required(HTTP 403): Verify the authorized organization context; personal scope cannot operate on organization-owned Success data.workspace_required(HTTP 400): Discover an authorized app-scoped workspace and pass its resource binding. API keys without a workspace resource are refused.workspaces_unavailable(HTTP 503): Preserve the request id and report unavailable platform grants or database binding; do not invent a default workspace.
Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.
Recovery boundary
Listing can create the parent identity mirror; no published action removes only that mirror. Do not archive a workspace solely to undo a listing.
Related actions
- Create Success customer account: Create a new account in the authorized workspace with initial health 100, healthy status and risk threshold 40 unless specified. Repeated requests create new ids; name is not an idempotency key.
- Record Success account health: Save a score from 0 to 100, append history and enqueue a health-change event on every call, including identical repeats. Downward threshold crossing creates a risk; upward recovery resolves open risks.
- Create Success account milestone: Create a new pending milestone for an account in the authorized workspace, using the account owner as recipient. Creation creates a new id on every call and emits no milestone-reached notification.
- Create Success playbook task: Create a pending task for an authorized account with a required ISO due time. Immediate creation does not complete the task or send its due reminder; scheduled processing handles due events later.
Evidence
Actual exported Worker responses captured with real local SQLite D1 and all committed migrations, synthetic Auth identity/grants, simulated Notify/Nexus and canonical archive transport. Fixture ids are examples only. No live notification delivery, metering acceptance, privacy erasure, workspace archive or deployment is established by these tests. Capture digests and test scenarios are retained in the source fixture records.