network.account-sync ​
Synchronize network scopes for one network account
Synchronize top-level network scopes for one network account.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-network |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
network_account_uuid | uuid | Yes | — | Public UUID of the NetworkAccount to sync |
organization_uuid | uuid | Yes | — | UUID of the organization that owns the account |
manage_account_state | boolean | No | — | Whether this run manages the account's cached_sync_status |
workflow_run_uuid | string | No | — | Engine-stamped parent run UUID (DAG step target) |
workflow_run_id | string | No | — | Engine-stamped DAG run ID (injected when used as a DAG step) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
network_account_uuid | uuid | Yes | — | UUID of the synced NetworkAccount (echoed) |
organization_uuid | uuid | Yes | — | UUID of the owning organization (echoed) |
backend_type | string | No | — | — |
manage_account_state | boolean | No | — | — |
workflow_run_uuid | string | No | — | — |
workflow_run_id | string | No | — | Engine-stamped DAG run ID (carried forward from input) |
remote_scopes | json | No | — | — |
scope_count | integer | No | — | — |
created_scope_count | integer | No | — | — |
updated_scope_count | integer | No | — | — |
stale_scope_count | integer | No | — | — |
completed_at | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | prepare | — |
fetching | No | No | — | reconcile | — |
preparing | No | No | — | fetch_remote_scopes | — |
reconciling | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | prepare | preparing | — |
preparing | fetch_remote_scopes | fetching | — |
fetching | reconcile | reconciling | — |
reconciling | complete | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
synced | SUCCESS | Synchronize network scopes for one network account | — |
failed | FAILURE | Network workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "network.account-sync",
"initial_data": {
"network_account_uuid": "value",
"organization_uuid": "value"
}
}