gitlab.connection-sync ​
Sync GitLab projects and branches for a connection
Sync all projects and branches for a GitLab connection to the local database.
Triggered by POST /api/gitlab/connections/<uuid>/sync. Heavy work runs in the SYNCING step (auto_advance_async=True) so the API returns immediately and the Kafka consumer runs the sync.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-gitlab |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | — |
organization_uuid | uuid | Yes | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | — |
organization_uuid | uuid | Yes | — | — |
projects_synced | integer | No | — | — |
sync_success | boolean | 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 |
|---|---|---|---|---|---|
preparing | Yes | No | — | sync | Validate connection |
syncing | No | No | — | complete | Sync projects and branches from GitLab API |
completed | No | Yes | Yes | — | Sync complete |
failed | No | Yes | No | — | Sync failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
preparing | sync | syncing | — |
syncing | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gitlab.connection-sync",
"initial_data": {
"connection_uuid": "value",
"organization_uuid": "value"
}
}