Get sync job template by ID
/sync-job-template/{id}
Retrieves a single sync job template by its ID. The user can see this template if: 1. It's in the user's team, or 2. Its sharing is ask or allow.
Path Parameters
The ID of the sync job template to retrieve.
Response Body
Optional. The arguments for sync jobs made from this template, keyed by argument name (see the sync job's args_schema).
{
"integrated_account_id": {
"type": "string",
"format": "integrated_account_id",
"required": true
},
"project_slug": {
"type": "string"
}
}A JSONata expression that checks the args of sync jobs made from this template. Same as the sync job's args_validation.
When the template was created.
2024-01-10T10:00:00.000ZThe runtime version for any sync job that uses this template.
2Optional longer description of what this template does.
Fetches contacts from ZendeskThe unique ID of the sync job template.
The integration name to which this template applies. Empty or null for templates of runtime version 4 jobs that aren't tied to one integration.
zendeskA short descriptor for the template.
Zendesk contacts syncA list of sync job resources that define the steps. If empty, no default resources are set.
request nodes: the request body. An object whose values may use placeholders, or a JSONata string that returns the object.
The settings of a non-request node. Its shape depends on type: for example expression on transform and add_context nodes, key on the state nodes, name on event nodes and id on destination nodes.
Runtime version 4, any node: true logs a transform node's input and output.
request nodes, runtime version 4: a pause in milliseconds after each call.
request nodes, for runs that store Unified API records in Super Query: what happens to the stored records of this job and account that the run did not write. hard deletes them; soft marks them truto_deleted. Not used by runs that send to a webhook.
hardsoft
With delete_tracking, a filter (placeholders allowed) that narrows which stored records are checked.
The name of the parent node (on runtime versions 1 to 3, its name or resource). The node runs only after its parent, and each object synced for the parent is available as the resources object in placeholders, e.g. {{resources.crm.contacts.id}} when the parent is the crm/contacts resource.
list-contactsdestination nodes, runtime version 4: where the records go. config.id names the webhook or datastore.
webhookdatastore
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}}`.request nodes, runtime version 4: the integrated account to call. Required there, usually {{args.integrated_account_id}}. Versions 1 to 3 refuse it and call the run's own integrated_account_id. On version 4, add_context and get_state nodes also take it.
{{args.integrated_account_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 args.user_ids and the request will be repeated for each element in the user_ids array.
args.user_idsThe method to call on the resource.
listThe 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.
ticketsrequest nodes, runtime version 4: a JSONata expression. Truto fetches the next page only while it is truthy.
Runtime versions 1 to 3 only; refused on version 4. 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 query parameters to pass to the resource method. An object whose values may use placeholders, or a JSONata string that returns the object.
{"page":1,"per_page":100,"user_id":"{{args.user_id}}"}request nodes: call the same resource again for each returned record for which if is truthy, with config.id and config.query for the next call. Use it for nested data such as child pages.
2 properties
2 properties
A placeholder or JSONata condition, or { expression } with a JSONata expression.
object · 1 property
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.
For fetching Contacts from CRM Unified API, `crm/contacts`. For fetching Contacts from a Proxy API, `contacts`.destination nodes, runtime version 4: the names of the nodes whose records this destination sends.
A JSONata expression. On runtime version 4 the node runs only when it evaluates to a truthy value.
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.
requestrequesttransformspooladd_contextdestinationeventget_stateupdate_statedelete_state
transform nodes, runtime version 4: set true when the parent is not a request node, such as a transform that builds records from args.
The sharing policy of the template.
denyallowaskdeny
The team that owns this template.
05daecaf-4365-42e8-8370-8127de5dd717When the template was last updated.
2024-01-11T12:30:00.000ZErrors
| Status | Description |
|---|---|
401 | Unauthorized if user session is invalid |
404 | Not found if no matching template |
truto sync-job-templates get '<id>' -o jsoncurl -X GET 'https://api.truto.one/sync-job-template/{id}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/sync-job-template/{id}', {
method: 'GET',
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-template/{id}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.get(url, headers=headers, params=params)
print(response.json())