Skip to main content

events

Creates, updates, deletes, gets or lists an events resource.

Overview

Nameevents
TypeResource
Iddatadog.service_management.events

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe event's ID. (example: )
attributesobjectEvent attributes.
typestringEntity type. (example: event)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_eventselectevent_idGet the details of an event by event_id.
list_eventsselectfilter[query], filter[from], filter[to], sort, page[cursor], page[limit]List endpoint returns events that match an events search query.<br />[Results are paginated similarly to logs](https:​//docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).<br /><br />Use this endpoint to see your latest events.
create_eventinsertdataThis endpoint allows you to publish events.<br /><br />Note: To utilize this endpoint with our client libraries, please ensure you are using the latest version released on or after July 1, 2025. Earlier versions do not support this functionality.<br /><br />Important: Upgrade to the latest client library version to use the updated endpoint at https:​//event-management-intake.&#123;site&#125;/api/v2/events. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (https:​//api.&#123;site&#125;/api/v2/events).<br /><br />✅ Only events with the change or alert category are in General Availability. For change events, see [Change Tracking](https:​//docs.datadoghq.com/change_tracking) for more details.<br /><br />❌ For use cases involving other event categories, use the V1 endpoint or reach out to [support](https:​//www.datadoghq.com/support/).
search_eventsexecList endpoint returns events that match an events search query.<br />[Results are paginated similarly to logs](https:​//docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).<br /><br />Use this endpoint to build complex events filtering and search.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
event_idstringThe UID of the event.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[from]stringMinimum timestamp for requested events, in milliseconds.
filter[query]stringSearch query following events syntax.
filter[to]stringMaximum timestamp for requested events, in milliseconds.
page[cursor]stringList following results with a cursor provided in the previous query. (example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==)
page[limit]integer (int32)Maximum number of events in the response. (example: 25)
sortstringOrder of events in results.

SELECT examples

Get the details of an event by event_id.

SELECT
id,
attributes,
type
FROM datadog.service_management.events
WHERE event_id = '{{ event_id }}' -- required
;

INSERT examples

This endpoint allows you to publish events.<br /><br />Note: To utilize this endpoint with our client libraries, please ensure you are using the latest version released on or after July 1, 2025. Earlier versions do not support this functionality.<br /><br />Important: Upgrade to the latest client library version to use the updated endpoint at https:​//event-management-intake.&#123;site&#125;/api/v2/events. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (https:​//api.&#123;site&#125;/api/v2/events).<br /><br />✅ Only events with the change or alert category are in General Availability. For change events, see [Change Tracking](https:​//docs.datadoghq.com/change_tracking) for more details.<br /><br />❌ For use cases involving other event categories, use the V1 endpoint or reach out to [support](https:​//www.datadoghq.com/support/).

INSERT INTO datadog.service_management.events (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
links
;

Lifecycle Methods

EXEC variables use wire (API) names.

List endpoint returns events that match an events search query.<br />[Results are paginated similarly to logs](https:​//docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).<br /><br />Use this endpoint to build complex events filtering and search.

EXEC datadog.service_management.events.search_events
@@json=
'{
"filter": "{{ filter }}",
"options": "{{ options }}",
"page": "{{ page }}",
"sort": "{{ sort }}"
}'
;