Topolo Docs Topolo Platform
Open workspace

Export Agent organization data

Exports Agent-owned records across core, runtime, knowledge and event stores for the authorized organization. This reads organization data and does not erase it. Secrets are redacted; object binaries, vectors, platform-owned identity and global definitions are excluded.

Export Agent organization data

Outcome

Exports Agent-owned records across core, runtime, knowledge and event stores for the authorized organization. This reads organization data and does not erase it. Secrets are redacted; object binaries, vectors, platform-owned identity and global definitions are excluded.

Before you start

  • Verify the intended environment, authenticated identity and organization before discovery.
  • Discover the published privacy:read application permission and inspect the credential-scoped action contract.
  • Use the explicitly authorized organization id. This organization export spans Agent stores rather than one workspace.
  • Fixture identifiers and simulated responses confer no live access. Replace identifiers through granted resource discovery.

Discover the target

  • topolo whoami --json
  • topolo actions get app_topolo_agent.organizations.data.export --detail --json
  • Select the organization.id returned by identity/context discovery and verify that this organization export is intended.

Request

GET /api/organizations/{organizationId}/data

Input fields

FieldRequiredMeaning and constraints
organizationIdYesExplicit, authorized organization identifier from identity/context discovery; the export spans this organization. Type: string. minLength: 1

Worked examples

Worked response 1 · HTTP 200

Actual exported read handlers and replayed SQLite migrations. Auth directory, service-token, R2 object storage and Durable Object storage boundaries are simulated; session response serialization executes the actual AgentSession.onRequest method. Egress is sealed. No deployed/provider outcome or live access is demonstrated.

Input · payload.json:

{
  "organizationId": "org_docs_fixture"
}

CLI:

topolo actions validate app_topolo_agent.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_agent.organizations.data.export --data @payload.json --json
topolo actions call app_topolo_agent.organizations.data.export --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_agent.organizations.data.export",
    "input": {
      "organizationId": "org_docs_fixture"
    }
  }
}

Captured local response · HTTP 200:

