Links

Sync Runs

GET /syncs/[ID]/sync_runs

This endpoint returns info on the sync runs for a specific sync.
See Pagination for standard URL parameters and response data.
Request
Response
curl 'https://app.getcensus.com/api/v1/syncs/[ID]/sync_runs?page=1&per_page=1&order=asc' \
--header 'Authorization: Bearer [API_TOKEN]'
{
"status": "success",
"data": [
{
"id": 94,
"sync_id": 52,
"source_record_count": 1,
"records_processed": 1,
"records_updated": 1,
"records_failed": 0,
"records_invalid": 0,
"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": null,
"error_code": null,
"error_message": null,
"error_detail": null,
"status": "completed",
"canceled": false,
"full_sync": true,
"sync_trigger_reason": {
"ui_tag": "Manual",
"ui_detail": "Manually triggered by [email protected]"
}
},
{
"id": 93,
"sync_id": 52,
"source_record_count": 1,
"records_processed": null,
"records_updated": null,
"records_failed": null,
"records_invalid": 0,
"created_at": "2021-10-20T02:48:40.373Z",
"updated_at": "2021-10-20T02:49:53.430Z",
"completed_at": null,
"scheduled_execution_time": null,
"error_code": "JSON_ARRAY_ERROR",
"error_message": "The array field being used does not appear to be valid JSON: Please make sure the field \"custom_field:Users\" with value \"jim\" is formatted as a JSON Array. Don't hesitate to reach out to the Census Support Team if you need help with this.",
"error_detail": "Please make sure the field \"custom_field:Users\" with value \"jim\" is formatted as a JSON Array. Don't hesitate to reach out to the Census Support Team if you need help with this.",
"status": "failed",
"current_step": "Running sync",
"canceled": false,
"full_sync": true,
"sync_trigger_reason": {
"ui_tag": "Manual",
"ui_detail": "Manually triggered by [email protected]"
}
},
{
"id": 92,
"sync_id": 52,
"source_record_count": 1,
"records_processed": 1,
"records_updated": 1,
"records_failed": 0,
"records_invalid": 0,
"created_at": "2021-10-20T02:44:35.381Z",
"updated_at": "2021-10-20T02:45:55.949Z",
"completed_at": "2021-10-20T02:45:55.947Z",
"scheduled_execution_time": null,
"error_code": null,
"error_message": null,
"error_detail": null,
"status": "completed",
"canceled": false,
"full_sync": true,
"sync_trigger_reason": {
"ui_tag": "Manual",
"ui_detail": "Manually triggered by [email protected]"
}
}
],
"next": "https://app.getcensus.com/api/v1/syncs/52/sync_runs?page=2&per_page=3",
"pagination": {
"total_records": 4,
"per_page": 3,
"prev_page": null,
"page": 1,
"next_page": 2,
"last_page": 2
}
}

GET /sync_runs/[ID]

This endpoint returns information on a specific sync run.
Request
Response
curl 'https://app.getcensus.com/api/v1/sync_runs/[ID]' \
--header 'Authorization: Bearer [API_TOKEN]'
{
"status": "success",
"data": {
"id": 94,
"sync_id": 52,
"source_record_count": 1,
"records_processed": 1,
"records_updated": 1,
"records_failed": 0,
"records_invalid": 0,
"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": null,
"error_code": null,
"error_message": null,
"error_detail": null,
"status": "completed",
"canceled": false,
"full_sync": true,.
"sync_trigger_reason": {
"ui_tag": "Manual",
"ui_detail": "Manually triggered by [email protected]"
}
}
}
Data Properties
Description
id
id of this sync run.
sync_id
id of the parent sync.
status
  • working if the sync is currently executing
  • completed if the sync finished successfully
  • failed if the sync failed during execution
  • skipped if an earlier instance of the sync is still running
  • queued if the sync run is queued for execution
Deprecated states:
  • retrying if the sync run failed previously and has been queued to reattempt. Should appear as working at all times now.
  • preparing has been replaced by queued.
  • new has been replaced by queued.
records_processed
Number of new or updated records retrieved from the source.
records_updated
Number of records successfully sent to the destination.
records_invalid
Number of records skipped by Census because of data quality issues.
records_failed
Number of records rejected by the destination.
created_at
When this sync run was created.
updated_at
When this sync run was updated.
completed_at
When this sync run was completed.
scheduled_execution_time
When the sync run was scheduled to run.
error_code
The error code, if any.
error_message
The error message, if any.
error_detail
Details about the error, if any.
canceled
Whether or not this sync run was canceled.
full_sync
Whether or not this was a full sync.
sync_trigger_reason
Details on why this sync was run.
Last modified 1mo ago