Class EventsApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to listEvents.static classManage optional parameters to searchEvents. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPost an event.Post an event.This endpoint allows you to publish events.Post an event.Get the API client.Get an event.getEventAsync(String eventId) Get an event.getEventWithHttpInfo(String eventId) Get the details of an event byevent_id.getEventWithHttpInfoAsync(String eventId) Get an event.Get a list of events.listEvents(EventsApi.ListEventsOptionalParameters parameters) Get a list of events.Get a list of events.Get a list of events.List endpoint returns events that match an events search query.Get a list of events.Get a list of events.Get a list of events.Search events.searchEvents(EventsApi.SearchEventsOptionalParameters parameters) Search events.Search events.Search events.List endpoint returns events that match an events search query.Search events.Search events.Search events.voidsetApiClient(ApiClient apiClient) Set the API client.
-
Constructor Details
-
EventsApi
public EventsApi() -
EventsApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
createEvent
Post an event.See
createEventWithHttpInfo(com.datadog.api.client.v2.model.EventCreateRequestPayload).- Parameters:
body- Event creation request payload. (required)- Returns:
- EventCreateResponsePayload
- Throws:
ApiException- if fails to make API call
-
createEventAsync
public CompletableFuture<EventCreateResponsePayload> createEventAsync(EventCreateRequestPayload body) Post an event.See
createEventWithHttpInfoAsync(com.datadog.api.client.v2.model.EventCreateRequestPayload).- Parameters:
body- Event creation request payload. (required)- Returns:
- CompletableFuture<EventCreateResponsePayload>
-
createEventWithHttpInfo
public ApiResponse<EventCreateResponsePayload> createEventWithHttpInfo(EventCreateRequestPayload body) throws ApiException This endpoint allows you to publish events.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.
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).✅ Only events with the
changeoralertcategory are in General Availability. For change events, see Change Tracking for more details.❌ For use cases involving other event categories, use the V1 endpoint or reach out to support.
- Parameters:
body- Event creation request payload. (required)- Returns:
- ApiResponse<EventCreateResponsePayload>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 202 OK - 400 Bad request - 403 Forbidden - 429 Too many requests -
-
createEventWithHttpInfoAsync
public CompletableFuture<ApiResponse<EventCreateResponsePayload>> createEventWithHttpInfoAsync(EventCreateRequestPayload body) Post an event.See
createEventWithHttpInfo(com.datadog.api.client.v2.model.EventCreateRequestPayload).- Parameters:
body- Event creation request payload. (required)- Returns:
- CompletableFuture<ApiResponse<EventCreateResponsePayload>>
-
getEvent
Get an event.- Parameters:
eventId- The UID of the event. (required)- Returns:
- V2EventResponse
- Throws:
ApiException- if fails to make API call
-
getEventAsync
Get an event.- Parameters:
eventId- The UID of the event. (required)- Returns:
- CompletableFuture<V2EventResponse>
-
getEventWithHttpInfo
Get the details of an event byevent_id.- Parameters:
eventId- The UID of the event. (required)- Returns:
- ApiResponse<V2EventResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
getEventWithHttpInfoAsync
Get an event.- Parameters:
eventId- The UID of the event. (required)- Returns:
- CompletableFuture<ApiResponse<V2EventResponse>>
-
listEvents
Get a list of events.See
listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Returns:
- EventsListResponse
- Throws:
ApiException- if fails to make API call
-
listEventsAsync
Get a list of events.See
listEventsWithHttpInfoAsync(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Returns:
- CompletableFuture<EventsListResponse>
-
listEvents
public EventsListResponse listEvents(EventsApi.ListEventsOptionalParameters parameters) throws ApiException Get a list of events.See
listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- EventsListResponse
- Throws:
ApiException- if fails to make API call
-
listEventsAsync
public CompletableFuture<EventsListResponse> listEventsAsync(EventsApi.ListEventsOptionalParameters parameters) Get a list of events.See
listEventsWithHttpInfoAsync(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<EventsListResponse>
-
listEventsWithPagination
Get a list of events.See
listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Returns:
- PaginationIterable<EventResponse>
-
listEventsWithPagination
public PaginationIterable<EventResponse> listEventsWithPagination(EventsApi.ListEventsOptionalParameters parameters) Get a list of events.See
listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Returns:
- EventsListResponse
-
listEventsWithHttpInfo
public ApiResponse<EventsListResponse> listEventsWithHttpInfo(EventsApi.ListEventsOptionalParameters parameters) throws ApiException List endpoint returns events that match an events search query. Results are paginated similarly to logs.Use this endpoint to see your latest events.
- Parameters:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<EventsListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Not Authorized - 429 Too many requests -
-
listEventsWithHttpInfoAsync
public CompletableFuture<ApiResponse<EventsListResponse>> listEventsWithHttpInfoAsync(EventsApi.ListEventsOptionalParameters parameters) Get a list of events.See
listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<EventsListResponse>>
-
searchEvents
Search events.See
searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).- Returns:
- EventsListResponse
- Throws:
ApiException- if fails to make API call
-
searchEventsAsync
Search events.- Returns:
- CompletableFuture<EventsListResponse>
-
searchEvents
public EventsListResponse searchEvents(EventsApi.SearchEventsOptionalParameters parameters) throws ApiException Search events.See
searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- EventsListResponse
- Throws:
ApiException- if fails to make API call
-
searchEventsAsync
public CompletableFuture<EventsListResponse> searchEventsAsync(EventsApi.SearchEventsOptionalParameters parameters) Search events.- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<EventsListResponse>
-
searchEventsWithPagination
Search events.See
searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).- Returns:
- PaginationIterable<EventResponse>
-
searchEventsWithPagination
public PaginationIterable<EventResponse> searchEventsWithPagination(EventsApi.SearchEventsOptionalParameters parameters) Search events.See
searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).- Returns:
- EventsListResponse
-
searchEventsWithHttpInfo
public ApiResponse<EventsListResponse> searchEventsWithHttpInfo(EventsApi.SearchEventsOptionalParameters parameters) throws ApiException List endpoint returns events that match an events search query. Results are paginated similarly to logs.Use this endpoint to build complex events filtering and search.
- Parameters:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<EventsListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Not Authorized - 429 Too many requests -
-
searchEventsWithHttpInfoAsync
public CompletableFuture<ApiResponse<EventsListResponse>> searchEventsWithHttpInfoAsync(EventsApi.SearchEventsOptionalParameters parameters) Search events.See
searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<EventsListResponse>>
-