{
  "success": true,
  "data": {
    "organization_id": "org_docs_fixture",
    "exported_at": "2026-10-07T00:00:00.000Z",
    "credentials_included": false,
    "object_binaries_included": false,
    "vector_values_included": false,
    "stores": {
      "core": {
        "agent_pack_roles": [],
        "agent_pack_connections": [],
        "organization_execution_policies": [],
        "person_profile_style_snapshots": [],
        "person_profile_sources": [],
        "person_profiles": [
          {
            "id": "profile_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "subject_user_id": null,
            "owner_user_id": "usr_docs_fixture",
            "display_name": "Fixture author",
            "description": null,
            "status": "draft",
            "visibility": "private",
            "linked_persona_id": null,
            "linked_agent_id": null,
            "voice_profile_id": null,
            "writing_style_json": {},
            "speaking_style_json": {},
            "persona_rules_json": {},
            "usage_policy_json": {},
            "authorization_evidence_json": "[REDACTED]",
            "created_by_user_id": null,
            "created_at": 1,
            "updated_at": 1,
            "archived_at": null
          }
        ],
        "agent_personas": [
          {
            "id": "persona_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "owner_user_id": "usr_docs_fixture",
            "name": "Fixture writing voice",
            "description": null,
            "persona": null,
            "point_of_view": "first",
            "target_audience": null,
            "tone_formality": 3,
            "tone_boldness": 3,
            "tone_warmth": 3,
            "tone_humor": 2,
            "do_list": [],
            "dont_list": [],
            "banned_phrases": [],
            "preferred_vocabulary": [],
            "voice_provider": null,
            "voice_id": null,
            "voice_speed": null,
            "voice_pitch": null,
            "voice_emotion": null,
            "avatar_provider": null,
            "avatar_id": null,
            "avatar_image_url": null,
            "avatar_video_url": null,
            "model_provider": null,
            "model_id": null,
            "visibility": "private",
            "is_default": 0,
            "is_archived": 0,
            "created_by_user_id": null,
            "created_at": 1,
            "updated_at": 1,
            "capabilities": []
          }
        ],
        "agent_team_members": [],
        "agent_relationships": [
          {
            "id": "relationship_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "parent_agent_id": "agent_docs_fixture",
            "child_agent_id": "agent_docs_fixture",
            "relationship_type": "peer",
            "role": null,
            "owner_principal_id": "usr_docs_fixture",
            "policy_id": null,
            "delegation_policy": {},
            "created_by_principal_id": "usr_docs_fixture",
            "created_at": 1,
            "updated_at": 1
          }
        ],
        "agent_teams": [
          {
            "id": "team_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "name": "Research team",
            "description": null,
            "owner_principal_id": "usr_docs_fixture",
            "accountable_steward_user_id": "usr_docs_fixture",
            "policy_id": null,
            "team_policy": {},
            "status": "active",
            "created_by_principal_id": "usr_docs_fixture",
            "created_at": 1,
            "updated_at": 1,
            "archived_at": null
          }
        ],
        "agent_execution_assignments": [],
        "agent_access_grants": [
          {
            "id": "grant_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "agent_id": "agent_docs_fixture",
            "target_type": "user",
            "target_id": "usr_reader_fixture",
            "permissions": [
              "discover",
              "view"
            ],
            "created_by_principal_id": "usr_docs_fixture",
            "created_at": 1,
            "revoked_by_principal_id": null,
            "revoked_at": null
          }
        ],
        "agent_versions": [
          {
            "id": "version_docs_fixture",
            "agent_id": "agent_docs_fixture",
            "organization_id": "org_docs_fixture",
            "version_number": 1,
            "name": "Research assistant",
            "display_name": null,
            "role": "Research",
            "description": null,
            "model": "model_docs_fixture",
            "executor_type": "topolo-hosted",
            "service_grants": [],
            "policy_id": null,
            "config": {},
            "supervisor_agent_id": null,
            "status": "published",
            "created_by_principal_id": "usr_docs_fixture",
            "created_at": 1,
            "published_at": null,
            "superseded_at": null,
            "archived_at": null,
            "persona_id": null,
            "capabilities": [],
            "execution_assignments": []
          }
        ],
        "app_onboarding_status": [],
        "app_profiles": [],
        "agents": [
          {
            "id": "agent_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "template_id": null,
            "principal_id": "usr_docs_fixture",
            "accountable_user_id": "usr_docs_fixture",
            "name": "Research assistant",
            "display_name": null,
            "role": "Research",
            "description": null,
            "model": "model_docs_fixture",
            "status": "published",
            "executor_type": "topolo-hosted",
            "service_grants": [],
            "policy_id": null,
            "config": {},
            "created_at": 1,
            "updated_at": 1,
            "owner_principal_id": "usr_docs_fixture",
            "accountable_steward_user_id": "usr_docs_fixture",
            "current_version_id": "version_docs_fixture",
            "supervisor_agent_id": null,
            "lifecycle_updated_at": null,
            "superseded_by_agent_id": null,
            "archived_at": null,
            "persona_id": null,
            "capabilities": [],
            "ownership_scope": "[REDACTED]",
            "visibility": "private"
          }
        ],
        "workspace_profiles": [],
        "agent_workspaces": []
      },
      "runtime": {
        "sdr_lead_events": [],
        "sdr_leads": [],
        "agent_evaluation_results": [],
        "agent_sandbox_runs": [],
        "agent_invocations": [],
        "agent_integration_contracts": [],
        "thread_attachments": [
          {
            "id": "attachment_docs_fixture",
            "thread_id": "thread_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "filename": "brief.txt",
            "content_type": "text/plain",
            "size_bytes": 13,
            "storage_key": "thread-attachments/org_docs_fixture/ws_docs_fixture/brief.txt",
            "visibility_scope": "[REDACTED]",
            "status": "ready",
            "created_by": "usr_docs_fixture",
            "created_at": 1
          },
          {
            "id": "attachment_binary_fixture",
            "thread_id": "thread_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "filename": "evidence.bin",
            "content_type": "application/octet-stream",
            "size_bytes": 4,
            "storage_key": "thread-attachments/org_docs_fixture/ws_docs_fixture/evidence.bin",
            "visibility_scope": "[REDACTED]",
            "status": "ready",
            "created_by": "usr_docs_fixture",
            "created_at": 1
          },
          {
            "id": "attachment_json_fixture",
            "thread_id": "thread_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "filename": "context.json",
            "content_type": "application/json",
            "size_bytes": 16,
            "storage_key": "thread-attachments/org_docs_fixture/ws_docs_fixture/context.json",
            "visibility_scope": "[REDACTED]",
            "status": "ready",
            "created_by": "usr_docs_fixture",
            "created_at": 1
          }
        ],
        "thread_messages": [],
        "conversation_threads": [
          {
            "id": "thread_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "thread_kind": "workspace",
            "title": "Fixture research thread",
            "status": "active",
            "app_scope": [
              "*"
            ],
            "state": {},
            "created_by": "usr_docs_fixture",
            "created_at": 1,
            "updated_at": 1,
            "last_message_at": 1
          }
        ],
        "work_feed_items": [],
        "reports": [],
        "monitor_runs": [],
        "inbox_items": [],
        "artifacts": [],
        "intake_messages": [],
        "intake_sessions": [
          {
            "id": "intake_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "title": "Fixture operating context",
            "status": "draft",
            "current_step": "foundation",
            "draft_profile": {},
            "created_by": "usr_docs_fixture",
            "created_at": 1,
            "updated_at": 1,
            "completed_at": null
          }
        ],
        "agent_runs": [
          {
            "id": "run_docs_fixture",
            "agent_id": "agent_docs_fixture",
            "organization_id": "org_docs_fixture",
            "workspace_id": "ws_docs_fixture",
            "status": "completed",
            "output": null,
            "log_key": null,
            "duration_ms": null,
            "created_at": 1,
            "agent_version_id": "",
            "runtime_instance_id": "",
            "agent_home_workspace_id": "",
            "owner_principal_id": "",
            "accountable_steward_user_id": ""
          }
        ]
      },
      "knowledge": {
        "agent_memory_records": [],
        "knowledge_chunks": [],
        "knowledge_documents": []
      },
      "events": {
        "agent_persona_audit_log": [],
        "event_log": []
      }
    },
    "external_objects": [
      {
        "key": "thread-attachments/org_docs_fixture/ws_docs_fixture/brief.txt"
      },
      {
        "key": "thread-attachments/org_docs_fixture/ws_docs_fixture/evidence.bin"
      },
      {
        "key": "thread-attachments/org_docs_fixture/ws_docs_fixture/context.json"
      }
    ],
    "excluded": {
      "provider_credentials": "Nexus is the credential owner and provider credentials are never returned.",
      "platform_identity": "Organization, user, grants, and canonical workspace identity are owned by Topolo Auth.",
      "global_definitions": "Agent templates, connector definitions, and monitor definitions are platform-authored.",
      "public_security_state": "Public chat rate-limit and clearance rows are security controls, not organization-authored content.",
      "backups": "Encrypted backups follow the platform backup retention and erasure schedule."
    }
  }
}

