`POST /api/workspace/repo_sync/push` — serialize DB rows + commit/push. Returns `{ commit_sha, files_written, outcomes, event }` — every returned event carries `event_id` + `timestamp` per the wire contract.
const url = 'https://example.com/api/workspace/repo_sync/push';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/repo_sync/pushPOST /api/workspace/repo_sync/push — serialize DB rows + commit/push.
Returns { commit_sha, files_written, outcomes, event } — every
returned event carries event_id + timestamp per the wire contract.
Responses
Section titled “Responses”OK
What a push returns to the HTTP caller.
object
The commit sha the push left the remote at.
Sync-event shape with event_id + timestamp.
object
The git commit sha the sync attempt operated against — None when no commit was made (push with no diff).
repo_sync_push_completed / repo_sync_pull_completed.
RFC3339 timestamp (UTC). The string form keeps the wire format language-agnostic; the web client parses it back to a Date.
Absolute file paths inside the workspace’s checkout that the push wrote. Each path corresponds to one entry (workflow / script / app).
One row per entity the push affected.
One row per entity affected by a push.
object
updated for the happy path; failed if a per-row write blew up;
conflict for a removal kept because the remote changed the file.
Closed catalogue of sync targets a log row can reference.
Example
{ "outcomes": [ { "target_kind": "workflow" } ]}