Syncing Changes
The Syncing process
Shell
$ curl -u [your_api_key]:X -H "Content-Type:application/json" \
-H "Accept:application/json" \
-X POST https://admin.doorflow.com/api/3/sync
Syncing is the process of updating permissions on each of the Channels with credentials and access times.
Changes are not automatically synced to the Channels - this is to avoid potentially unwanted state changes if a number of changes are being made to the account at the same time. Sync is called once all changes have been made.
In order to promote changes to Channels, the User (browser User or API User) should trigger a Sync.
Syncing can be potentially be a time-consuming process and should only be called once no more changes will be made. This method is rate-limited. If you hit the rate limit, your call to sync will receive a 429 response. Typically the rate limit is 30 seconds. For larger accounts this might be longer.
To sync an account:
POST /api/3/sync
Although a Sync can be time-consuming for accounts with large numbers of people and/or channels, making changes to the system (and more specifically syncing) won't affect normal operation of the Channel(s). At no point will the Channel(s) be unusable whilst updating.
Missing a Sync?
If a Channel is offline at the time a Sync is triggered, the pending changes will be applied once the Channel next reconnects. This is automatic and doesn't need any action on your part.
Catering for problems during a Sync
If the connection to a Channel drops during a Sync, the sync action is aborted and re-attempted when the Channel next reconnects.
At the end of the Sync process the data on the Channel is validated. Only if this validation is successful does the new state get promoted to "live". At this point the Channel sync status is marked as complete.
This redundancy ensures the data integrity of the overall system and eliminates any perceivable errors in syncing.