コンテンツにスキップ

イベントの作成



POST /api/v1/events/create

概要

イベントを作成し、イベントの内容を指定します。このインターフェースを通じて書き込まれたイベントの df_sourcecustom になります。

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"
}

フィードバック

このページは役に立ちましたか?