GET /api/v2/discovery_rules
List all discovery rules

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

filter results

Validations:

  • Must be a String

order
optional

sort results

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


GET /api/v2/discovery_rules/:id
Show a discovery rule

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, dot(.), space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/v2/discovery_rules
Create a discovery rule

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

discovery_rule
optional , nil allowed

Validations:

  • Must be a Hash

discovery_rule[name]
required

represents rule name shown to the users

Validations:

  • Must be a String

discovery_rule[search]
required

query to match discovered hosts for the particular rule

Validations:

  • Must be a String

discovery_rule[hostgroup_id]
required

the hostgroup that is used to auto provision a host

Validations:

  • Must be a Integer

discovery_rule[hostname]
optional , nil allowed

defines a pattern to assign human-readable hostnames to the matching hosts

Validations:

  • Must be a String

discovery_rule[max_count]
optional , nil allowed

enables to limit maximum amount of provisioned hosts per rule

Validations:

  • Must be a Integer

discovery_rule[priority]
optional , nil allowed

puts the rules in order, low numbers go first. Must be greater then zero

Validations:

  • Must be a Integer

discovery_rule[enabled]
optional , nil allowed

flag is used for temporary shutdown of rules

Validations:

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

discovery_rule[location_ids]
required

location ID for provisioned hosts

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
required

organization ID for provisioned hosts

Validations:

  • Must be an array of any type


PUT /api/v2/discovery_rules/:id
Update a rule

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.

discovery_rule
optional , nil allowed

Validations:

  • Must be a Hash

discovery_rule[name]
optional

represents rule name shown to the users

Validations:

  • Must be a String

discovery_rule[search]
optional

query to match discovered hosts for the particular rule

Validations:

  • Must be a String

discovery_rule[hostgroup_id]
optional

the hostgroup that is used to auto provision a host

Validations:

  • Must be a Integer

discovery_rule[hostname]
optional , nil allowed

defines a pattern to assign human-readable hostnames to the matching hosts

Validations:

  • Must be a String

discovery_rule[max_count]
optional , nil allowed

enables to limit maximum amount of provisioned hosts per rule

Validations:

  • Must be a Integer

discovery_rule[priority]
optional , nil allowed

puts the rules in order, low numbers go first. Must be greater then zero

Validations:

  • Must be a Integer

discovery_rule[enabled]
optional , nil allowed

flag is used for temporary shutdown of rules

Validations:

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

discovery_rule[location_ids]
optional

location ID for provisioned hosts

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
optional

organization ID for provisioned hosts

Validations:

  • Must be an array of any type


DELETE /api/v2/discovery_rules/:id
Delete a rule

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.