When embedding Census, your customers will be interested in seeing the status of their sync runs. Typically, apps that embed Census will show statuses like “Running” or “Completed”, along with information about sync progress.

Our product docs cover the different data points and their meanings.

Each of the pieces of information in the image above is retrievable via API. To fetch the latest sync run for a given sync configuration, query the List Sync Runs endpoint with the per_page: 1. This will return the most recent sync run.

The response for the sync run will look like

{
  "id": 94,
  "sync_id": 52,
  "source_record_count": 15,
  "source_record_updates": 12,
  "source_record_deletes": 2,
  "source_record_invalids": 1,
  "records_processed": 14,
  "records_updated": 13,
  "records_failed": 1,
  "created_at": "2021-10-20T02:51:07.546Z",
  "updated_at": "2021-10-20T02:52:29.236Z",
  "completed_at": "2021-10-20T02:52:29.234Z",
  "scheduled_execution_time": "2021-10-20T02:52:29.234Z",
  "error_code": "JSON_ARRAY_ERROR",
  "error_message": "The array field being used does not appear to be valid JSON...",
  "error_detail": "Please make sure the field \"custom_field:Users\" with value \"jim\" is formatted as a JSON Array...",
  "status": "completed",
  "canceled": true,
  "full_sync": true,
  "current_step": "Running Sync"
}
  1. Status - status
  2. Start Time - created_at
  3. Total Source Records - source_record_count
  4. Changed Source Records - the UI displays the sum of source_record_updates and source_record_deletes
  5. Invalid Source Records - source_record_invalids
  6. Successfully Synced Records - records_updated
  7. Rejected Records - records_failed
  8. (if running) Estimated Time Remaining - coming soon
  9. (if completed) End Time - completed_at
  10. Steps and Progress - Somewhat captured in current_step, more detailed progress coming soon.