GET /ansible/api/ansible_variables/:id
Show variable

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

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 /ansible/api/ansible_variables
List Ansible variables

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

Validations:

  • Must be a Integer

search
optional

filter results

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

number of entries per request

Validations:

  • Must be a String


DELETE /ansible/api/ansible_variables/:id
Deletes Ansible variable

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

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 /ansible/api/ansible_variables
Create Ansible variable

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

Validations:

  • Must be a Integer

ansible_variable
required

Validations:

  • Must be a Hash

ansible_variable[variable]
required

Name of variable

Validations:

  • Must be a String

ansible_variable[ansible_role_id]
required

Role ID

Validations:

  • Must be a number.

ansible_variable[default_value]
optional , nil allowed

Default value of variable

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

ansible_variable[hidden_value]
optional , nil allowed

When enabled the parameter is hidden in the UI

Validations:

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

ansible_variable[override_value_order]
optional , nil allowed

The order in which values are resolved

Validations:

  • Must be a String

ansible_variable[description]
optional , nil allowed

Description of variable

Validations:

  • Must be a String

ansible_variable[validator_type]
optional , nil allowed

Types of validation values

Validations:

  • Must be one of: regexp, list.

ansible_variable[validator_rule]
optional , nil allowed

Used to enforce certain values for the parameter values

Validations:

  • Must be a String

ansible_variable[variable_type]
optional , nil allowed

Types of variable values

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

ansible_variable[merge_overrides]
optional , nil allowed

Merge all matching values (only array/hash type)

Validations:

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

ansible_variable[merge_default]
optional , nil allowed

Include default value when merging all matching values

Validations:

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

ansible_variable[avoid_duplicates]
optional , nil allowed

Remove duplicate values (only array type)

Validations:

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


PUT /ansible/api/ansible_variables/:id
Updates Ansible variable

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

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.

ansible_variable
required

Validations:

  • Must be a Hash

ansible_variable[variable]
optional

Name of variable

Validations:

  • Must be a String

ansible_variable[ansible_role_id]
optional

Role ID

Validations:

  • Must be a number.

ansible_variable[default_value]
optional , nil allowed

Default value of variable

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

ansible_variable[hidden_value]
optional , nil allowed

When enabled the parameter is hidden in the UI

Validations:

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

ansible_variable[override_value_order]
optional , nil allowed

The order in which values are resolved

Validations:

  • Must be a String

ansible_variable[description]
optional , nil allowed

Description of variable

Validations:

  • Must be a String

ansible_variable[validator_type]
optional , nil allowed

Types of validation values

Validations:

  • Must be one of: regexp, list.

ansible_variable[validator_rule]
optional , nil allowed

Used to enforce certain values for the parameter values

Validations:

  • Must be a String

ansible_variable[variable_type]
optional , nil allowed

Types of variable values

Validations:

  • Must be one of: string, boolean, integer, real, array, hash, yaml, json.

ansible_variable[merge_overrides]
optional , nil allowed

Merge all matching values (only array/hash type)

Validations:

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

ansible_variable[merge_default]
optional , nil allowed

Include default value when merging all matching values

Validations:

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

ansible_variable[avoid_duplicates]
optional , nil allowed

Remove duplicate values (only array type)

Validations:

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


PUT /ansible/api/ansible_variables/import
Import Ansible variables. This will only import variables for already existing roles, it will not import any new roles

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

Validations:

  • Must be a Integer

proxy_id
required

Smart Proxy to import from

Validations:

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


PUT /ansible/api/ansible_variables/obsolete
Obsolete Ansible variables. This will only obsolete variables for already existing roles, it will not delete any old roles

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organisations

Validations:

  • Must be a Integer

proxy_id
required

Smart Proxy to import from

Validations:

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