sentry.sync ​
Sync Sentry organizations, projects, and environments to database
Sync Sentry orgs, projects, and environments to DB (no PII). Triggered when a Sentry connection is persisted.
DB operations use context.session (ADR-011). Sentry API calls use self.get_plugin("sentry").
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-sentry |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | Sentry cloud-connection UUID |
organization_uuid | uuid | Yes | — | Organization that owns the connection |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | string | No | — | — |
organization_uuid | string | No | — | — |
orgs_synced | integer | No | — | — |
projects_synced | integer | No | — | — |
environments_synced | integer | No | — | — |
completed_at | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | sync_orgs | Sync started |
syncing_environments | No | No | — | complete | Syncing environments |
syncing_orgs | No | No | — | sync_projects | Syncing organizations |
syncing_projects | No | No | — | sync_environments | Syncing projects |
completed | No | Yes | Yes | — | Sync complete |
failed | No | Yes | No | — | Sync failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | sync_orgs | syncing_orgs | — |
syncing_orgs | sync_projects | syncing_projects | — |
syncing_projects | sync_environments | syncing_environments | — |
syncing_environments | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "sentry.sync",
"initial_data": {
"connection_uuid": "value",
"organization_uuid": "value"
}
}