Skip to content
DELETE /sync-job-run/{id}

Path Parameters

idstring
required·

The ID of the sync job run to get.

Example: 1f276317-1c44-4ae8-b2e2-f7b8bc0f6aa5

Response Body

argsRecord<string, any>

The arguments passed to the sync job run.

Example: { "project_slug": "vcs_provider/org_name/repo_name" }
created_atstring · date-time

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

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

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. On runtime versions 1 to 3, specify exactly one of daemon_group_key (Daemon), webhook_id (RapidBridge), datastore_id or super_query while creating a Sync Job Run.

Example: default
daemon_idstring

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

Example: default
datastore_idstring · uuid

The ID of the datastore the run's records are sent to, when the run uses a datastore as its destination.

error_handlingstring

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.

Example: ignore
Possible values:
fail_fastignorebatch
events_to_sendstring[]

When set, only these sync_job_run:* and record:* events are sent for the run. When not set, every event is sent.

Example: ["sync_job_run:completed","sync_job_run:failed"]
Possible values:
allintegrated_account:createdintegrated_account:updatedintegrated_account:deletedintegrated_account:activeintegrated_account:post_connect_form_submittedintegrated_account:post_install_errorintegrated_account:validation_errorintegrated_account:authentication_errorintegrated_account:forbidden_errorintegrated_account:reactivatedlink_token:connection_error+ 27 more
finished_atstring · date-time

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

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

Whether the run was started even though another run of the same sync job, integrated account and args was still active.

Example: false
idstring · uuid

The ID of the sync job run.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
ignore_previous_runboolean

Specifies if the sync job run was started ignoring the previous run date.

Example: false
integrated_account_idstring · uuid

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

Example: 94801e49-a652-42f9-af14-dd203d7897da
mutex_keystring

The sync job's mutex_key with the run's args filled in.

resource_statsRecord<string, any>

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.

Example: { "crm/contacts": { "list": { "fetched": 100, "persisted": 100 } }, "crm/deals": { "list": { "fetched": 100, "persisted": 0 }, "get": { "fetched": 100, "persisted": 100 } } }
resourcesobject[]

The resources to sync as part of the sync job.

depends_onstring

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
idstring

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}}`.
loop_onstring

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 args.user_ids and the request will be repeated for each element in the user_ids array.

Example: args.user_ids
methodstring

The method to call on the resource.

Example: list
namestring

The name of the node. Required on runtime version 4, where depends_on and destinations refer to nodes by name. Keep names unique within a sync job.

Example: tickets
persistboolean

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.

queryRecord<string, any>

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}}" }
resourcestring

The name of the resource to sync. Required for request nodes and on runtime versions 1 to 3. 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`.
run_ifstring

A JSONata expression. On runtime version 4 the node runs only when it evaluates to a truthy value.

typestring

The node type. Required on runtime version 4. Each type reads its own fields; resource, method, id, query and loop_on apply to request nodes.

Example: request
Possible values:
requesttransformspooladd_contextdestinationeventget_stateupdate_statedelete_state
started_atstring · date-time

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

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

The sync job's state_key with the run's args filled in. Names the namespace the run's state nodes use.

statusstring

The status of the sync job run. created - waiting to run, running - running, rate_limited - temporarily paused after an upstream rate-limit response and will resume automatically after backoff, completed - completed successfully, failed - failed, stopped - stopped by the user.

Example: running
Possible values:
createdrunningrate_limitedcompletedfailedstopped
super_querystring

The SuperQuery region the run's records are stored in, when the run uses SuperQuery as its destination.

Possible values:
apacwnam
sync_jobobject
args_schemaobject
required·

JSON schema defining the structure of the arguments that can be passed to the sync job. Same shape as JsonSchemaObject (top-level { type: "object", properties }).

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 } } }
7 properties
$refstring
additionalPropertiesboolean
default
descriptionstring
propertiesRecord<string, any>

Map of property name → JsonSchemaObjectProperties.

requiredboolean
typestring
Possible values:
object
args_validationstring

An optional JSONata expression evaluated against the run's args when a sync job run is created. Return an object with a message field to reject the args with a 400.

created_atstring · date-time

The date and time when the sync job was created.

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

The runtime version that sync job runs use by default.

Example: 4
Possible values:
1234
delay_between_requests_msinteger

An optional delay, in milliseconds, between requests made by the sync job's runs on runtime version 4.

environment_idstring · uuid

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

Example: 05daecaf-4365-42e8-8370-8127de5dd717
idstring · uuid

The ID of the sync job.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
integration_namestring

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

Example: zendesk
labelstring

A human-readable name for the sync job.

Example: Zendesk tickets
mutex_keystring

An optional key, with {{args.*}} placeholders, that stops a new run from starting while a run with the same resolved key is still active. Applies on runtime version 4.

Example: {{args.integrated_account_id}}
resourcesobject[]

The resources to sync as part of the sync job.

10 properties
depends_onstring

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
idstring

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}}`.
loop_onstring

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 args.user_ids and the request will be repeated for each element in the user_ids array.

Example: args.user_ids
methodstring

The method to call on the resource.

Example: list
namestring

The name of the node. Required on runtime version 4, where depends_on and destinations refer to nodes by name. Keep names unique within a sync job.

Example: tickets
persistboolean

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.

queryRecord<string, any>

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}}" }
resourcestring

The name of the resource to sync. Required for request nodes and on runtime versions 1 to 3. 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`.
run_ifstring

A JSONata expression. On runtime version 4 the node runs only when it evaluates to a truthy value.

typestring

The node type. Required on runtime version 4. Each type reads its own fields; resource, method, id, query and loop_on apply to request nodes.

Example: request
Possible values:
requesttransformspooladd_contextdestinationeventget_stateupdate_statedelete_state
state_keystring

An optional key, with {{args.*}} placeholders, that names the namespace the sync job's get_state, update_state and delete_state nodes read and write. Required for a sync job that uses those nodes.

Example: zendesk-tickets-{{args.integrated_account_id}}
updated_atstring · date-time

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

Example: 2021-08-10T10:00:00.000Z
sync_job_idstring · uuid

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

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

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

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

The runtime version of the sync job run. Defaults to the sync job's default_runtime_version.

Example: 4
Possible values:
1234
webhook_idstring · uuid

The ID of the webhook where the sync job records need to be sent. On runtime versions 1 to 3, specify exactly one of daemon_group_key (Daemon), webhook_id (RapidBridge), datastore_id or super_query while creating a Sync Job Run.

Example: 4a4de828-f4db-4c9e-adfd-434e0864c3c7
truto sync-job-runs delete '<id>'
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

await truto.syncJobRun.delete('<id>');
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    await truto_api.sync_job_runs.delete("<id>")

asyncio.run(main())
curl -X DELETE 'https://api.truto.one/sync-job-run/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.truto.one/sync-job-run/{id}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/sync-job-run/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.delete(url, headers=headers, params=params)
print(response.json())