事件

备注
专家级别
API密钥应作为请求授权头中的Bearer令牌发送 获取您的API密钥.
列表

API端点:

GET
https://pu.a.koq.net/api/v1/incidents

请求示例:

curl --location --request GET 'https://pu.a.koq.net/api/v1/incidents' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
参数
类型
描述
search
可选 string
搜索查询
search_by
可选 string
按条件搜索. 可能的值为:监控monitor, 原因cause 默认为:url
monitor_id
可选 string
监控ID.
status
可选 string
状态. 可能的值为:未解决unresolved, 已确认acknowledged, 已解决resolved
sort_by
可选 string
排序依据. 可能的值为:开始日期started_at, 结束日期ended_at 默认为:ended_at
sort
可选 string
排序. 可能的值为:降序desc, 升序asc 默认为:desc
per_page
可选 integer
每页结果数. 可能的值为:10, 25, 50, 100 默认为:10
显示

API端点:

GET
https://pu.a.koq.net/api/v1/incidents/{id}

请求示例:

curl --location --request GET 'https://pu.a.koq.net/api/v1/incidents/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
更新

API端点:

PUT PATCH
https://pu.a.koq.net/api/v1/incidents/{id}

请求示例:

curl --location --request PUT 'https://pu.a.koq.net/api/v1/incidents/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
参数
类型
描述
comment
可选 string
评论.
acknowledged_at
可选 boolean
确认.
删除

API端点:

DELETE
https://pu.a.koq.net/api/v1/incidents/{id}

请求示例:

curl --location --request DELETE 'https://pu.a.koq.net/api/v1/incidents/{id}' \
--header 'Authorization: Bearer {api_key}'