CMS
Πίνακες περιεχομένου που διαβάζουν οι ιστότοποι και οι εφαρμογές σας.
Ένας πίνακας CMS είναι ένας συνηθισμένος πίνακας στη βάση δεδομένων του χώρου εργασίας. Διαχειρίζεστε τους πίνακες με τις μεθόδους CMS, και διαβάζετε και γράφετε τις εγγραφές τους με τις μεθόδους εγγραφών. Κάθε κλήση είναι ένα POST στο /cpi/<method> με σώμα JSON που φέρει το κλειδί API σας.
Η απάντηση περιέχει κάθε πίνακα με τα πεδία και τον αριθμό εγγραφών του, και τη βάση δεδομένων στην οποία ζει (το app_id που δέχονται οι μέθοδοι εγγραφών).
Από το Dashboard
Κάθε πίνακας έχει ένα παράθυρο API: πατήστε API και JSON σε μια κάρτα ή σε έναν ανοιχτό πίνακα. Δείχνει τις πέντε κλήσεις εγγραφών για αυτόν τον πίνακα, τα ίδια τα πεδία του πίνακα ως JSON, το ίδιο αίτημα ως cURL ή JavaScript, και ένα σημείο για να το στείλετε. Ο επιλογέας κλειδιών απαριθμεί τα κλειδιά που φτάνουν στον χώρο εργασίας, και μπορεί να φτιάξει νέο. Ένα κλειδί με πλήρη πρόσβαση δουλεύει. Ένα προσαρμοσμένο χρειάζεται dbs_read για ανάγνωση και dbs_create, dbs_update και dbs_delete για εγγραφή.
Εγγραφές
Οι πέντε κλήσεις του παραθύρου εκτελούν αυτές τις μεθόδους. Κάθε μία δέχεται το app_id της βάσης δεδομένων του χώρου εργασίας και το id του πίνακα.
Μια εγγραφή είναι ένα αντικείμενο του οποίου τα κλειδιά είναι τα id των πεδίων του πίνακα. Στείλτε το table_data ως πίνακα για να προσθέσετε αρκετές εγγραφές μαζί. Η διαγραφή μετακινεί τις εγγραφές στους Αρχειοθετημένους, και το dbs_restore με τα ίδια id τις επαναφέρει. Προσθέστε permanent για να τις διαγράψετε οριστικά.
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.
Πίνακες
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.
Ένας νέος πίνακας μετρά στους πίνακες του πλάνου σας, κάθε πίνακας στα πεδία του, και η προσθήκη ή επαναφορά εγγραφών στις εγγραφές του. Μια κλήση πέρα από ένα όριο απορρίπτεται με ένα μήνυμα που λέει ποιο.