CMS
Tartalomtáblák, amelyeket a weboldalai és alkalmazásai olvasnak.
A CMS-tábla közönséges tábla a munkaterület adatbázisában. A táblákat a CMS-metódusokkal kezeli, a rekordjaikat pedig a rekordmetódusokkal olvassa és írja. Minden hívás egy POST a /cpi/<method> címre, JSON-törzzsel, amely az API-kulcsát hordozza.
A válasz minden táblát tartalmaz a mezőivel és a rekordszámával, valamint az adatbázist, amelyben él (az app_id, amelyet a rekordmetódusok várnak).
Az irányítópultról
Minden táblának van API-ablaka: nyomja meg az API és JSON gombot egy kártyán vagy egy megnyitott táblában. Megmutatja az adott tábla öt rekordhívását, a tábla saját mezőit JSON-ként, ugyanazt a kérést cURL-ként vagy JavaScriptként, és egy helyet az elküldéséhez. A kulcsválasztója felsorolja a munkaterületet elérő kulcsokat, és újat is készíthet. A teljes hozzáférésű kulcs működik. Az egyedinek dbs_read kell az olvasáshoz, és dbs_create, dbs_update és dbs_delete az íráshoz.
Rekordok
Az ablak öt hívása ezeket a metódusokat futtatja. Mindegyik a munkaterület adatbázisának app_id értékét és a tábla azonosítóját várja.
A rekord egy objektum, amelynek kulcsai a tábla mezőazonosítói. Küldje a table_data értéket tömbként, hogy egyszerre többet adjon hozzá. A törlés a rekordokat az Archivált közé helyezi, és a dbs_restore ugyanazokkal az azonosítókkal visszahozza őket. Adja hozzá a permanent értéket, hogy véglegesen törölje őket.
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.
Táblák
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.
Az új tábla beleszámít a csomagja tábláiba, minden tábla a mezői számába, a rekordok hozzáadása vagy visszaállítása pedig a rekordjai számába. A korláton túli hívást egy üzenettel utasítják el, amely megmondja, melyikkel.