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

參數

參數名字 描述
search
選填

篩選結果

Validations:

  • Must be String

order
選填

排序結果

Validations:

  • Must be String

page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


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

參數

參數名字 描述
id
必填

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

參數

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

Validations:

  • Must be a Hash

discovery_rule[name]
必填

代表使用者所會看見的規則名稱

Validations:

  • Must be String

discovery_rule[search]
必填

查詢與發現的主機相符的特定規則

Validations:

  • Must be String

discovery_rule[hostgroup_id]
必填

用來自動佈建一部主機的主機群組

Validations:

  • Must be Integer

discovery_rule[hostname]
選填 , 允許空值

定義一項模式來為相符的主機指定易讀的主機名稱

Validations:

  • Must be String

discovery_rule[max_count]
選填 , 允許空值

啟用來限制每個規則所能搭配的最大已佈建主機之數量

Validations:

  • Must be Integer

discovery_rule[priority]
選填 , 允許空值

按照順序排序規則,數字較小的優先。必須大於零

Validations:

  • Must be Integer

discovery_rule[enabled]
選填 , 允許空值

旗標可用來暫時性關閉規則

Validations:

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

discovery_rule[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


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

參數

參數名字 描述
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.

discovery_rule
選填 , 允許空值

Validations:

  • Must be a Hash

discovery_rule[name]
選填

代表使用者所會看見的規則名稱

Validations:

  • Must be String

discovery_rule[search]
選填

查詢與發現的主機相符的特定規則

Validations:

  • Must be String

discovery_rule[hostgroup_id]
選填

用來自動佈建一部主機的主機群組

Validations:

  • Must be Integer

discovery_rule[hostname]
選填 , 允許空值

定義一項模式來為相符的主機指定易讀的主機名稱

Validations:

  • Must be String

discovery_rule[max_count]
選填 , 允許空值

啟用來限制每個規則所能搭配的最大已佈建主機之數量

Validations:

  • Must be Integer

discovery_rule[priority]
選填 , 允許空值

按照順序排序規則,數字較小的優先。必須大於零

Validations:

  • Must be Integer

discovery_rule[enabled]
選填 , 允許空值

旗標可用來暫時性關閉規則

Validations:

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

discovery_rule[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


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

參數

參數名字 描述
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.