Syncs
Edit a sync
Replace the mapping of a sync with the whole sync you send: read it, change tables, columns, directions, rate limits or delete protection, and send it back. A table left out of both apps is removed, a new pair is added. The sync is paused while the edit applies and restarted after it. Send validate_only: true to run every check without changing the sync.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace the resources belong to
base_id*stringThe sync (a sync is called a base in these paths)
uuidThe whole sync after the edit
application/json- body
The whole sync after the edit: read the sync, change it, send it back (the sync is paused and restarted by the edit)
base_id*stringThe sync; must equal the base_id of the path
uuidbase_name*stringThe name of the sync
base_region*stringThe data region of the sync
"besg""usnv"apps*array<>Exactly two apps, with their app_id
2 <= items <= 2base_resource_id?stringThe stable id of the sync
^[A-Za-z0-9_]{1,60}$base_status?stringAccepted and stored as given; leave it out
validate_only?booleanRun every check of the edit, including reading the apps, and answer the sync as it would be stored without changing it
falseThe sync after the edit (with validate_only, as it would be stored)
application/json- response
The written sync
data*A sync as a create or an edit answers it (the mapping, not the settings: read the sync for those)
curl -X PUT 'https://api.stacksync.com/v1/workspaces/0/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "base_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01", "base_name": "Salesforce accounts to Postgres", "base_region": "usnv", "apps": [ { "app_id": "3f9a1c2e", "connection_id": "c7d8e9f0-2a3b-4c5d-9e6f-7a8b9c0d1e2f", "tables": [ { "table_name": "Account", "table_mapping_id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b", "sync_direction": "outgoing", "columns": [ { "column_name": "Name", "column_mapping_id": "1a2b3c4d-5e6f-4a7b-9c8d-0e1f2a3b4c5d" } ] } ] }, { "app_id": "b71d04e5", "connection_id": "9b2e4f60-1c3d-4a5e-8f70-2d4c6e8a0b12", "tables": [ { "table_name": "accounts", "table_mapping_id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b", "sync_direction": "incoming", "columns": [ { "column_name": "name", "column_mapping_id": "1a2b3c4d-5e6f-4a7b-9c8d-0e1f2a3b4c5d" } ] } ] } ]}'{ "data": { "base_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01", "base_name": "Salesforce accounts to Postgres", "base_region": "usnv", "base_resource_id": "salesforce_accounts_to_postgres", "apps": [ { "app_id": "3f9a1c2e", "connection_id": "c7d8e9f0-2a3b-4c5d-9e6f-7a8b9c0d1e2f", "tables": [ { "table_name": "Account", "table_mapping_id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b", "sync_direction": "outgoing", "columns": [ { "column_name": "Name", "column_mapping_id": "1a2b3c4d-5e6f-4a7b-9c8d-0e1f2a3b4c5d" } ] } ] }, { "app_id": "b71d04e5", "connection_id": "9b2e4f60-1c3d-4a5e-8f70-2d4c6e8a0b12", "tables": [ { "table_name": "accounts", "table_mapping_id": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b", "sync_direction": "incoming", "columns": [ { "column_name": "name", "column_mapping_id": "1a2b3c4d-5e6f-4a7b-9c8d-0e1f2a3b4c5d" } ] } ] } ] }}