This command forces the cloud database to synchronize with the synchronization server. Keep in mind that operations performed through the API change the data of the cloud version of the database.
This means that until a synchronization is run, either from the web interface or with the API command, the other devices will not receive the changes made to the data.
Parameters
db
The database to synchronize
partial_from
Integer that enables partial receiving. Optional; if omitted, the synchronization is not split into parts.
token
The user's identification token
Example
https://web.nios4.com/ws/?action=sync&db=db&token=00000000
Response
{
"sync": {
"partial": true if you need to continue with the next step of the partial receiving,
"partial_from": the next value to use to continue, if "partial": true,
"partial_total": total number of records to receive, if "partial": true
},
"sync_last_tid": TID giving the date/time of the last completed synchronization,
"sync_first": true if this was the first synchronization of the database from scratch
}
The response contains all the values needed to continue a synchronization in batches, that is, sending the value rows in separate chunks rather than all at once, plus the time reference to use for the next synchronization, if used.
