콘텐츠로 이동

이벤트 생성



POST /api/v1/events/create

개요

이벤트를 생성하고 이벤트 내용을 지정합니다. 이 인터페이스를 통해 작성된 이벤트의 df_source=custom입니다.

Body 요청 매개변수

매개변수명 유형 필수 설명
date integer Y 이벤트 시간. Unix 타임스탬프, 단위: 밀리초
빈 값 허용: False
status string Y 이벤트 상태 (옵션: fatal/critical/error/warning/ok/info/nodata)
빈 값 허용: False
可选值: ['fatal', 'critical', 'error', 'warning', 'ok', 'info', 'nodata']
title string Y 이벤트 제목
빈 값 허용: False
message string 이벤트 상세 설명
빈 값 허용: False
origin string 이벤트 출처
빈 값 허용: False
customTags json 사용자 정의 필드 이벤트
빈 값 허용: False

매개변수 추가 설명

요청 예시

curl 'https://openapi.guance.com/api/v1/events/create' \
  -H 'Content-Type: application/json' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-raw $'{"date":1668141576000,"status":"info","title":"Test Custom Event01","message":"Test Custom Event-message","customTags":{"server":"Custom Service"}}' \
  --compressed

응답

{
    "code": 200,
    "content": true,
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-5EB2700B-52BF-40D7-A547-90FB7EC855DD"
}

문서 평가

이 페이지가 도움이 되었나요?