GET /api/v2/discovery_rules
列出所有的搜尋規則

參數

參數名字 描述
search
選填

篩選結果


Value:

Must be String

order
選填

排序結果


Value:

Must be String

page
選填

編頁結果


Value:

Must be String

per_page
選填

每個請求的項目數量


Value:

Must be String


GET /api/v2/discovery_rules/:id
顯示搜尋規則

參數

參數名字 描述
id
必填

Value:

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
建立一項搜尋規則

參數

參數名字 描述
discovery_rule
選填 , 允許空值

Value:

Must be a Hash

discovery_rule[name]
必填

represents rule name shown to the users


Value:

Must be String

discovery_rule[search]
必填

query to match discovered hosts for the particular rule


Value:

Must be String

discovery_rule[hostgroup_id]
必填

the hostgroup that is used to auto provision a host


Value:

Must be Integer

discovery_rule[hostname]
選填 , 允許空值

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


Value:

Must be String

discovery_rule[max_count]
選填 , 允許空值

enables to limit maximum amount of provisioned hosts per rule


Value:

Must be Integer

discovery_rule[priority]
選填 , 允許空值

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


Value:

Must be Integer

discovery_rule[enabled]
選填 , 允許空值

flag is used for temporary shutdown of rules


Value:

Must be 'true' or 'false'


PUT /api/v2/discovery_rules/:id
更新規則

參數

參數名字 描述
id
必填

Value:

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
選填 , 允許空值

Value:

Must be a Hash

discovery_rule[name]
選填

represents rule name shown to the users


Value:

Must be String

discovery_rule[search]
選填

query to match discovered hosts for the particular rule


Value:

Must be String

discovery_rule[hostgroup_id]
選填

the hostgroup that is used to auto provision a host


Value:

Must be Integer

discovery_rule[hostname]
選填 , 允許空值

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


Value:

Must be String

discovery_rule[max_count]
選填 , 允許空值

enables to limit maximum amount of provisioned hosts per rule


Value:

Must be Integer

discovery_rule[priority]
選填 , 允許空值

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


Value:

Must be Integer

discovery_rule[enabled]
選填 , 允許空值

flag is used for temporary shutdown of rules


Value:

Must be 'true' or 'false'


DELETE /api/v2/discovery_rules/:id
刪除規則

參數

參數名字 描述
id
必填

Value:

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