GET /api/config_reports
列出所有报告

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
applied
environment
eventful true, false
failed
failed_restarts
host
host_id
hostgroup
hostgroup_fullname
hostgroup_title
last_report
location
log
organization
origin
pending
reported
resource
restarted
skipped

GET /api/config_reports/:id
显示报告

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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.


POST /api/config_reports
创建报告

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

config_report
必填

Validations:

  • Must be a Hash

config_report[host]
必填

主机名或证书名称

Validations:

  • Must be a String

config_report[reported_at]
必填

报告的 UTC 时间

Validations:

  • Must be a String

config_report[status]
必填

状态类型哈希总计

Validations:

  • Must be a Hash

config_report[metrics]
必填

报告指标哈希,可只为 {}

Validations:

  • Must be a Hash

config_report[logs]
选填 , 允许空值

日志哈希的自选阵列

Validations:

  • Must be an array of any type


DELETE /api/config_reports/:id
删除报告

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String


GET /api/hosts/:host_id/config_reports/last
显示主机的最新报告

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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.