GET /api/job_templates
List job templates

GET /api/locations/:location_id/job_templates
List job templates per location

GET /api/organizations/:organization_id/job_templates
List job templates per organization

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

search
Optional

filtrera resultat

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

paginate results

Validations:

  • Must be a String

per_page
Optional

antal poster per begäran

Validations:

  • Must be a String


POST /api/job_templates/import
Import a job template from ERB

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

template
Required

Template ERB

Validations:

  • Must be a String

overwrite
Optional

Overwrite template if it already exists

Validations:

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


GET /api/job_templates/:id/export
Export a job template to ERB

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/job_templates/:id
Show job template details

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/job_templates
Create a job template

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

job_template
Required

Validations:

  • Must be a Hash

job_template[name]
Required

Template name

Validations:

  • Must be a String

job_template[job_category]
Required

Job category

Validations:

  • Must be a String

job_template[description_format]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

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:

  • Must be a String

job_template[template]
Required

Validations:

  • Must be a String

job_template[provider_type]
Required

Provider type

Validations:

  • Must be one of: SSH.

job_template[snippet]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

job_template[audit_comment]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

job_template[locked]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether or not the template is locked for editing

Validations:

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

job_template[effective_user_attributes]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Effective user options

Validations:

  • Must be a Hash

job_template[effective_user_attributes][value]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

What user should be used to run the script (using sudo-like mechanisms)

Validations:

  • Must be a String

job_template[effective_user_attributes][overridable]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether it should be allowed to override the effective user from the invocation form.

Validations:

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

job_template[effective_user_attributes][current_user]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether the current user login should be used as the effective user

Validations:

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

job_template[location_ids]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

job_template[organization_ids]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/job_templates/:id
Update a job template

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

job_template
Required

Validations:

  • Must be a Hash

job_template[name]
Optional

Template name

Validations:

  • Must be a String

job_template[job_category]
Optional

Job category

Validations:

  • Must be a String

job_template[description_format]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

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:

  • Must be a String

job_template[template]
Optional

Validations:

  • Must be a String

job_template[provider_type]
Optional

Provider type

Validations:

  • Must be one of: SSH.

job_template[snippet]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Validations:

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

job_template[audit_comment]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

job_template[locked]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether or not the template is locked for editing

Validations:

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

job_template[effective_user_attributes]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Effective user options

Validations:

  • Must be a Hash

job_template[effective_user_attributes][value]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

What user should be used to run the script (using sudo-like mechanisms)

Validations:

  • Must be a String

job_template[effective_user_attributes][overridable]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether it should be allowed to override the effective user from the invocation form.

Validations:

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

job_template[effective_user_attributes][current_user]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

Whether the current user login should be used as the effective user

Validations:

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

job_template[location_ids]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

job_template[organization_ids]
Optional , <span class="translation_missing" title="translation missing: sv-SE.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


GET /api/job_templates/revision

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

version
Optional

Template version

Validations:

  • Must be a String


DELETE /api/job_templates/:id
Delete a job template

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/job_templates/:id/clone
Klona en provisioneringsmall

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

job_template
Required

Validations:

  • Must be a Hash

job_template[name]
Required

Template name

Validations:

  • Must be a String