Get a template
const url = 'https://api.sloose.com/orgs/org_9f3c/templates/b3f1c8a2';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.sloose.com/orgs/org_9f3c/templates/b3f1c8a2 \ --header 'Authorization: Bearer <token>'The template with its configuration, migrated forward on read. migrated lists the steps that were applied — non-empty means the stored row was written by an older build and will be rewritten on the next save.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
The template id.
Example
b3f1c8a2The template id.
Responses
Section titled “Responses”The template.
object
object
The connection it was built for, when it names one: a template saved from an import records that import’s, and an import started from it pre-selects that one. Null on a template that names none — pushed from a configuration repository, or written by an agent without one — which is picked for on Target, among the connections of its kind.
The configuration version the recipe was built against, as its save REPORTED it (#616): an agent’s save over MCP stamps the version it checked the recipe against, and a repository’s push the version it wrote (none when another write landed while it wrote the configuration, which it checks before its templates; one landing while the templates are saved is outside that check, and the stamp stays, #650); any other save, the registryVersion it sent — a label the server stores for any version the org has reached, not one it checked. null when the save said none.
bundle:<file> when pushed from a config repo; null when built by a person.
The kind of connection this template imports into — zoho_crm. Null on a template saved before kinds were recorded, which is read as Zoho CRM, the only kind there was.
Which version of the template this is. “Update the template” writes the next one; an import that copied an earlier one is told the template has moved on.
sdk when a config repo owns the template: changes arrive by the next push, and updates from an import are refused. Null when people own it.
When a run last started from it — a run authorised for an import made from it, or naming it with no import, a dry run included. Null for one no run has started from. Runs are purged, so this is kept, not worked out; it moves no version.
Migrated to the current schema version on read. Null when it could not be migrated.
Migration steps applied on read. Non-empty means the stored row is from an older build.
Example
{ "template": { "visibility": "private", "managedBy": "sdk" }}No bearer, or one that is expired, revoked or no longer resolves to a member.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low, or it was issued for a different org.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such template, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}