Examples

POST /api/job_templates/import
{
  "template": "<%#\nname: Job template 159_renamed\nsnippet: false\nmodel: JobTemplate\njob_category: Job name 160\nprovider_type: SSH\nkind: job_template\norganizations:\n- Organization 1\nlocations:\n- Location 1\n%>\n\nid",
  "job_template": {
    "template": "<%#\nname: Job template 159_renamed\nsnippet: false\nmodel: JobTemplate\njob_category: Job name 160\nprovider_type: SSH\nkind: job_template\norganizations:\n- Organization 1\nlocations:\n- Location 1\n%>\n\nid"
  }
}
201
{
  "id": 1007982017,
  "name": "Job template 159_renamed",
  "template": "id",
  "snippet": false,
  "template_kind_id": null,
  "created_at": "2022-11-08T19:06:22.335Z",
  "updated_at": "2022-11-08T19:06:22.335Z",
  "locked": false,
  "default": false,
  "vendor": null,
  "os_family": null,
  "job_category": "Job name 160",
  "provider_type": "SSH",
  "description_format": null,
  "execution_timeout_interval": null,
  "description": null
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

template
required

Template ERB

Validations:

  • String

overwrite
optional

Overwrite template if it already exists

Validations:

  • Must be one of: true, false, 1, 0.