App schema
Get an app schema
List the tables Stacksync can sync through a connection, with the primary key of each. Columns are not read by this route: use the generate app schema route with table_names to read them.
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
region*stringData region of the connection
"besg""usnv"connection_id*stringThe connection to read the schema through; the user of the API key must have created it or it must be shared with the workspace
uuidThe tables of the app
application/json- response
The tables and columns Stacksync can read through a connection
app_type*stringThe app of the connection, as shown in Stacksync
can_create_tables*booleanWhether a sync may create a new table in this app (table_options.create_new_table: true)
tables*array<>Every table of the app
curl -X GET 'https://api.stacksync.com/v1/workspaces/0/helpers/app-schema?region=besg&connection_id=497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "app_type": "postgres", "can_create_tables": true, "tables": [ { "table_name": "accounts", "table_id": "accounts", "table_options": { "primary_key": { "column_name": "id", "column_type": "uuid" } }, "columns": [] }, { "table_name": "contacts", "table_id": "contacts", "table_options": {}, "columns": [] } ]}POSTResolve sync issues
Retry, revert or ignore issues: the ones listed by id, or with `all_issues: true` every issue of a sync or of one of its tables. Retrying writes the change again; reverting restores the record from the destination app; ignoring closes the issue.
POSTGenerate an app schema
Read the tables of a connection and the columns of the tables named, so a sync can be built from exact table and column names. The credentials are read from the connection, never sent. Readable with a read-only key.