Skip to content
Select themeSelect language

`POST /api/workspace/repo_sync/pull` — clone/pull repo + apply YAML files to DB with last-write-wins. Returns parse outcomes + the sync event id/timestamp.

POST
/api/workspace/repo_sync/pull
curl --request POST \
--url https://example.com/api/workspace/repo_sync/pull \
--header 'Content-Type: application/json' \
--data '{ "selected_sops_paths": [ "example" ] }'

ADR 0023 v4 S2d — ?import_secrets=false skips vault writes for secrets/*.sops.yaml files (the wizard preview pass). The default is ON.

import_secrets
boolean

ADR 0023 v4 S2d — when false, SOPS secrets are scanned + decrypted (so the preview is accurate) but not written to vault. Default: true.

Media typeapplication/json
object
selected_sops_paths

Repo-relative SOPS file paths selected in the preview step. Omitted means “all”; empty means “none”.

Array<string> | null
Examplegenerated
{
"selected_sops_paths": [
"example"
]
}
Media typeapplication/json

What a pull returns to the HTTP caller.

object
commit_sha
required

The commit sha the pull operated against (the new HEAD).

string
db_namespace
One of:
null
event
required

Sync-event shape with event_id + timestamp.

object
commit_sha

The git commit sha the sync attempt operated against — None when no commit was made (push with no diff).

string | null
event_id
required
string format: uuid
kind
required

repo_sync_push_completed / repo_sync_pull_completed.

string
timestamp
required

RFC3339 timestamp (UTC). The string form keeps the wire format language-agnostic; the web client parses it back to a Date.

string
files_parsed
required

The number of repo-side files parsed (every YAML the scanner found under workflows/ / scripts/ / apps/).

integer
outcomes
required

One row per entity the pull touched (created / updated / skipped / failed). The order matches the audit log writes.

Array<object>

One row per entity affected by a pull.

object
action
required
string
reason

Set for skipped / failed rows; absent for the happy path.

string | null
target_id
string | null format: uuid
target_kind
required

Closed catalogue of sync targets a log row can reference.

string
Allowed values: workflow script app resource memory
target_slug
required
string
sops
One of:
null
Example
{
"outcomes": [
{
"target_kind": "workflow"
}
]
}