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

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be Integer

search
необязательно

отфильтровать результаты

Validations:

  • Must be String

order
необязательно

отсортировать результаты

Validations:

  • Must be String

page
необязательно

разместить результат на нескольких страницах

Validations:

  • Must be String

per_page
необязательно

количество записей на запрос

Validations:

  • Must be String


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

Параметры

Имя параметра Описание
template
обязательно

Template ERB

Validations:

  • Must be String

overwrite
необязательно

Overwrite template if it already exists

Validations:

  • Must be 'true' or 'false' or '1' or '0'


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

Параметры

Имя параметра Описание
id
обязательно

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

Параметры

Имя параметра Описание
id
обязательно

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

Параметры

Имя параметра Описание
job_template
обязательно

Validations:

  • Must be a Hash

job_template[name]
обязательно

Template name

Validations:

  • Must be String

job_template[job_category]
обязательно

Job category

Validations:

  • Must be String

job_template[description_format]
необязательно , nil разрешен

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 String

job_template[template]
обязательно

Validations:

  • Must be String

job_template[provider_type]
обязательно

Provider type

Validations:

  • Must be one of: SSH.

job_template[snippet]
необязательно , nil разрешен

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[audit_comment]
необязательно , nil разрешен

Validations:

  • Must be String

job_template[locked]
необязательно , nil разрешен

Заблокирован ли шаблон для редактирования

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[ssh]
необязательно , nil разрешен

SSH provider specific options

Validations:

  • Must be a Hash

job_template[ssh][effective_user]
необязательно , nil разрешен

Effective user options

Validations:

  • Must be a Hash

job_template[ssh][effective_user][value]
необязательно , nil разрешен

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

Validations:

  • Must be String

job_template[ssh][effective_user][overridable]
необязательно , nil разрешен

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

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[ssh][effective_user][current_user]
необязательно , nil разрешен

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

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

job_template[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


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

Параметры

Имя параметра Описание
id
обязательно

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
обязательно

Validations:

  • Must be a Hash

job_template[name]
необязательно

Template name

Validations:

  • Must be String

job_template[job_category]
необязательно

Job category

Validations:

  • Must be String

job_template[description_format]
необязательно , nil разрешен

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 String

job_template[template]
необязательно

Validations:

  • Must be String

job_template[provider_type]
необязательно

Provider type

Validations:

  • Must be one of: SSH.

job_template[snippet]
необязательно , nil разрешен

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[audit_comment]
необязательно , nil разрешен

Validations:

  • Must be String

job_template[locked]
необязательно , nil разрешен

Заблокирован ли шаблон для редактирования

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[ssh]
необязательно , nil разрешен

SSH provider specific options

Validations:

  • Must be a Hash

job_template[ssh][effective_user]
необязательно , nil разрешен

Effective user options

Validations:

  • Must be a Hash

job_template[ssh][effective_user][value]
необязательно , nil разрешен

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

Validations:

  • Must be String

job_template[ssh][effective_user][overridable]
необязательно , nil разрешен

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

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[ssh][effective_user][current_user]
необязательно , nil разрешен

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

Validations:

  • Must be 'true' or 'false' or '1' or '0'

job_template[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

job_template[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


GET /api/job_templates/revision

Параметры

Имя параметра Описание
version
необязательно

Template version

Validations:

  • Must be String


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

Параметры

Имя параметра Описание
id
обязательно

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
Клонировать шаблон подготовки

Параметры

Имя параметра Описание
id
обязательно

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
обязательно

Validations:

  • Must be a Hash

job_template[name]
обязательно

Template name

Validations:

  • Must be String