跳转到主要内容
POST
/
v1
/
monitors
/
{monitor_id}
更新监控器
curl --request POST \
  --url https://api.olostep.com/v1/monitors/{monitor_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "frequency": "<string>"
}
'
{
  "id": "<string>",
  "object": "monitor",
  "team_id": "<string>",
  "fda_id": "<string>",
  "query": "<string>",
  "frequency": "<string>",
  "cron_expression": "<string>",
  "notification_target": "<string>",
  "metadata": {},
  "output_schema": {},
  "error_message": "<string>",
  "created_at": 123,
  "updated_at": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.olostep.com/llms.txt

Use this file to discover all available pages before exploring further.

合并语义: 元数据更新遵循Stripe的方法——新键被添加,现有键被更新,设置为空字符串 "" 的键被删除。

授权

Authorization
string
header
必填

Bearer认证头格式为Bearer ,其中是你的认证令牌。

路径参数

monitor_id
string
必填

唯一的监控器标识符。必须以 monitor_ 开头。

Pattern: ^monitor_

请求体

application/json
metadata
object

元数据补丁。空字符串值会删除键。

frequency
string

自然语言计划指令(例如:'every day at 9am America/Los_Angeles')。如果没有指定时区,则使用 UTC。

响应

成功更新监控器。

id
string

唯一的监控标识符。

object
string
示例:

"monitor"

team_id
string
status
enum<string>

监控生命周期状态。常见值:active(按计划运行),paused(通过 /pause 禁用计划,可以通过 /resume 恢复),deleted(软删除)。

可用选项:
active,
paused,
deleted
fda_id
string
query
string

自然语言的监控意图。如果查询中包含 URL,监控将专注于该 URL。

frequency
string

自然语言的计划指令(例如:'每天在 9am America/Los_Angeles' 或 '每个工作日在 14:30')。如果未指定时区,则使用 UTC。

cron_expression
string | null
notification_channel
enum<string>
可用选项:
email,
webhook,
sms
notification_target
string
metadata
object
output_schema
object

可选的 JSON 模式,用于强制结构化监控提取输出。

error_message
string | null
created_at
integer

Unix 时间戳。

updated_at
integer

Unix 时间戳。