Skip to content

Create Event



POST /api/v1/events/create

Overview

Create an event and specify the event content. For events written through this interface, df_source=custom.

Body Request Parameters

Parameter Name Type Required Description
date integer Y Event time. Unix timestamp, unit: milliseconds
Can be empty: False
status string Y Event status (Options: critical/error/warning/ok/info/nodata)
Can be empty: False
Options: ['critical', 'error', 'warning', 'ok', 'info', 'nodata']
title string Y Event title
Can be empty: False
message string Detailed description of the event
Can be empty: False
origin string Source of the event
Can be empty: False
customTags json User-defined field events
Can be empty: False

Additional Parameter Notes

Request Example

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 Event 01","message":"Test Custom Event - message","customTags":{"server":"Custom Service"}}' \
  --compressed

Response

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

Feedback

Is this page helpful? ×