Explain an execution: plan, policy decisions, grant, receipt
const url = 'https://api.trustysweep.com/v1/graph/explain/example';const options = {method: 'GET', headers: {cookie: 'sweep_session=<sweep_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.trustysweep.com/v1/graph/explain/example \ --cookie sweep_session=<sweep_session>Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”OK
object
Prefixed ULID (exe_…)
A Shadow Sweep plan: a low-cost logical preflight built from metadata, hashes and provider revision markers. Never mutates provider state.
object
Prefixed ULID (pln_…)
object
object
Prefixed ULID (ast_…)
Prefixed ULID (src_…)
object
Prefixed ULID (ast_…)
object
object
object
Deterministic SHA-256 over material fields; any material change produces a new hash and requires fresh authorization.
Versioned user delegation grant constraining what a principal may do on behalf of a user.
object
Prefixed ULID (grt_…)
Durable, tamper-evident execution receipt signed with the platform Ed25519 key published at /.well-known/sweep-receipts.json.
object
Prefixed ULID (rcp_…)
Prefixed ULID (exe_…)
Prefixed ULID (pln_…)
object
Sha256 of canonical JSON of the receipt without hash/signature
object
Base64url Ed25519 signature over hash
Example
{ "execution_id": "exe_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "plan": { "planId": "pln_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "planVersion": "1", "actor": { "type": "user" }, "intent": "sweep", "operationClasses": [ "discover" ], "sourceMarkers": [ { "provider": "google_gmail", "kind": "history_id" } ], "objects": [ { "assetId": "ast_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "sourceId": "src_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "provider": "google_gmail", "storageClass": "preserve", "actions": [ "preserve" ] } ], "excluded": [ { "assetId": "ast_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "reason": "low_confidence" } ], "destination": { "provider": "google_gmail", "permissionMapping": "preserve_where_supported" }, "policy": { "decision": "allow", "requiredApprovals": [ "human_user" ] }, "meter": { "currency": "usd" }, "state": "draft" }, "policy_decisions": [ { "decision": "allow", "riskClass": "read" } ], "grant": { "id": "grt_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "status": "active", "operations": [ "discover" ], "actions": [ "read_inventory" ], "requireHumanApprovalAbove": "read" }, "receipt": { "receiptVersion": "1", "receiptId": "rcp_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "executionId": "exe_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "planId": "pln_01J8Z3K9M2Q4R6S8T0V2W4X6Y8", "actor": { "type": "user" }, "objects": [ { "status": "completed" } ], "before": [ { "provider": "google_gmail" } ], "after": [ { "provider": "google_gmail" } ], "signature": { "alg": "Ed25519" } }}Headers
Section titled “Headers”Requests allowed in the current window.
Requests remaining in the current window.
Seconds until the window resets.
Validation failed
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}Unauthenticated
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}Forbidden / action denied / step-up required
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}Not found
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}Rate limited
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}Headers
Section titled “Headers”Seconds to wait before retrying.
Requests allowed in the current window.
Requests remaining in the current window.
Seconds until the window resets.
Internal error
RFC 9457 problem details.
object
Machine-readable error code from errors.json
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "path": "example", "message": "example" } ]}