successful: HTTP 200; seeded local fixture identifiers confer no live access.

Worked response 2 · HTTP 401

Actual exported read handlers and replayed SQLite migrations. Auth directory, service-token, R2 object storage and Durable Object storage boundaries are simulated; session response serialization executes the actual AgentSession.onRequest method. Egress is sealed. No deployed/provider outcome or live access is demonstrated.

Input · payload.json:

{
  "organizationId": "org_docs_fixture"
}

CLI:

topolo actions validate app_topolo_agent.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_agent.organizations.data.export --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_agent.organizations.data.export",
    "input": {
      "organizationId": "org_docs_fixture"
    }
  }
}

Captured local response · HTTP 401:

{
  "success": false,
  "error": "authentication_required"
}

organization context missing: HTTP 401; SDK code authentication_required; seeded local fixture identifiers confer no live access.

Worked response 3 · HTTP 403

Actual exported read handlers and replayed SQLite migrations. Auth directory, service-token, R2 object storage and Durable Object storage boundaries are simulated; session response serialization executes the actual AgentSession.onRequest method. Egress is sealed. No deployed/provider outcome or live access is demonstrated.

Input · payload.json:

{
  "organizationId": "org_docs_fixture"
}

CLI:

topolo actions validate app_topolo_agent.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_agent.organizations.data.export --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_agent.organizations.data.export",
    "input": {
      "organizationId": "org_docs_fixture"
    }
  }
}

Captured local response · HTTP 403:

{
  "success": false,
  "error": "organization_access_denied"
}

outside organization: HTTP 403; SDK code organization_access_denied; seeded local fixture identifiers confer no live access.

Worked response 4 · HTTP 403

Actual exported read handlers and replayed SQLite migrations. Auth directory, service-token, R2 object storage and Durable Object storage boundaries are simulated; session response serialization executes the actual AgentSession.onRequest method. Egress is sealed. No deployed/provider outcome or live access is demonstrated.

Input · payload.json:

{
  "organizationId": "org_docs_fixture"
}

CLI:

topolo actions validate app_topolo_agent.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_agent.organizations.data.export --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_prepare_action",
  "arguments": {
    "actionId": "app_topolo_agent.organizations.data.export",
    "input": {
      "organizationId": "org_docs_fixture"
    }
  }
}

Captured local response · HTTP 403:

{
  "success": false,
  "error": "privacy_permission_required",
  "permission": "privacy:read"
}

privacy permission missing: HTTP 403; SDK code privacy_permission_required; seeded local fixture identifiers confer no live access.

Verify the result

  • Compare data.organization_id with the explicit authorized organization. Check exported_at, exclusion flags, stores and external_objects. Object keys are inventory references, not file contents or a complete platform backup. Handle the export as private organization data.

Errors and recovery

  • authentication_required (HTTP 401): For an unstructured HTTP 401 response, authenticate and verify the intended organization and workspace before retrying.
  • organization_access_denied (HTTP 403): For an unstructured HTTP 403 response, use the published application permission and required resource-level access. Do not retry with broader context.
  • http_error (HTTP 404): For an unstructured HTTP 404 response, refresh the corresponding resource listing in the same context. Private resources can be deliberately hidden from this caller.
  • privacy_permission_required (HTTP 403): The organization context is valid but privacy:read is missing. Obtain the declared permission without widening organization scope.

Authentication, input validation or resource middleware can refuse a request before these handlers. Preserve the actual refusal and request id.

Recovery boundary

This read does not change service state. Re-discover the target in the same authorized organization and workspace after a missing or hidden-resource refusal; do not guess identifiers or widen context.

No follow-up action is required by this read.

Evidence

Actual exported read handlers and replayed SQLite migrations. Auth directory, service-token, R2 object storage and Durable Object storage boundaries are simulated; session response serialization executes the actual AgentSession.onRequest method. Egress is sealed. No deployed/provider outcome or live access is demonstrated.