List Events
The event stream can be queried and filtered by time, priority, sources and tags.
Notes:
If the event you’re querying contains markdown formatting of any kind, you may see characters such as
%
,\
,n
in your output.This endpoint returns a maximum of
1000
most recent results. To return additional results, identify the last timestamp of the last result and set that as theend
query time to paginate the results. You can also use the page parameter to specify which set of1000
results to return.
External Documentation
To learn more, visit the Datadog documentation.
Basic Parameters
Parameter | Description |
---|---|
End | POSIX timestamp. |
Priority | The priority of the event. For example, normal or low . |
Start | POSIX timestamp. |
Advanced Parameters
Parameter | Description |
---|---|
Exclude Aggregate | Set exclude_aggregate to true to only return unaggregated events where is_aggregate=false in the response. If the exclude_aggregate parameter is set to true ,then the unaggregated parameter is ignored and will be true by default. |
Page | By default 1000 results are returned per request. Set page to the number of the page to return with 0 being the first page. The page parameter can only be usedwhen either unaggregated or exclude_aggregate is set to true. . |
Sources | A comma separated string of sources. |
Tags | A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. |
Unaggregated | Set unaggregated to true to return all events within the specified [start ,end ] timeframe.Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output. Aggregated events with is_aggregate=true in the response will still be returned unless exclude_aggregate is set to true. . |
Example Output
{
"events": [
{
"alert_type": "info",
"date_happened": 0,
"device_name": "device_name",
"host": "host",
"id": 6,
"payload": "{}",
"priority": "normal",
"source_type_name": "source_type_name",
"tags": [
"environment:test"
],
"text": "Oh boy!",
"title": "Did you hear the news today?",
"url": "url"
},
{
"alert_type": "info",
"date_happened": 0,
"device_name": "device_name",
"host": "host",
"id": 6,
"payload": "{}",
"priority": "normal",
"source_type_name": "source_type_name",
"tags": [
"environment:test"
],
"text": "Oh boy!",
"title": "Did you hear the news today?",
"url": "url"
}
],
"status": "status"
}
Workflow Library Example
List Events with Datadog and Send Results Via Email