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
tablename
Name of the table to be queried
db
Name of the database containing the table
token
User 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 array rows 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
notfound
The requested table does not exist
unauthorized
You do not have viewing permissions for the requested table