App schema
Generate 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.
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"The connection and the tables to read the columns of
application/json- body
The connection to read, and the tables to read the columns of
connection_id*stringThe connection to read the schema through
uuidtable_names?array<string>The tables to read the columns of, by table_name or table_id exactly as the schema lists them; the answer lists every table but fills columns for these only
[]The tables of the app, with the columns of the tables named
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 POST 'https://api.stacksync.com/v1/workspaces/0/helpers/generate-app-schema?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "connection_id": "9b2e4f60-1c3d-4a5e-8f70-2d4c6e8a0b12", "table_names": [ "accounts" ]}'{ "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": [ { "column_name": "id", "column_type": "uuid", "writable": false }, { "column_name": "name", "column_type": "string", "writable": true }, { "column_name": "website", "column_type": "string", "writable": true } ] }, { "table_name": "contacts", "table_id": "contacts", "table_options": {}, "columns": [] } ]}GETGet 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.
GETList workflows
The workflows of the workspace the caller sees on the web app's Resources page (their own and those shared with the workspace), newest first, one page per region (or of the region asked for). Optionally only the workflows directly in a folder, or those whose name or id contains a text.