Skip to main content
PATCH
/
alert-rules
/
{alert_rule_id}
/
condition
알림 규칙 조건 수정
curl --request PATCH \
  --url https://client-api.tryvox.co/v3/alert-rules/{alert_rule_id}/condition \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "labels": {},
  "threshold_type": "absolute",
  "comparison_op": "gt",
  "threshold_value": 1,
  "time_window": "1m",
  "evaluation_frequency": "1m"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "metric_type": "call_count",
  "labels": {},
  "threshold_type": "absolute",
  "comparison_op": "gt",
  "threshold_value": 123,
  "time_window": "1m",
  "evaluation_frequency": "1m",
  "enabled": true,
  "status": "active",
  "notification_channels": [
    {
      "type": "webhook"
    }
  ],
  "paused": true,
  "created_at": 123,
  "updated_at": 123,
  "description": "<string>",
  "active_schedule": {
    "enabled": true,
    "timezone": "<string>",
    "windows": [
      {
        "days": [
          "Monday"
        ],
        "start_time": "<string>",
        "end_time": "<string>"
      }
    ]
  },
  "paused_until": 123,
  "last_notified_at": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryvox.co/llms.txt

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

Authorizations

Authorization
string
header
required

조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.

Path Parameters

alert_rule_id
string<uuid>
required

알림 규칙 ID입니다.

Body

application/json

알림 조건 수정 요청입니다. metric_type은 변경할 수 없으므로 바꾸려면 규칙을 새로 생성합니다.

알림 조건 수정 요청.

필드를 생략하면 기존 값이 유지됩니다. 조건 종류인 metric_type은 생성 후 변경할 수 없습니다.

labels
Labels · object

메트릭 필터링 레이블. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

threshold_type
enum<string>

임계값 비교 방식. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

Available options:
absolute,
relative
comparison_op
enum<string>

임계값 비교 연산자. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

Available options:
gt,
gte,
lt,
lte
threshold_value
number

임계값. 0 이상. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

Required range: x >= 0
time_window
enum<string>

메트릭 집계 시간 범위. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

Available options:
1m,
5m,
15m,
30m,
1h,
4h,
8h,
1d
evaluation_frequency
enum<string>

평가 주기. time_window보다 짧으면 rolling window를 더 자주 확인합니다. 필드를 생략하면 기존 값이 유지됩니다. null 전송 시 400.

Available options:
1m,
5m,
15m,
30m,
1h,
4h,
8h,
1d

Response

성공 응답

알림 규칙 단건 응답입니다.

id
string
required

알림 규칙의 고유 식별자입니다.

name
string
required

알림 규칙의 이름입니다.

metric_type
enum<string>
required

모니터링 대상 메트릭 유형입니다.

Available options:
call_count,
concurrency,
tool_call_count,
api_call_count
labels
Labels · object
required

메트릭 필터링에 사용되는 레이블 조건입니다.

threshold_type
enum<string>
required

임계값 비교 방식입니다.

Available options:
absolute,
relative
comparison_op
enum<string>
required

임계값 비교 연산자입니다.

Available options:
gt,
gte,
lt,
lte
threshold_value
number
required

알림을 발생시키는 임계값입니다.

time_window
enum<string>
required

메트릭 집계 시간 범위입니다.

Available options:
1m,
5m,
15m,
30m,
1h,
4h,
8h,
1d
evaluation_frequency
enum<string>
required

알림 규칙 평가 주기입니다.

Available options:
1m,
5m,
15m,
30m,
1h,
4h,
8h,
1d
enabled
boolean
required

알림 규칙의 활성화 여부입니다.

status
enum<string>
required

파생된 단일 상태입니다. enabled/paused에서 도출합니다. 'disabled' = enabled=false, 'paused' = enabled=true AND paused=true, 'active' = 그 외. paused_until·active_schedule은 별도 필드로 유지됩니다.

Available options:
active,
disabled,
paused
notification_channels
(WebhookChannelResponse · object | EmailChannelResponse · object | SlackChannelResponse · object)[]
required

알림을 전송할 채널 목록입니다. webhook, email, slack 타입을 지원합니다.

webhook 알림 채널 응답입니다.

paused
boolean
required

알림 규칙의 일시정지 여부입니다.

created_at
integer
required

리소스 생성 시각입니다. unix milliseconds 형식입니다.

updated_at
integer
required

리소스 마지막 수정 시각입니다. unix milliseconds 형식입니다.

description
string | null

알림 규칙에 대한 상세 설명입니다.

active_schedule
ActiveScheduleResponse · object

알림 규칙이 활성화되는 시간 스케줄입니다.

paused_until
integer | null

알림 일시정지 해제 예정 일시입니다. unix timestamp (ms).

last_notified_at
integer | null

마지막으로 알림이 전송된 일시입니다. unix timestamp (ms).