v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Events

Post an event

This endpoint allows you to post events to the stream. Tag them, set priority and event aggregate them with other events.

post/api/v1/events

Request body

aggregation_keystring

An arbitrary string to use for aggregation. Limited to 100 characters. If you specify a key, all events using that key are grouped together in the Event Stream.

alert_type'error' | 'warning' | 'info' | 'success' | 'user_update' | 'recommendation' | 'snapshot'

If an alert event is enabled, set its type. For example, error, warning, info, success, user_update, recommendation, and snapshot.

date_happenedinteger

POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events no older than 18 hours

device_namestring

A device name.

hoststring

Host name to associate with the event. Any tags associated with the host are also applied to this event.

priority'normal' | 'low' nullable

The priority of the event. For example, normal or low.

related_event_idinteger

ID of the parent event. Must be sent as an integer (that is no quotes).

source_type_namestring

The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. A complete list of source attribute values available here.

tagsstring[]

A list of tags to apply to the event.

textstring required

The body of the event. Limited to 4000 characters. The text supports markdown. To use markdown in the event text, start the text block with %%% \n and end the text block with \n %%%. Use msg_text with the Datadog Ruby library.

titlestring required

The event title.

Example request

{
  "alert_type": "info",
  "priority": "normal",
  "tags": [
    "environment:test"
  ],
  "text": "Oh boy!",
  "title": "Did you hear the news today?"
}

Response

OK

statusstring

A status.

Example response

{
  "event": {
    "alert_type": "info",
    "payload": "{}",
    "priority": "normal",
    "tags": [
      "environment:test"
    ],
    "text": "Oh boy!",
    "title": "Did you hear the news today?"
  }
}