API 레퍼런스

API 액세스는 비즈니스 플랜에서 사용 가능합니다.

깨워줘 API를 사용하면 프로그래밍 방식으로 모니터와 알림을 관리할 수 있습니다.

인증

모든 API 요청에는 API Key 인증이 필요합니다. 설정 > API Key에서 키를 발급받은 후, 요청 헤더에 포함하세요.

curl -H "X-API-Key: kkw_your_api_key_here" \
  https://kkaewo.com/api/monitors

API Key는 발급 시 1회만 전체 키를 확인할 수 있습니다. 분실 시 재발급이 필요합니다.

엔드포인트

모니터

모니터 목록 조회

GET /api/monitors

응답

[
  {
    "id": "clx...",
    "name": "메인 사이트",
    "url": "https://example.com",
    "status": "UP",
    "interval": 60,
    "lastCheckedAt": "2026-03-08T12:00:00.000Z",
    "lastCheck": {
      "status": "SUCCESS",
      "statusCode": 200,
      "responseTime": 245
    }
  }
]

모니터 생성

POST /api/monitors
Content-Type: application/json

{
  "name": "메인 사이트",
  "url": "https://example.com",
  "interval": 60,
  "timeout": 30,
  "expectedStatus": 200
}

모니터 수정

PATCH /api/monitors/{id}
Content-Type: application/json

{
  "name": "메인 사이트 (수정)",
  "interval": 300,
  "active": false
}

모니터 삭제

DELETE /api/monitors/{id}

체크 로그

체크 로그 조회

GET /api/monitors/{id}/checks?hours=24&status=all

파라미터

파라미터기본값설명
hours24조회 기간 (1, 6, 24)
statusall필터 (all, fail)

알림 채널

채널 목록 조회

GET /api/alert-channels

채널 추가

POST /api/alert-channels
Content-Type: application/json

{
  "type": "EMAIL",
  "target": "admin@example.com"
}

typeEMAIL, KAKAO, SLACK, WEBHOOK 중 하나입니다.

채널 수정

PATCH /api/alert-channels/{id}
Content-Type: application/json

{
  "active": false
}

채널 삭제

DELETE /api/alert-channels/{id}

리포트

월간 리포트 조회

GET /api/reports?month=2026-03

빌링

빌링 정보 조회

GET /api/billing

에러 응답

모든 에러는 아래 형식으로 반환됩니다:

{
  "error": "에러 메시지"
}
상태코드설명
400잘못된 요청 (유효성 검사 실패)
401인증 필요
403권한 없음 (플랜 제한 등)
404리소스를 찾을 수 없음
429요청 제한 초과
500서버 에러