Skip to content

Create Sync Job Run ​

Endpoint ​

http
POST /sync-job-run

Request Body ​

sync_job_id
string
REQUIRED · 

The ID of the sync job to run.

Example: 1ba1f401-7183-47c5-9e39-e8e257e3c795
args
object

The arguments passed to the sync job run.

Example: { "project_slug": "vcs_provider/org_name/repo_name" }
integrated_account_id
string · uuid
REQUIRED · 

The ID of the integrated account that this sync job run belongs to.

Example: 94801e49-a652-42f9-af14-dd203d7897da
daemon_group_key
string

The name of the daemon group that this sync job run should be assigned to. Used while creating a sync job run. Truto find a daemon in the group that is available to run the sync job. You can either specify daemon_group_key (Daemon) or webhook_id (RapidBridge), but NOT both while creating a Sync Job Run.

Example: default
webhook_id
string · uuid

The ID of the webhook where the sync job records need to be sent. You can either specify daemon_group_key (Daemon) or webhook_id (RapidBridge), but NOT both while creating a Sync Job Run.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
error_handling
string

Specify how to handle errors while running the sync job. fail_fast - stop the sync job run as soon as an error is encountered, ignore - continue running the sync job run even if an error is encountered. In case of ignore, you'll receive sync_job_run:record_error events for each error encountered. By default, ignore is used.

All possible enum values:
  • fail_fast
  • ignore
Example: ignore
ignore_previous_run
boolean

If your Sync Job uses previous_run_date placeholder for incremental sync, you can choose to ignore the previous run and run a full sync instead by setting this parameter to true. By default, false is used.

Response Body ​

id
string · uuid

The ID of the sync job run.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
args
object

The arguments passed to the sync job run.

Example: { "project_slug": "vcs_provider/org_name/repo_name" }
resources
object[]

The resources to sync as part of the sync job.

resource
string
REQUIRED · 

The name of the resource to sync. For Unified APIs, it should be in the format unified_api_name/resource_name. For Proxy API, it can just be resource_name.

Example: For fetching Contacts from CRM Unified API, `crm/contacts`. For fetching Contacts from a Proxy API, `contacts`.
method
string
REQUIRED · 

The method to call on the resource.

Example: list
id
string

The ID of the resource to sync. This is optional and can be used to sync a single resource. It also supports placeholders.

Example: Static value like `4a4de828-f4db-4c9e-adfd-434e0864c3c7` or placeholder like `{{args.user_id}}`.
query
object

The query parameters to pass to the resource method. It supports placeholders for values.

Example: { "page": 1, "per_page": 100, "user_id": "{{args.user_id}}" }
loop_on
string

When a particular placeholder argument is an array and you want to repeat the request for each element in that array, you can set this parameter. For example, if you accept an argument called user_ids which is an array of strings, and you want to fetch each user's details, you can set this parameter to user_ids and the request will be repeated for each element in the user_ids array.

Example: { "{ args.user_ids }": null }
depends_on
string

The resource that this resource depends on (parent resource). This is optional and can be used to sync a resource only after another resource has been synced. Each object synced for the parent resource is available as the resources object in placeholders for the child resource, e.g. {{resources.crm.contacts.id}} if depends on is crm/contacts resource.

Example: crm/contacts
persist
boolean

Whether to persist the resource in the database or not in case of a Daemon sync job run or send as a payload in case of RapidBridge sync job run. The Proxy API resources are by default NOT persisted and this parameter can be set to true to persist them. Unified API resources are always persisted.

sync_job_id
string · uuid

The ID of the sync job that this sync job run belongs to.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
integrated_account_id
string · uuid

The ID of the integrated account that this sync job run belongs to.

Example: 94801e49-a652-42f9-af14-dd203d7897da
status
string

The status of the sync job run. created - waiting to run, running - running, completed - completed successfully, failed - failed, stopped - stopped by the user.

All possible enum values:
  • created
  • running
  • completed
  • failed
  • stopped
Example: running
daemon_id
string

The daemon_id attribute of a daemon that is running this sync job.

Example: default
daemon_group_key
string

The name of the daemon group that this sync job run should be assigned to. Used while creating a sync job run. Truto find a daemon in the group that is available to run the sync job. You can either specify daemon_group_key (Daemon) or webhook_id (RapidBridge), but NOT both while creating a Sync Job Run.

Example: default
webhook_id
string · uuid

The ID of the webhook where the sync job records need to be sent. You can either specify daemon_group_key (Daemon) or webhook_id (RapidBridge), but NOT both while creating a Sync Job Run.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
created_at
string · date-time

The date and time when the sync job run was created.

Example: 2021-08-10T10:00:00.000Z
updated_at
string · date-time

The date and time when the sync job run was last updated.

Example: 2021-08-10T10:00:00.000Z
started_at
string · date-time

The date and time when the sync job run was started.

Example: 2021-08-10T10:00:00.000Z
finished_at
string · date-time

The date and time when the sync job run was finished.

Example: 2021-08-10T10:00:00.000Z
sync_job
object

The sync job that this sync job run belongs to.

id
string · uuid

The ID of the sync job.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
integration_name
string

The name of the integration that this sync job interacts with.

Example: zendesk
args_schema
object

JSON schema defining the structure of the arguments that can be passed to the sync job.

Example: { "type": "object", "properties": { "project_slug": { "type": "string", "description": "The project slug of the project on CircleCI. Its in the format vcs_provider/org_name/repo_name.", "required": true } } }
resources
object[]

The resources to sync as part of the sync job.

resource
string
REQUIRED · 

The name of the resource to sync. For Unified APIs, it should be in the format unified_api_name/resource_name. For Proxy API, it can just be resource_name.

Example: For fetching Contacts from CRM Unified API, `crm/contacts`. For fetching Contacts from a Proxy API, `contacts`.
method
string
REQUIRED · 

The method to call on the resource.

Example: list
id
string

The ID of the resource to sync. This is optional and can be used to sync a single resource. It also supports placeholders.

Example: Static value like `4a4de828-f4db-4c9e-adfd-434e0864c3c7` or placeholder like `{{args.user_id}}`.
query
object

The query parameters to pass to the resource method. It supports placeholders for values.

Example: { "page": 1, "per_page": 100, "user_id": "{{args.user_id}}" }
loop_on
string

When a particular placeholder argument is an array and you want to repeat the request for each element in that array, you can set this parameter. For example, if you accept an argument called user_ids which is an array of strings, and you want to fetch each user's details, you can set this parameter to user_ids and the request will be repeated for each element in the user_ids array.

Example: { "{ args.user_ids }": null }
depends_on
string

The resource that this resource depends on (parent resource). This is optional and can be used to sync a resource only after another resource has been synced. Each object synced for the parent resource is available as the resources object in placeholders for the child resource, e.g. {{resources.crm.contacts.id}} if depends on is crm/contacts resource.

Example: crm/contacts
persist
boolean

Whether to persist the resource in the database or not in case of a Daemon sync job run or send as a payload in case of RapidBridge sync job run. The Proxy API resources are by default NOT persisted and this parameter can be set to true to persist them. Unified API resources are always persisted.

environment_id
string · uuid

The ID of the environment that this sync job belongs to.

Example: 05daecaf-4365-42e8-8370-8127de5dd717
created_at
string · date-time

The date and time when the sync job was created.

Example: 2021-08-10T10:00:00.000Z
updated_at
string · date-time

The date and time when the sync job was last updated.

Example: 2021-08-10T10:00:00.000Z