CMS
Inhaltstabellen, die deine Websites und Apps lesen.
Eine CMS-Tabelle ist eine gewöhnliche Tabelle in der Datenbank des Workspace. Tabellen verwaltest du mit den CMS-Methoden, und ihre Datensätze liest und schreibst du mit den Datensatz-Methoden. Jeder Aufruf ist ein POST an /cpi/<method> mit einem JSON-Body, der deinen API-Schlüssel enthält.
Die Antwort enthält jede Tabelle mit ihren Feldern und der Zahl der Datensätze sowie die Datenbank, in der sie liegt (die app_id, die die Datensatz-Methoden erwarten).
Aus dem Dashboard
Jede Tabelle hat ein API-Fenster: Klicke auf einer Karte oder in einer geöffneten Tabelle auf API und JSON. Es zeigt die fünf Datensatz-Aufrufe für diese Tabelle, die eigenen Felder der Tabelle als JSON, dieselbe Anfrage als cURL oder JavaScript und einen Ort, um sie zu senden. Seine Schlüsselauswahl listet die Schlüssel auf, die den Workspace erreichen, und kann einen neuen erstellen. Ein Schlüssel mit vollem Zugriff funktioniert. Ein benutzerdefinierter braucht dbs_read zum Lesen und dbs_create, dbs_update und dbs_delete zum Schreiben.
Datensätze
Die fünf Aufrufe des Fensters führen diese Methoden aus. Jede erwartet die app_id der Datenbank des Workspace und die ID der Tabelle.
Ein Datensatz ist ein Objekt, dessen Schlüssel die Feld-IDs der Tabelle sind. Sende table_data als Array, um mehrere Datensätze auf einmal hinzuzufügen. Löschen verschiebt Datensätze nach Archiviert, und dbs_restore mit denselben IDs holt sie zurück. Füge permanent hinzu, um sie endgültig zu löschen.
DBS Read
Reads records from an app table with optional row range, single-row lookup, sorting, filtering, and archived-record selection.
DBS Create
Creates a new record in the specified app table from the provided key-value table data.
DBS Update
Replaces the data of an existing record, identified by row_id, in the specified app table.
DBS Delete
Soft-deletes (or permanently deletes when 'permanent' is set) the listed record IDs from an app table.
DBS Restore
Restores previously soft-deleted records, identified by their IDs, in the specified app table.
Tabellen
Get CMS Tables
The 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 CMS Table
One CMS table as Xuda Studio stores it (its fields and indexes), with its record count and the database it lives in.
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.
Archive CMS Table
Archive 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 Records Of An Item
The 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.
Eine neue Tabelle zählt auf die Tabellen deines Tarifs, jede Tabelle auf seine Felder, und das Hinzufügen oder Wiederherstellen von Datensätzen auf seine Datensätze. Ein Aufruf über ein Limit hinaus wird mit einer Meldung abgelehnt, die sagt, welches.