@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsApi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MetricsApi.ListActiveMetricsOptionalParameters
Manage optional parameters to listActiveMetrics.
|
static class |
MetricsApi.SubmitDistributionPointsOptionalParameters
Manage optional parameters to submitDistributionPoints.
|
static class |
MetricsApi.SubmitMetricsOptionalParameters
Manage optional parameters to submitMetrics.
|
| Constructor and Description |
|---|
MetricsApi() |
MetricsApi(ApiClient apiClient) |
public MetricsApi()
public MetricsApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic MetricMetadata getMetricMetadata(String metricName) throws ApiException
metricName - Name of the metric for which to get metadata. (required)ApiException - if fails to make API callpublic CompletableFuture<MetricMetadata> getMetricMetadataAsync(String metricName)
metricName - Name of the metric for which to get metadata. (required)public ApiResponse<MetricMetadata> getMetricMetadataWithHttpInfo(String metricName) throws ApiException
metricName - Name of the metric for which to get metadata. (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<MetricMetadata>> getMetricMetadataWithHttpInfoAsync(String metricName)
metricName - Name of the metric for which to get metadata. (required)public MetricsListResponse listActiveMetrics(Long from) throws ApiException
from - Seconds since the Unix epoch. (required)ApiException - if fails to make API callpublic CompletableFuture<MetricsListResponse> listActiveMetricsAsync(Long from)
from - Seconds since the Unix epoch. (required)public MetricsListResponse listActiveMetrics(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) throws ApiException
from - Seconds since the Unix epoch. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<MetricsListResponse> listActiveMetricsAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters)
from - Seconds since the Unix epoch. (required)parameters - Optional parameters for the request.public ApiResponse<MetricsListResponse> listActiveMetricsWithHttpInfo(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) throws ApiException
from - Seconds since the Unix epoch. (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<MetricsListResponse>> listActiveMetricsWithHttpInfoAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters)
from - Seconds since the Unix epoch. (required)parameters - Optional parameters for the request.public MetricSearchResponse listMetrics(String q) throws ApiException
q - Query string to search metrics upon. Can optionally be prefixed with metrics:
. (required)ApiException - if fails to make API callpublic CompletableFuture<MetricSearchResponse> listMetricsAsync(String q)
q - Query string to search metrics upon. Can optionally be prefixed with metrics:
. (required)public ApiResponse<MetricSearchResponse> listMetricsWithHttpInfo(String q) throws ApiException
q - Query string to search metrics upon. Can optionally be prefixed with metrics:
. (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<MetricSearchResponse>> listMetricsWithHttpInfoAsync(String q)
q - Query string to search metrics upon. Can optionally be prefixed with metrics:
. (required)public MetricsQueryResponse queryMetrics(Long from, Long to, String query) throws ApiException
See queryMetricsWithHttpInfo(java.lang.Long, java.lang.Long, java.lang.String).
from - Start of the queried time period, seconds since the Unix epoch. (required)to - End of the queried time period, seconds since the Unix epoch. (required)query - Query string. (required)ApiException - if fails to make API callpublic CompletableFuture<MetricsQueryResponse> queryMetricsAsync(Long from, Long to, String query)
See queryMetricsWithHttpInfoAsync(java.lang.Long, java.lang.Long, java.lang.String).
from - Start of the queried time period, seconds since the Unix epoch. (required)to - End of the queried time period, seconds since the Unix epoch. (required)query - Query string. (required)public ApiResponse<MetricsQueryResponse> queryMetricsWithHttpInfo(Long from, Long to, String query) throws ApiException
from - Start of the queried time period, seconds since the Unix epoch. (required)to - End of the queried time period, seconds since the Unix epoch. (required)query - Query string. (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<MetricsQueryResponse>> queryMetricsWithHttpInfoAsync(Long from, Long to, String query)
See queryMetricsWithHttpInfo(java.lang.Long, java.lang.Long, java.lang.String).
from - Start of the queried time period, seconds since the Unix epoch. (required)to - End of the queried time period, seconds since the Unix epoch. (required)query - Query string. (required)public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body) throws ApiException
body - (required)ApiException - if fails to make API callpublic CompletableFuture<IntakePayloadAccepted> submitDistributionPointsAsync(DistributionPointsPayload body)
body - (required)public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) throws ApiException
body - (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<IntakePayloadAccepted> submitDistributionPointsAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters)
body - (required)parameters - Optional parameters for the request.public ApiResponse<IntakePayloadAccepted> submitDistributionPointsWithHttpInfo(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) throws ApiException
body - (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 202 | Payload accepted | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
| 408 | Request timeout | - |
| 413 | Payload too large | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<IntakePayloadAccepted>> submitDistributionPointsWithHttpInfoAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters)
body - (required)parameters - Optional parameters for the request.public IntakePayloadAccepted submitMetrics(MetricsPayload body) throws ApiException
body - (required)ApiException - if fails to make API callpublic CompletableFuture<IntakePayloadAccepted> submitMetricsAsync(MetricsPayload body)
body - (required)public IntakePayloadAccepted submitMetrics(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) throws ApiException
body - (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<IntakePayloadAccepted> submitMetricsAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters)
body - (required)parameters - Optional parameters for the request.public ApiResponse<IntakePayloadAccepted> submitMetricsWithHttpInfo(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) throws ApiException
If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:
body - (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 202 | Payload accepted | - |
| 400 | Bad Request | - |
| 403 | Authentication error | - |
| 408 | Request timeout | - |
| 413 | Payload too large | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<IntakePayloadAccepted>> submitMetricsWithHttpInfoAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters)
body - (required)parameters - Optional parameters for the request.public MetricMetadata updateMetricMetadata(String metricName, MetricMetadata body) throws ApiException
See updateMetricMetadataWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.MetricMetadata).
metricName - Name of the metric for which to edit metadata. (required)body - New metadata. (required)ApiException - if fails to make API callpublic CompletableFuture<MetricMetadata> updateMetricMetadataAsync(String metricName, MetricMetadata body)
metricName - Name of the metric for which to edit metadata. (required)body - New metadata. (required)public ApiResponse<MetricMetadata> updateMetricMetadataWithHttpInfo(String metricName, MetricMetadata body) throws ApiException
metricName - Name of the metric for which to edit metadata. (required)body - New metadata. (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<MetricMetadata>> updateMetricMetadataWithHttpInfoAsync(String metricName, MetricMetadata body)
See updateMetricMetadataWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.MetricMetadata).
metricName - Name of the metric for which to edit metadata. (required)body - New metadata. (required)Copyright © 2024. All rights reserved.