@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class WidgetsApi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WidgetsApi.SearchWidgetsOptionalParameters
Manage optional parameters to searchWidgets.
|
| Constructor and Description |
|---|
WidgetsApi() |
WidgetsApi(ApiClient apiClient) |
public WidgetsApi()
public WidgetsApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic WidgetResponse createWidget(WidgetExperienceType experienceType, CreateOrUpdateWidgetRequest body) throws ApiException
experienceType - The experience type for the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type: every type requires requests, and some
types require additional fields (e.g. cloud_cost_summary requires
graph_options, geomap requires style and view
). The example below shows a complete cloud_cost_summary payload for the
ccm_reports experience type. (required)ApiException - if fails to make API callpublic CompletableFuture<WidgetResponse> createWidgetAsync(WidgetExperienceType experienceType, CreateOrUpdateWidgetRequest body)
experienceType - The experience type for the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type: every type requires requests, and some
types require additional fields (e.g. cloud_cost_summary requires
graph_options, geomap requires style and view
). The example below shows a complete cloud_cost_summary payload for the
ccm_reports experience type. (required)public ApiResponse<WidgetResponse> createWidgetWithHttpInfo(WidgetExperienceType experienceType, CreateOrUpdateWidgetRequest body) throws ApiException
experienceType - The experience type for the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type: every type requires requests, and some
types require additional fields (e.g. cloud_cost_summary requires
graph_options, geomap requires style and view
). The example below shows a complete cloud_cost_summary payload for the
ccm_reports experience type. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<WidgetResponse>> createWidgetWithHttpInfoAsync(WidgetExperienceType experienceType, CreateOrUpdateWidgetRequest body)
experienceType - The experience type for the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type: every type requires requests, and some
types require additional fields (e.g. cloud_cost_summary requires
graph_options, geomap requires style and view
). The example below shows a complete cloud_cost_summary payload for the
ccm_reports experience type. (required)public void deleteWidget(WidgetExperienceType experienceType, UUID uuid) throws ApiException
See deleteWidgetWithHttpInfo(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> deleteWidgetAsync(WidgetExperienceType experienceType, UUID uuid)
See deleteWidgetWithHttpInfoAsync(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)public ApiResponse<Void> deleteWidgetWithHttpInfo(WidgetExperienceType experienceType, UUID uuid) throws ApiException
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> deleteWidgetWithHttpInfoAsync(WidgetExperienceType experienceType, UUID uuid)
See deleteWidgetWithHttpInfo(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)public WidgetResponse getWidget(WidgetExperienceType experienceType, UUID uuid) throws ApiException
See getWidgetWithHttpInfo(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)ApiException - if fails to make API callpublic CompletableFuture<WidgetResponse> getWidgetAsync(WidgetExperienceType experienceType, UUID uuid)
See getWidgetWithHttpInfoAsync(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)public ApiResponse<WidgetResponse> getWidgetWithHttpInfo(WidgetExperienceType experienceType, UUID uuid) throws ApiException
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<WidgetResponse>> getWidgetWithHttpInfoAsync(WidgetExperienceType experienceType, UUID uuid)
See getWidgetWithHttpInfo(com.datadog.api.client.v2.model.WidgetExperienceType, java.util.UUID).
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)public WidgetListResponse searchWidgets(WidgetExperienceType experienceType) throws ApiException
experienceType - The experience type for the widget. (required)ApiException - if fails to make API callpublic CompletableFuture<WidgetListResponse> searchWidgetsAsync(WidgetExperienceType experienceType)
experienceType - The experience type for the widget. (required)public WidgetListResponse searchWidgets(WidgetExperienceType experienceType, WidgetsApi.SearchWidgetsOptionalParameters parameters) throws ApiException
experienceType - The experience type for the widget. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<WidgetListResponse> searchWidgetsAsync(WidgetExperienceType experienceType, WidgetsApi.SearchWidgetsOptionalParameters parameters)
experienceType - The experience type for the widget. (required)parameters - Optional parameters for the request.public ApiResponse<WidgetListResponse> searchWidgetsWithHttpInfo(WidgetExperienceType experienceType, WidgetsApi.SearchWidgetsOptionalParameters parameters) throws ApiException
Response meta carries totals scoped to the current filter: -
filtered_total — widgets matching the filter. - created_by_you_total —
among the matches, how many the current user created. - favorited_by_you_total —
among the matches, how many the current user has favorited. - created_by_anyone_total
— total widgets in the experience type, ignoring filters.
Each returned widget includes is_favorited reflecting the current user's
favorite status. Favoriting itself is performed through the shared favorites API, not this
endpoint.
experienceType - The experience type for the widget. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<WidgetListResponse>> searchWidgetsWithHttpInfoAsync(WidgetExperienceType experienceType, WidgetsApi.SearchWidgetsOptionalParameters parameters)
experienceType - The experience type for the widget. (required)parameters - Optional parameters for the request.public WidgetResponse updateWidget(WidgetExperienceType experienceType, UUID uuid, CreateOrUpdateWidgetRequest body) throws ApiException
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type; see CreateWidget above for a complete
worked payload. Update is a full replacement of the widget definition. (required)ApiException - if fails to make API callpublic CompletableFuture<WidgetResponse> updateWidgetAsync(WidgetExperienceType experienceType, UUID uuid, CreateOrUpdateWidgetRequest body)
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type; see CreateWidget above for a complete
worked payload. Update is a full replacement of the widget definition. (required)public ApiResponse<WidgetResponse> updateWidgetWithHttpInfo(WidgetExperienceType experienceType, UUID uuid, CreateOrUpdateWidgetRequest body) throws ApiException
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type; see CreateWidget above for a complete
worked payload. Update is a full replacement of the widget definition. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<WidgetResponse>> updateWidgetWithHttpInfoAsync(WidgetExperienceType experienceType, UUID uuid, CreateOrUpdateWidgetRequest body)
experienceType - The experience type for the widget. (required)uuid - The UUID of the widget. (required)body - Widget request body. The definition object's required fields vary by
widget.definition.type; see CreateWidget above for a complete
worked payload. Update is a full replacement of the widget definition. (required)Copyright © 2026. All rights reserved.