List sync job runs ​
You can use this endpoint to list all the sync job runs that have been created for your Truto account.
Endpoint ​
GET /sync-job-run
Response Body ​
The ID of the sync job run.
4a4de828-f4db-4c9e-adfd-434e0864c3c7
The arguments passed to the sync job run.
{
"project_slug": "vcs_provider/org_name/repo_name"
}
The resources to sync as part of the sync job.
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
.
For fetching Contacts from CRM Unified API, `crm/contacts`. For fetching Contacts from a Proxy API, `contacts`.
The method to call on the resource.
list
The ID of the resource to sync. This is optional and can be used to sync a single resource. It also supports placeholders.
Static value like `4a4de828-f4db-4c9e-adfd-434e0864c3c7` or placeholder like `{{args.user_id}}`.
The query parameters to pass to the resource method. It supports placeholders for values.
{
"page": 1,
"per_page": 100,
"user_id": "{{args.user_id}}"
}
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.
{
"{ args.user_ids }": null
}
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.
crm/contacts
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.
The ID of the sync job that this sync job run belongs to.
4a4de828-f4db-4c9e-adfd-434e0864c3c7
The ID of the integrated account that this sync job run belongs to.
94801e49-a652-42f9-af14-dd203d7897da
The status of the sync job run. created
- waiting to run, running
- running, completed
- completed successfully, failed
- failed, stopped
- stopped by the user.
created
running
completed
failed
stopped
running
The daemon_id attribute of a daemon that is running this sync job.
default
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.
default
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.
4a4de828-f4db-4c9e-adfd-434e0864c3c7
Specifies the error handling strategy used for the sync job run. 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. In case of batch
, you'll receive sync_job_run:record_error
events with multiple errors batched into the errors array, this is only supported when the version
used for Sync Job Run is 2.
fail_fast
ignore
batch
ignore
Specifies if the sync job run was started ignoring the previous run date.
The runtime version of the sync job run. The version 1 is the default version and the version 2 is the new version which supports batch error handling and other enhancements.
1
The statistics of the resources synced in the sync job run. This will have information around how many records were fetched and persisted by the sync job run -- grouped by the resource and method. The data is updated every 10 seconds while the sync job run is running.
{
"crm/contacts": {
"list": {
"fetched": 100,
"persisted": 100
}
},
"crm/deals": {
"list": {
"fetched": 100,
"persisted": 0
},
"get": {
"fetched": 100,
"persisted": 100
}
}
}
The date and time when the sync job run was created.
2021-08-10T10:00:00.000Z
The date and time when the sync job run was last updated.
2021-08-10T10:00:00.000Z
The date and time when the sync job run was started.
2021-08-10T10:00:00.000Z
The date and time when the sync job run was finished.
2021-08-10T10:00:00.000Z
The sync job that this sync job run belongs to.
The ID of the sync job.
4a4de828-f4db-4c9e-adfd-434e0864c3c7
The name of the integration that this sync job interacts with.
zendesk
JSON schema defining the structure of the arguments that can be passed to the sync job.
{
"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
}
}
}
The resources to sync as part of the sync job.
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
.
For fetching Contacts from CRM Unified API, `crm/contacts`. For fetching Contacts from a Proxy API, `contacts`.
The method to call on the resource.
list
The ID of the resource to sync. This is optional and can be used to sync a single resource. It also supports placeholders.
Static value like `4a4de828-f4db-4c9e-adfd-434e0864c3c7` or placeholder like `{{args.user_id}}`.
The query parameters to pass to the resource method. It supports placeholders for values.
{
"page": 1,
"per_page": 100,
"user_id": "{{args.user_id}}"
}
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.
{
"{ args.user_ids }": null
}
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.
crm/contacts
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.
The ID of the environment that this sync job belongs to.
05daecaf-4365-42e8-8370-8127de5dd717
The date and time when the sync job was created.
2021-08-10T10:00:00.000Z
The date and time when the sync job was last updated.
2021-08-10T10:00:00.000Z