GET /api/v2/discovery_rules
列出所有发现规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


GET /api/v2/discovery_rules/:id
显示一条发现规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

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
创建发现规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

discovery_rule
选填 , 允许空值

Validations:

  • Must be a Hash

discovery_rule[name]
必填

代表显示给用户的规则名称

Validations:

  • Must be a String

discovery_rule[search]
必填

与特定规则的发现主机匹配的查询

Validations:

  • Must be a String

discovery_rule[hostgroup_id]
必填

用于自动置备主机的主机组

Validations:

  • Must be a Integer

discovery_rule[hostname]
选填 , 允许空值

定义向匹配主机分配人类可读的主机名称的模式

Validations:

  • Must be a String

discovery_rule[max_count]
选填 , 允许空值

支持根据规则限制置备主机的最大数量

Validations:

  • Must be a Integer

discovery_rule[priority]
选填 , 允许空值

按顺序排列规则,低数值优先。必须大于 0

Validations:

  • Must be a Integer

discovery_rule[enabled]
选填 , 允许空值

标记用于临时关闭规则

Validations:

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

discovery_rule[location_ids]
必填

location ID for provisioned hosts

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
必填

organization ID for provisioned hosts

Validations:

  • Must be an array of any type


PUT /api/v2/discovery_rules/:id
更新规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

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 a String

discovery_rule[search]
选填

与特定规则的发现主机匹配的查询

Validations:

  • Must be a String

discovery_rule[hostgroup_id]
选填

用于自动置备主机的主机组

Validations:

  • Must be a Integer

discovery_rule[hostname]
选填 , 允许空值

定义向匹配主机分配人类可读的主机名称的模式

Validations:

  • Must be a String

discovery_rule[max_count]
选填 , 允许空值

支持根据规则限制置备主机的最大数量

Validations:

  • Must be a Integer

discovery_rule[priority]
选填 , 允许空值

按顺序排列规则,低数值优先。必须大于 0

Validations:

  • Must be a Integer

discovery_rule[enabled]
选填 , 允许空值

标记用于临时关闭规则

Validations:

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

discovery_rule[location_ids]
选填

location ID for provisioned hosts

Validations:

  • Must be an array of any type

discovery_rule[organization_ids]
选填

organization ID for provisioned hosts

Validations:

  • Must be an array of any type


DELETE /api/v2/discovery_rules/:id
删除规则

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

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.