Create Event¶
POST /api/v1/events/create
Overview¶
Create an event and specify the event content. Events written through this interface have df_source=custom
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | integer | Y | Event time. Unix timestamp, unit: milliseconds Allow empty: False |
| status | string | Y | Event status (options: critical/error/warning/ok/info/nodata) Allow empty: False Options: ['critical', 'error', 'warning', 'ok', 'info', 'nodata'] |
| title | string | Y | Event title Allow empty: False |
| message | string | Event detailed description Allow empty: False |
|
| origin | string | Event source Allow empty: False |
|
| customTags | json | User-defined fields for the event Allow 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 Event01","message":"Test Custom Event-message","customTags":{"server":"Custom Service"}}' \
--compressed