table_save (post)

The command is used to add, edit or delete records from a specific table. The body is made up of two arrays. One with the records to be added or modified and the other containing the global identifiers of the records to be deleted.

To add a new record you will have to pass a non-existing guid currently inside the table. In case you want to make a change you will pass the guid of the record itself.

Parameters

tablenameName of the table to be queried
dbName of the database containing the table
tokenUser identification token.

Example

https://web.nios4.com/ws/?action=table_save&db=db&tablename=customers&token=00000000

Body

{
       "rows": [ { dictionary of record values, must have the GGUID set }, ... ],
       "delete": [ array of GGUIDs to be deleted ]
}

The dictionary to be used within the rows array can be the template record obtainable through the table_info command. It is however possible to pass only the values that you intend to modify or add. The important thing is that the guid key is always present.

Errors

notfoundThe requested table does not exist
unauthorizedYou do not have viewing permissions for the requested table