Bulk integration connection readiness for an agent
Single call replacing N per-integration resolutions. blocks_run/errors are the authoritative run-blocking verdict: the run-kickoff 409 (run semantics, includeInert false + required-auth carve-out), plus agent_not_active when the SPACE has switched the agent off. This is a READ and answers 200 either way — the execution doors answer 404 agent_not_active_in_space for the same state, and a panel that 404s cannot tell anyone what to fix. integrations[] lists every declared integration with its management verdict (includeInert true), in the resolver's own vocabulary (source + error_code), so the Connexions tab and the launch badge share one source of truth.
/api/agents/{scope}/{name}/connection-readinessCookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
Package scope (e.g. @myorg)
^@[a-z0-9][a-z0-9-]*$Package name
Query Parameters
Which agent definition to assess: draft (the live editor working copy), published (the latest published version), or a version spec (exact version, dist-tag, or semver range). Omitted judges EXACTLY what the agent detail page rendered — the draft for a caller who may WRITE the agent, otherwise the latest published version, and the draft in read-only when nothing is published — so the badge can never 404 a page that just loaded. draft named explicitly requires that write authority and answers 403 draft_not_writable otherwise. Pass a concrete version to get the same run-blocking verdict the run would produce for it (issue #770), so the modal and badge never disagree with the actual run. Ignored for system agents.
Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidSpace ID. Required for space-scoped routes (agents, runs, schedules, and space-scoped module routes). Not needed for API key auth (space resolved from key).
curl -X GET "https://your-instance/api/agents/string/string/connection-readiness"{
"blocks_run": true,
"errors": [
{
"field": "string",
"message": "string",
"title": "string",
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string",
"code": "not_connected"
}
],
"integrations": [
{
"integration_package_id": "string",
"run_blocking": true,
"resolution": {
"source": "admin_pin",
"error_code": "not_connected",
"resolved_connection_ids": [
"string"
],
"resolved_missing_scopes": [
"string"
],
"admin_pinned_connection_ids": [
"string"
],
"member_pinned_connection_ids": [
"string"
],
"org_default_connection_ids": [
"string"
],
"org_default_enforced": true,
"can_add_connection": true,
"candidates": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"auth_key": "string",
"account_id": "string",
"label": "string",
"owner_user_id": "string",
"owner_end_user_id": "string",
"owner_name": "string",
"scopes_granted": [
"string"
],
"shared_with_org": true,
"needs_reconnection": true,
"missing_scopes": [
"string"
],
"is_own": true
}
]
}
}
]
}{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}