Start an analysis
Create one analysis run. Async - poll with GET /api/agent/analyses/. scanType is required and explicit: “starter” costs nothing, “deep” consumes paid account quota. clientRunId is your idempotency key: re-POSTing the same value replays the existing run. Without workspace, a deep scan (not publish) from a key with agency:write whose account is a member of an Agency workspace that can run scans, and is not in Personal mode, starts as a client project in that workspace instead: the response then carries workspace “agency” and a workspaceNote, has the Agency report shape (reportId, no run id), and is polled with GET /api/agent/agency/reports/. Send workspace “personal” to keep the scan on the account’s own deep scans. A clientRunId already used keeps its original workspace.
Authorizations
Body
Every field an analysis request can carry. Nothing is required here - CreateAnalysisRequest and BatchAnalysisItem each add their own required list, because a batch item may inherit scanType from the batch while a standalone create must state it.
Where the scan runs. Omit it and a deep scan from a key with agency:write, on an account in an Agency workspace outside Personal mode, starts as a client project there; a starter scan stays personal. "personal" keeps the scan on the account's own deep scans. "agency" asks for the client project explicitly. Any other value is 400 INVALID_WORKSPACE.
personal, agency Response
Run created (or replayed via clientRunId). When the scan started as a client project the body is the Agency report shape instead (see AgencyReportStatus) with workspace "agency".
- Option 1
- Option 2
Progress of the core export sections. The four name arrays partition required, so a poller decides what to do next by reading them rather than by parsing status: anything in processing means keep polling, anything in failed means call enrich again, and missing with nothing processing means enrichment was never started for it.