GET /api/organizations/447626441/job_templates
200
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [
{
"id": 1007981928,
"name": "Job template 213",
"job_category": "Job name 217",
"provider_type": "SSH",
"snippet": false,
"description_format": null,
"created_at": "2025-08-12 18:11:20 UTC",
"updated_at": "2025-08-12 18:11:20 UTC"
}
]
}
| Param name | Description |
|---|---|
|
location_id
optional |
Scope by locations Validations:
|
|
organization_id
optional |
Scope by organizations Validations:
|
|
search
optional |
filter results Validations:
|
|
order
optional |
Sort and order by a searchable field, e.g. '<field> DESC' Validations:
|
|
page
optional |
Page number, starting at 1 Validations:
|
|
per_page
optional |
Number of results per page to return, 'all' to return all results Validations:
|
POST /api/job_templates/import
{
"template": "<%#\nname: Job template 210_renamed\nsnippet: false\nmodel: JobTemplate\njob_category: Job name 214\nprovider_type: SSH\nkind: job_template\norganizations:\n- Organization 1\nlocations:\n- Location 1\n%>\n\nid",
"job_template": {
"template": "<%#\nname: Job template 210_renamed\nsnippet: false\nmodel: JobTemplate\njob_category: Job name 214\nprovider_type: SSH\nkind: job_template\norganizations:\n- Organization 1\nlocations:\n- Location 1\n%>\n\nid"
}
}
201
{
"id": 1007981924,
"name": "Job template 210_renamed",
"template": "id",
"snippet": false,
"template_kind_id": null,
"created_at": "2025-08-12T18:11:20.253Z",
"updated_at": "2025-08-12T18:11:20.253Z",
"locked": false,
"default": false,
"vendor": null,
"os_family": null,
"job_category": "Job name 214",
"provider_type": "SSH",
"description_format": null,
"execution_timeout_interval": null,
"description": null,
"ansible_callback_enabled": false,
"cloned_from_id": null,
"ansible_check_mode": false
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
options
optional |
Validations:
|
|
options[force]
optional , nil allowed |
use if you want update locked templates Validations:
|
|
options[associate]
optional , nil allowed |
determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata Validations:
|
|
options[lock]
optional , nil allowed |
lock imported templates (false by default) Validations:
|
|
options[default]
optional , nil allowed |
makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default) Validations:
|
|
template
required |
Template ERB Validations:
|
|
overwrite
optional |
Overwrite template if it already exists Validations:
|
GET /api/job_templates/1007981930-Job%20template%20215/export 200 <%# name: Job template 215 snippet: false model: JobTemplate job_category: Job name 219 provider_type: SSH kind: job_template organizations: - Organization 1 locations: - Location 1 %> id
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
id
required |
Validations:
|
GET /api/job_templates/1007981932-Job%20template%20217
200
{
"description": null,
"description_format": null,
"created_at": "2025-08-12 18:11:21 UTC",
"updated_at": "2025-08-12 18:11:21 UTC",
"template": "id",
"locked": false,
"id": 1007981932,
"name": "Job template 217",
"job_category": "Job name 221",
"provider_type": "SSH",
"snippet": false,
"template_inputs": [],
"effective_user": {
"value": null,
"current_user": false,
"overridable": true
},
"locations": [
{
"id": 255093256,
"name": "Location 1",
"title": "Location 1",
"description": null
}
],
"organizations": [
{
"id": 447626438,
"name": "Organization 1",
"title": "Organization 1",
"description": null
}
]
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
id
required |
Validations:
|
POST /api/job_templates
{
"job_template": {}
}
422
{
"error": {
"id": null,
"errors": {
"name": [
"can't be blank"
],
"template": [
"can't be blank"
],
"provider_type": [
"can't be blank",
"Translation missing. Options considered were:\n- en.activerecord.errors.models.job_template.attributes.provider_type.uniq\n- en.activerecord.errors.models.job_template.uniq\n- en.activerecord.errors.messages.uniq\n- en.errors.attributes.provider_type.uniq\n- en.errors.messages.uniq"
]
},
"full_messages": [
"Name can't be blank",
"Template can't be blank",
"Provider type can't be blank",
"Provider type Translation missing. Options considered were:\n- en.activerecord.errors.models.job_template.attributes.provider_type.uniq\n- en.activerecord.errors.models.job_template.uniq\n- en.activerecord.errors.messages.uniq\n- en.errors.attributes.provider_type.uniq\n- en.errors.messages.uniq"
]
}
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
job_template
required |
Validations:
|
|
job_template[name]
required |
Template name Validations:
|
|
job_template[description]
optional , nil allowed |
Validations:
|
|
job_template[job_category]
required |
Job category Validations:
|
|
job_template[description_format]
optional , nil allowed |
This template is used to generate the description. Input values can be used using the syntax %{package}. You may also include the job category and template name using %{job_category} and %{template_name}. Validations:
|
|
job_template[template]
required |
Validations:
|
|
job_template[provider_type]
required |
Provider type Validations:
|
|
job_template[snippet]
optional , nil allowed |
Validations:
|
|
job_template[audit_comment]
optional , nil allowed |
Validations:
|
|
job_template[locked]
optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
|
job_template[effective_user_attributes]
optional , nil allowed |
Effective user options Validations:
|
|
job_template[effective_user_attributes][value]
optional , nil allowed |
What user should be used to run the script (using sudo-like mechanisms) Validations:
|
|
job_template[effective_user_attributes][overridable]
optional , nil allowed |
Whether it should be allowed to override the effective user from the invocation form. Validations:
|
|
job_template[effective_user_attributes][current_user]
optional , nil allowed |
Whether the current user login should be used as the effective user Validations:
|
|
job_template[location_ids]
optional , nil allowed |
REPLACE locations with given ids Validations:
|
|
job_template[organization_ids]
optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
PUT /api/job_templates/1007981919-Job%20template%20207
{
"job_template": {
"template": "blah"
}
}
200
{
"description": null,
"description_format": null,
"created_at": "2025-08-12 18:11:19 UTC",
"updated_at": "2025-08-12 18:11:19 UTC",
"template": "blah",
"locked": false,
"id": 1007981919,
"name": "Job template 207",
"job_category": "Job name 211",
"provider_type": "SSH",
"snippet": false,
"template_inputs": [],
"effective_user": {
"value": null,
"current_user": false,
"overridable": true
},
"locations": [
{
"id": 255093256,
"name": "Location 1",
"title": "Location 1",
"description": null
}
],
"organizations": [
{
"id": 447626438,
"name": "Organization 1",
"title": "Organization 1",
"description": null
}
]
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
id
required |
Validations:
|
|
job_template
required |
Validations:
|
|
job_template[name]
optional |
Template name Validations:
|
|
job_template[description]
optional , nil allowed |
Validations:
|
|
job_template[job_category]
optional |
Job category Validations:
|
|
job_template[description_format]
optional , nil allowed |
This template is used to generate the description. Input values can be used using the syntax %{package}. You may also include the job category and template name using %{job_category} and %{template_name}. Validations:
|
|
job_template[template]
optional |
Validations:
|
|
job_template[provider_type]
optional |
Provider type Validations:
|
|
job_template[snippet]
optional , nil allowed |
Validations:
|
|
job_template[audit_comment]
optional , nil allowed |
Validations:
|
|
job_template[locked]
optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
|
job_template[effective_user_attributes]
optional , nil allowed |
Effective user options Validations:
|
|
job_template[effective_user_attributes][value]
optional , nil allowed |
What user should be used to run the script (using sudo-like mechanisms) Validations:
|
|
job_template[effective_user_attributes][overridable]
optional , nil allowed |
Whether it should be allowed to override the effective user from the invocation form. Validations:
|
|
job_template[effective_user_attributes][current_user]
optional , nil allowed |
Whether the current user login should be used as the effective user Validations:
|
|
job_template[location_ids]
optional , nil allowed |
REPLACE locations with given ids Validations:
|
|
job_template[organization_ids]
optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
version
optional |
Template version Validations:
|
DELETE /api/job_templates/1007981920-Job%20template%20208
{
"job_template": {}
}
200
{
"id": 1007981920,
"name": "Job template 208",
"template": "id",
"snippet": false,
"template_kind_id": null,
"created_at": "2025-08-12T18:11:20.009Z",
"updated_at": "2025-08-12T18:11:20.009Z",
"locked": false,
"default": false,
"vendor": null,
"os_family": null,
"job_category": "Job name 212",
"provider_type": "SSH",
"description_format": null,
"execution_timeout_interval": null,
"description": null,
"ansible_callback_enabled": false,
"cloned_from_id": null,
"ansible_check_mode": false
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
id
required |
Validations:
|
POST /api/job_templates/1007981917-Job%20template%20206/clone
{
"job_template": {
"name": "MyClone"
}
}
201
{
"id": 1007981918,
"name": "MyClone",
"template": "id",
"snippet": false,
"template_kind_id": null,
"created_at": "2025-08-12T18:11:19.841Z",
"updated_at": "2025-08-12T18:11:19.841Z",
"locked": false,
"default": false,
"vendor": null,
"os_family": null,
"job_category": "Job name 210",
"provider_type": "SSH",
"description_format": null,
"execution_timeout_interval": null,
"description": null,
"ansible_callback_enabled": false,
"cloned_from_id": 1007981917,
"ansible_check_mode": false
}
| Param name | Description |
|---|---|
|
location_id
optional |
Set the current location context for the request Validations:
|
|
organization_id
optional |
Set the current organization context for the request Validations:
|
|
id
required |
Validations:
|
|
job_template
required |
Validations:
|
|
job_template[name]
required |
Template name Validations:
|