events
Creates, updates, deletes, gets or lists an events resource.
Overview
| Name | events |
| Type | Resource |
| Id | datadog.service_management.events |
Fields
The following fields are returned by SELECT queries:
- get_event
- list_events
| Name | Datatype | Description |
|---|---|---|
id | string | The event's ID. (example: ) |
attributes | object | Event attributes. |
type | string | Entity type. (example: event) |
| Name | Datatype | Description |
|---|---|---|
id | string | the unique ID of the event. (example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA) |
attributes | object | The object description of an event response attribute. |
type | string | Type of the event. (event) (default: event, example: event) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_event | select | event_id | Get the details of an event by event_id. | |
list_events | select | filter[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_event | insert | data | 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.{site}/api/v2/events. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (https://api.{site}/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_events | exec | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
event_id | string | The UID of the event. |
site | string | The 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] | string | Minimum timestamp for requested events, in milliseconds. |
filter[query] | string | Search query following events syntax. |
filter[to] | string | Maximum timestamp for requested events, in milliseconds. |
page[cursor] | string | List 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) |
sort | string | Order of events in results. |
SELECT examples
- get_event
- list_events
Get the details of an event by event_id.
SELECT
id,
attributes,
type
FROM datadog.service_management.events
WHERE event_id = '{{ event_id }}' -- required
;
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.
SELECT
id,
attributes,
type
FROM datadog.service_management.events
WHERE filter[query] = '{{ filter[query] }}'
AND filter[from] = '{{ filter[from] }}'
AND filter[to] = '{{ filter[to] }}'
AND sort = '{{ sort }}'
AND page[cursor] = '{{ page[cursor] }}'
AND page[limit] = '{{ page[limit] }}'
;
INSERT examples
- create_event
- Manifest
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.{site}/api/v2/events. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (https://api.{site}/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
;
# Description fields are for documentation purposes
- name: events
props:
- name: data
description: |
An event object.
value:
attributes:
aggregation_key: "{{ aggregation_key }}"
attributes:
author:
name: "{{ name }}"
type: "{{ type }}"
change_metadata: "{{ change_metadata }}"
changed_resource:
name: "{{ name }}"
type: "{{ type }}"
impacted_resources:
- name: "{{ name }}"
type: "{{ type }}"
new_value: "{{ new_value }}"
prev_value: "{{ prev_value }}"
custom: "{{ custom }}"
links:
- category: "{{ category }}"
title: "{{ title }}"
url: "{{ url }}"
priority: "{{ priority }}"
status: "{{ status }}"
category: "{{ category }}"
host: "{{ host }}"
integration_id: "{{ integration_id }}"
message: "{{ message }}"
tags:
- "{{ tags }}"
timestamp: "{{ timestamp }}"
title: "{{ title }}"
type: "{{ type }}"
Lifecycle Methods
EXEC variables use wire (API) names.
- search_events
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 }}"
}'
;