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

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

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


GET /ansible/api/ansible_variables
List Ansible variables

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

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. '<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
ansible_role string
avoid_duplicates true, false
imported true, false
key string
merge_default true, false
merge_overrides true, false
name string
override true, false
parameter string

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

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

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


POST /ansible/api/ansible_variables
Create Ansible variable

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

ansible_variable
required

Validations:

  • Hash

ansible_variable[variable]
required

Name of variable

Validations:

  • 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:

  • String

ansible_variable[description]
optional , nil allowed

Description of variable

Validations:

  • 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:

  • 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.

ansible_variable[override]
optional , nil allowed

Whether to override variable or not

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

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

ansible_variable
required

Validations:

  • Hash

ansible_variable[variable]
optional

Name of variable

Validations:

  • 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:

  • String

ansible_variable[description]
optional , nil allowed

Description of variable

Validations:

  • 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:

  • 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.

ansible_variable[override]
optional , nil allowed

Whether to override variable or not

Validations:

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


PUT /ansible/api/ansible_variables/import DEPRECATED
DEPRECATED: 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

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

proxy_id
required

Smart Proxy to import from

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


PUT /ansible/api/ansible_variables/obsolete DEPRECATED
DEPRECATED: 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

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

proxy_id
required

Smart Proxy to import from

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..