Save CMS Table
Create a CMS table, or change one when table_id is sent. A table has a name, an optional description and its fields, each a name, a type (string, number, boolean, date, array, object, or relation) and whether it is required. A relation field relates the table to the Contacts module ({ kind: 'module', module: 'contacts' }) or to another CMS table of the workspace ({ kind: 'table', table_id }), holding one id or, with many, several; a saved relation keeps what it relates to and its shape. Field names start with a letter and use letters, digits and underscores. A new table counts against the plan's tables, and every table against its fields per table. The table is an ordinary Xuda Studio table in the workspace's database, so it opens in Studio too.
Request
Response
Errors
An error keeps the envelope: a negative code and a message in data.
Related methods
archive_cms_tableuserArchive a CMS table (it leaves the list and its records stay) or bring it back with archived false, which counts against the plan's tables again.
get_cms_tableuserOne CMS table as Xuda Studio stores it (its fields and indexes), with its record count and the database it lives in.
cms_related_recordsuserThe CMS tables related to one item of another module (a ticket, a delivery, an order, a product, a finance document or a contact), each with its fields and the records that point at that item, so the item can show them to fill. A workspace with CMS switched off answers no tables.
get_cms_tablesuserThe CMS tables of one workspace, active and archived, each with its fields and how many records it holds, plus the database the records live in (the app_id to hand dbs_read, dbs_create, dbs_update, dbs_delete and dbs_restore), whether that database is ready, and the plan with what it allows. The first open of a workspace other than Main installs the database plugin there and answers preparing until it is ready.
get_table_countsadminReturns the number of records in a table: active records, or archived records when archived is true.
5 of 5 in Cms