Skip to content

POST /api/status-monitors

请求

内容
方法POST
路径/api/status-monitors
鉴权管理员

Header 参数

参数位置类型必填说明
AuthorizationHeaderstringBearer <jwt>
Content-TypeHeaderstringapplication/json

Path 参数

无。

Query 参数

无。

Body 参数

参数位置类型必填说明
nameBodystring名称。
typeBodystring类型。
targetBodystring监控目标。
enabledBodyboolean是否启用。
interval_secondsBodynumber请求字段。

返回值

新状态监控。

返回字段

字段类型说明
idnumber监控项 ID。
namestring名称。
target_urlstring监控目标 URL。
check_typestring检查类型。
methodstringHTTP 方法。
interval_secondsnumber检查间隔秒数。
retention_hoursnumber记录保留小时数。
enabledboolean是否启用。
last_statusstring最近状态。
last_checked_atstring/null最近检查时间。
created_atstring创建时间。
updated_atstring更新时间。

错误

状态码说明
400参数不合法。
401未登录或登录失效。
403无权限。
404资源不存在。
500服务端错误。

基于 MIT 协议发布(社区版)