Package com.datadog.api.client.v2.api
Class AnnotationsApi
java.lang.Object
com.datadog.api.client.v2.api.AnnotationsApi
@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class AnnotationsApi
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to listAnnotations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an annotation.Create an annotation.Creates a new annotation on a dashboard or notebook page.Create an annotation.voiddeleteAnnotation(UUID annotationId) Delete an annotation.deleteAnnotationAsync(UUID annotationId) Delete an annotation.deleteAnnotationWithHttpInfo(UUID annotationId) Deletes an existing annotation by ID.deleteAnnotationWithHttpInfoAsync(UUID annotationId) Delete an annotation.Get the API client.getPageAnnotations(String pageId, Long startTime, Long endTime) Get annotations for a page.getPageAnnotationsAsync(String pageId, Long startTime, Long endTime) Get annotations for a page.getPageAnnotationsWithHttpInfo(String pageId, Long startTime, Long endTime) Returns all annotations on a specific page for a given time window, grouped by widget.getPageAnnotationsWithHttpInfoAsync(String pageId, Long startTime, Long endTime) Get annotations for a page.listAnnotations(String pageId, Long startTime, Long endTime) List annotations.listAnnotations(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) List annotations.listAnnotationsAsync(String pageId, Long startTime, Long endTime) List annotations.listAnnotationsAsync(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) List annotations.listAnnotationsWithHttpInfo(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) Returns a flat list of annotations matching the given page, time window, and optional widget filter.listAnnotationsWithHttpInfoAsync(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) List annotations.voidsetApiClient(ApiClient apiClient) Set the API client.updateAnnotation(UUID annotationId, AnnotationUpdateRequest body) Update an annotation.updateAnnotationAsync(UUID annotationId, AnnotationUpdateRequest body) Update an annotation.updateAnnotationWithHttpInfo(UUID annotationId, AnnotationUpdateRequest body) Updates an existing annotation.updateAnnotationWithHttpInfoAsync(UUID annotationId, AnnotationUpdateRequest body) Update an annotation.
-
Constructor Details
-
AnnotationsApi
public AnnotationsApi() -
AnnotationsApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
createAnnotation
Create an annotation.See
createAnnotationWithHttpInfo(com.datadog.api.client.v2.model.AnnotationCreateRequest).- Parameters:
body- Annotation to create. (required)- Returns:
- AnnotationResponse
- Throws:
ApiException- if fails to make API call
-
createAnnotationAsync
Create an annotation.See
createAnnotationWithHttpInfoAsync(com.datadog.api.client.v2.model.AnnotationCreateRequest).- Parameters:
body- Annotation to create. (required)- Returns:
- CompletableFuture<AnnotationResponse>
-
createAnnotationWithHttpInfo
public ApiResponse<AnnotationResponse> createAnnotationWithHttpInfo(AnnotationCreateRequest body) throws ApiException Creates a new annotation on a dashboard or notebook page. Validcolorvalues:gray,blue,purple,green,yellow,red. Validtypevalues:pointInTime(marks a single moment) ortimeRegion(spans a range and requiresend_time).- Parameters:
body- Annotation to create. (required)- Returns:
- ApiResponse<AnnotationResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Forbidden - 429 Too many requests - 500 Internal Server Error -
-
createAnnotationWithHttpInfoAsync
public CompletableFuture<ApiResponse<AnnotationResponse>> createAnnotationWithHttpInfoAsync(AnnotationCreateRequest body) Create an annotation.See
createAnnotationWithHttpInfo(com.datadog.api.client.v2.model.AnnotationCreateRequest).- Parameters:
body- Annotation to create. (required)- Returns:
- CompletableFuture<ApiResponse<AnnotationResponse>>
-
deleteAnnotation
Delete an annotation.- Parameters:
annotationId- The ID of the annotation. (required)- Throws:
ApiException- if fails to make API call
-
deleteAnnotationAsync
Delete an annotation.- Parameters:
annotationId- The ID of the annotation. (required)- Returns:
- CompletableFuture
-
deleteAnnotationWithHttpInfo
Deletes an existing annotation by ID. Returns204 No Contentif the annotation does not exist (idempotent).- Parameters:
annotationId- The ID of the annotation. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 204 No Content - 400 Bad Request - 403 Forbidden - 429 Too many requests - 500 Internal Server Error -
-
deleteAnnotationWithHttpInfoAsync
Delete an annotation.- Parameters:
annotationId- The ID of the annotation. (required)- Returns:
- CompletableFuture<ApiResponse<Void>>
-
getPageAnnotations
public PageAnnotationsResponse getPageAnnotations(String pageId, Long startTime, Long endTime) throws ApiException Get annotations for a page.See
getPageAnnotationsWithHttpInfo(java.lang.String, java.lang.Long, java.lang.Long).- Parameters:
pageId- The ID of the page, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- PageAnnotationsResponse
- Throws:
ApiException- if fails to make API call
-
getPageAnnotationsAsync
public CompletableFuture<PageAnnotationsResponse> getPageAnnotationsAsync(String pageId, Long startTime, Long endTime) Get annotations for a page.See
getPageAnnotationsWithHttpInfoAsync(java.lang.String, java.lang.Long, java.lang.Long).- Parameters:
pageId- The ID of the page, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- CompletableFuture<PageAnnotationsResponse>
-
getPageAnnotationsWithHttpInfo
public ApiResponse<PageAnnotationsResponse> getPageAnnotationsWithHttpInfo(String pageId, Long startTime, Long endTime) throws ApiException Returns all annotations on a specific page for a given time window, grouped by widget. UnlikeListAnnotations, this endpoint returns a single structured object with annotations indexed by their ID and a widget-to-annotation mapping for easy UI rendering.- Parameters:
pageId- The ID of the page, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- ApiResponse<PageAnnotationsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Forbidden - 429 Too many requests - 500 Internal Server Error -
-
getPageAnnotationsWithHttpInfoAsync
public CompletableFuture<ApiResponse<PageAnnotationsResponse>> getPageAnnotationsWithHttpInfoAsync(String pageId, Long startTime, Long endTime) Get annotations for a page.See
getPageAnnotationsWithHttpInfo(java.lang.String, java.lang.Long, java.lang.Long).- Parameters:
pageId- The ID of the page, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- CompletableFuture<ApiResponse<PageAnnotationsResponse>>
-
listAnnotations
public AnnotationsResponse listAnnotations(String pageId, Long startTime, Long endTime) throws ApiException List annotations.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- AnnotationsResponse
- Throws:
ApiException- if fails to make API call
-
listAnnotationsAsync
public CompletableFuture<AnnotationsResponse> listAnnotationsAsync(String pageId, Long startTime, Long endTime) List annotations.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)- Returns:
- CompletableFuture<AnnotationsResponse>
-
listAnnotations
public AnnotationsResponse listAnnotations(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) throws ApiException List annotations.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- AnnotationsResponse
- Throws:
ApiException- if fails to make API call
-
listAnnotationsAsync
public CompletableFuture<AnnotationsResponse> listAnnotationsAsync(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) List annotations.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<AnnotationsResponse>
-
listAnnotationsWithHttpInfo
public ApiResponse<AnnotationsResponse> listAnnotationsWithHttpInfo(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) throws ApiException Returns a flat list of annotations matching the given page, time window, and optional widget filter.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<AnnotationsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Forbidden - 429 Too many requests - 500 Internal Server Error -
-
listAnnotationsWithHttpInfoAsync
public CompletableFuture<ApiResponse<AnnotationsResponse>> listAnnotationsWithHttpInfoAsync(String pageId, Long startTime, Long endTime, AnnotationsApi.ListAnnotationsOptionalParameters parameters) List annotations.- Parameters:
pageId- ID of the page to list annotations for, prefixed with the page type and joined by a colon (for example,dashboard:abc-def-xyzornotebook:1234567890). (required)startTime- Start of the time window in milliseconds since the Unix epoch. (required)endTime- End of the time window in milliseconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<AnnotationsResponse>>
-
updateAnnotation
public AnnotationResponse updateAnnotation(UUID annotationId, AnnotationUpdateRequest body) throws ApiException Update an annotation.- Parameters:
annotationId- The ID of the annotation. (required)body- Updated annotation payload. (required)- Returns:
- AnnotationResponse
- Throws:
ApiException- if fails to make API call
-
updateAnnotationAsync
public CompletableFuture<AnnotationResponse> updateAnnotationAsync(UUID annotationId, AnnotationUpdateRequest body) Update an annotation.- Parameters:
annotationId- The ID of the annotation. (required)body- Updated annotation payload. (required)- Returns:
- CompletableFuture<AnnotationResponse>
-
updateAnnotationWithHttpInfo
public ApiResponse<AnnotationResponse> updateAnnotationWithHttpInfo(UUID annotationId, AnnotationUpdateRequest body) throws ApiException Updates an existing annotation. Validcolorvalues:gray,blue,purple,green,yellow,red. Validtypevalues:pointInTime(marks a single moment) ortimeRegion(spans a range and requiresend_time).- Parameters:
annotationId- The ID of the annotation. (required)body- Updated annotation payload. (required)- Returns:
- ApiResponse<AnnotationResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 403 Forbidden - 404 Not Found - 429 Too many requests - 500 Internal Server Error -
-
updateAnnotationWithHttpInfoAsync
public CompletableFuture<ApiResponse<AnnotationResponse>> updateAnnotationWithHttpInfoAsync(UUID annotationId, AnnotationUpdateRequest body) Update an annotation.- Parameters:
annotationId- The ID of the annotation. (required)body- Updated annotation payload. (required)- Returns:
- CompletableFuture<ApiResponse<AnnotationResponse>>
-