@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EventsApi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EventsApi.ListEventsOptionalParameters
Manage optional parameters to listEvents.
|
static class |
EventsApi.SearchEventsOptionalParameters
Manage optional parameters to searchEvents.
|
| Constructor and Description |
|---|
EventsApi() |
EventsApi(ApiClient apiClient) |
public EventsApi()
public EventsApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic EventCreateResponsePayload createEvent(EventCreateRequestPayload body) throws ApiException
See createEventWithHttpInfo(com.datadog.api.client.v2.model.EventCreateRequestPayload).
body - Event creation request payload. (required)ApiException - if fails to make API callpublic CompletableFuture<EventCreateResponsePayload> createEventAsync(EventCreateRequestPayload body)
See createEventWithHttpInfoAsync(com.datadog.api.client.v2.model.EventCreateRequestPayload).
body - Event creation request payload. (required)public ApiResponse<EventCreateResponsePayload> createEventWithHttpInfo(EventCreateRequestPayload body) throws ApiException
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 change or alert category
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.
body - Event creation request payload. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 202 | OK | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<EventCreateResponsePayload>> createEventWithHttpInfoAsync(EventCreateRequestPayload body)
See createEventWithHttpInfo(com.datadog.api.client.v2.model.EventCreateRequestPayload).
body - Event creation request payload. (required)public V2EventResponse getEvent(String eventId) throws ApiException
eventId - The UID of the event. (required)ApiException - if fails to make API callpublic CompletableFuture<V2EventResponse> getEventAsync(String eventId)
eventId - The UID of the event. (required)public ApiResponse<V2EventResponse> getEventWithHttpInfo(String eventId) throws ApiException
event_id.eventId - The UID of the event. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<V2EventResponse>> getEventWithHttpInfoAsync(String eventId)
eventId - The UID of the event. (required)public EventsListResponse listEvents() throws ApiException
See listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
ApiException - if fails to make API callpublic CompletableFuture<EventsListResponse> listEventsAsync()
See listEventsWithHttpInfoAsync(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
public EventsListResponse listEvents(EventsApi.ListEventsOptionalParameters parameters) throws ApiException
See listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<EventsListResponse> listEventsAsync(EventsApi.ListEventsOptionalParameters parameters)
See listEventsWithHttpInfoAsync(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
parameters - Optional parameters for the request.public PaginationIterable<EventResponse> listEventsWithPagination()
See listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
public PaginationIterable<EventResponse> listEventsWithPagination(EventsApi.ListEventsOptionalParameters parameters)
See listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
public ApiResponse<EventsListResponse> listEventsWithHttpInfo(EventsApi.ListEventsOptionalParameters parameters) throws ApiException
Use this endpoint to see your latest events.
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Not Authorized | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<EventsListResponse>> listEventsWithHttpInfoAsync(EventsApi.ListEventsOptionalParameters parameters)
See listEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.ListEventsOptionalParameters).
parameters - Optional parameters for the request.public EventsListResponse searchEvents() throws ApiException
See searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).
ApiException - if fails to make API callpublic CompletableFuture<EventsListResponse> searchEventsAsync()
public EventsListResponse searchEvents(EventsApi.SearchEventsOptionalParameters parameters) throws ApiException
See searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<EventsListResponse> searchEventsAsync(EventsApi.SearchEventsOptionalParameters parameters)
parameters - Optional parameters for the request.public PaginationIterable<EventResponse> searchEventsWithPagination()
See searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).
public PaginationIterable<EventResponse> searchEventsWithPagination(EventsApi.SearchEventsOptionalParameters parameters)
See searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).
public ApiResponse<EventsListResponse> searchEventsWithHttpInfo(EventsApi.SearchEventsOptionalParameters parameters) throws ApiException
Use this endpoint to build complex events filtering and search.
parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Not Authorized | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<EventsListResponse>> searchEventsWithHttpInfoAsync(EventsApi.SearchEventsOptionalParameters parameters)
See searchEventsWithHttpInfo(com.datadog.api.client.v2.api.EventsApi.SearchEventsOptionalParameters).
parameters - Optional parameters for the request.Copyright © 2026. All rights reserved.