API

用于监控项、心跳、统计、渠道和状态页的 REST API。通过 API 密钥进行身份验证。

身份验证

在“API 密钥”(Pro)中创建密钥,并以 Bearer 令牌形式发送。

curl https://app.uptimepush.com/api/v1/monitors -H "Authorization: Bearer up_live_..."

监控项

  • GET /api/v1/monitors – 列表
  • POST /api/v1/monitors – 创建(name、type、url、interval_sec 等)
  • GET /api/v1/monitors/:id – 详情
  • PATCH /api/v1/monitors/:id – 更新
  • DELETE /api/v1/monitors/:id
  • POST /api/v1/monitors/:id/pause 和 /resume
  • GET /api/v1/monitors/:id/heartbeats?hours=24
  • GET /api/v1/monitors/:id/stats?days=30

创建监控

curl -X POST https://app.uptimepush.com/api/v1/monitors \
  -H "Authorization: Bearer up_live_..." -H "Content-Type: application/json" \
  -d '{"name":"API","type":"http","url":"https://api.example.com/health","interval_sec":60}'

通知渠道与状态页

  • GET/POST /api/v1/channels,POST /api/v1/channels/:id/test
  • GET/POST /api/v1/status-pages
  • GET /api/status/:slug.json – 公开状态 JSON

响应

所有响应均为 JSON,包含 ok: true 或 ok: false 以及错误代码。速率限制:每个密钥每分钟 600 次请求。

您的网站不休息,但您可以。

几分钟即可开始监控。前 10 个监控项由我们买单。

免费开始 – 无需信用卡 ↗