Package com.datadog.api.client.v1.api
Class MetricsApi
java.lang.Object
com.datadog.api.client.v1.api.MetricsApi
@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class MetricsApi
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to listActiveMetrics.static classManage optional parameters to submitDistributionPoints.static classManage optional parameters to submitMetrics. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the API client.getMetricMetadata(String metricName) Get metric metadata.getMetricMetadataAsync(String metricName) Get metric metadata.getMetricMetadataWithHttpInfo(String metricName) Get metadata about a specific metric.getMetricMetadataWithHttpInfoAsync(String metricName) Get metric metadata.listActiveMetrics(Long from) Get active metrics list.listActiveMetrics(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get active metrics list.listActiveMetricsAsync(Long from) Get active metrics list.listActiveMetricsAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get active metrics list.listActiveMetricsWithHttpInfo(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get the list of actively reporting metrics from a given time until now.listActiveMetricsWithHttpInfoAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get active metrics list.Deprecated.Deprecated.Deprecated.Deprecated.queryMetrics(Long from, Long to, String query) Query timeseries points.queryMetricsAsync(Long from, Long to, String query) Query timeseries points.queryMetricsWithHttpInfo(Long from, Long to, String query) Query timeseries points.queryMetricsWithHttpInfoAsync(Long from, Long to, String query) Query timeseries points.voidsetApiClient(ApiClient apiClient) Set the API client.Submit distribution points.submitDistributionPoints(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) Submit distribution points.Submit distribution points.submitDistributionPointsAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) Submit distribution points.submitDistributionPointsWithHttpInfo(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards.submitDistributionPointsWithHttpInfoAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) Submit distribution points.submitMetrics(MetricsPayload body) Submit metrics.submitMetrics(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) Submit metrics.Submit metrics.submitMetricsAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) Submit metrics.submitMetricsWithHttpInfo(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards.submitMetricsWithHttpInfoAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) Submit metrics.updateMetricMetadata(String metricName, MetricMetadata body) Edit metric metadata.updateMetricMetadataAsync(String metricName, MetricMetadata body) Edit metric metadata.updateMetricMetadataWithHttpInfo(String metricName, MetricMetadata body) Edit metadata of a specific metric.updateMetricMetadataWithHttpInfoAsync(String metricName, MetricMetadata body) Edit metric metadata.
-
Constructor Details
-
MetricsApi
public MetricsApi() -
MetricsApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
getMetricMetadata
Get metric metadata.- Parameters:
metricName- Name of the metric for which to get metadata. (required)- Returns:
- MetricMetadata
- Throws:
ApiException- if fails to make API call
-
getMetricMetadataAsync
Get metric metadata.- Parameters:
metricName- Name of the metric for which to get metadata. (required)- Returns:
- CompletableFuture<MetricMetadata>
-
getMetricMetadataWithHttpInfo
public ApiResponse<MetricMetadata> getMetricMetadataWithHttpInfo(String metricName) throws ApiException Get metadata about a specific metric.- Parameters:
metricName- Name of the metric for which to get metadata. (required)- Returns:
- ApiResponse<MetricMetadata>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
getMetricMetadataWithHttpInfoAsync
public CompletableFuture<ApiResponse<MetricMetadata>> getMetricMetadataWithHttpInfoAsync(String metricName) Get metric metadata.- Parameters:
metricName- Name of the metric for which to get metadata. (required)- Returns:
- CompletableFuture<ApiResponse<MetricMetadata>>
-
listActiveMetrics
Get active metrics list.- Parameters:
from- Seconds since the Unix epoch. (required)- Returns:
- MetricsListResponse
- Throws:
ApiException- if fails to make API call
-
listActiveMetricsAsync
Get active metrics list.- Parameters:
from- Seconds since the Unix epoch. (required)- Returns:
- CompletableFuture<MetricsListResponse>
-
listActiveMetrics
public MetricsListResponse listActiveMetrics(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) throws ApiException Get active metrics list.- Parameters:
from- Seconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- MetricsListResponse
- Throws:
ApiException- if fails to make API call
-
listActiveMetricsAsync
public CompletableFuture<MetricsListResponse> listActiveMetricsAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get active metrics list.- Parameters:
from- Seconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<MetricsListResponse>
-
listActiveMetricsWithHttpInfo
public ApiResponse<MetricsListResponse> listActiveMetricsWithHttpInfo(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) throws ApiException Get the list of actively reporting metrics from a given time until now.- Parameters:
from- Seconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<MetricsListResponse>
- 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 -
-
listActiveMetricsWithHttpInfoAsync
public CompletableFuture<ApiResponse<MetricsListResponse>> listActiveMetricsWithHttpInfoAsync(Long from, MetricsApi.ListActiveMetricsOptionalParameters parameters) Get active metrics list.- Parameters:
from- Seconds since the Unix epoch. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<MetricsListResponse>>
-
listMetrics
Deprecated.Search metrics.- Parameters:
q- Query string to search metrics upon. Can optionally be prefixed withmetrics:. (required)- Returns:
- MetricSearchResponse
- Throws:
ApiException- if fails to make API call
-
listMetricsAsync
Deprecated.Search metrics.- Parameters:
q- Query string to search metrics upon. Can optionally be prefixed withmetrics:. (required)- Returns:
- CompletableFuture<MetricSearchResponse>
-
listMetricsWithHttpInfo
@Deprecated public ApiResponse<MetricSearchResponse> listMetricsWithHttpInfo(String q) throws ApiException Deprecated.Note: This endpoint is deprecated. Use/api/v2/metricsinstead.Search for metrics from the last 24 hours in Datadog.
- Parameters:
q- Query string to search metrics upon. Can optionally be prefixed withmetrics:. (required)- Returns:
- ApiResponse<MetricSearchResponse>
- 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 -
-
listMetricsWithHttpInfoAsync
@Deprecated public CompletableFuture<ApiResponse<MetricSearchResponse>> listMetricsWithHttpInfoAsync(String q) Deprecated.Search metrics.- Parameters:
q- Query string to search metrics upon. Can optionally be prefixed withmetrics:. (required)- Returns:
- CompletableFuture<ApiResponse<MetricSearchResponse>>
-
queryMetrics
Query timeseries points.See
queryMetricsWithHttpInfo(java.lang.Long, java.lang.Long, java.lang.String).- Parameters:
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)- Returns:
- MetricsQueryResponse
- Throws:
ApiException- if fails to make API call
-
queryMetricsAsync
Query timeseries points.See
queryMetricsWithHttpInfoAsync(java.lang.Long, java.lang.Long, java.lang.String).- Parameters:
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)- Returns:
- CompletableFuture<MetricsQueryResponse>
-
queryMetricsWithHttpInfo
public ApiResponse<MetricsQueryResponse> queryMetricsWithHttpInfo(Long from, Long to, String query) throws ApiException Query timeseries points. Datadog recommends using the v2/api/v2/query/timeseriesendpoint over this endpoint for querying timeseries data.- Parameters:
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)- Returns:
- ApiResponse<MetricsQueryResponse>
- 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 -
-
queryMetricsWithHttpInfoAsync
public CompletableFuture<ApiResponse<MetricsQueryResponse>> queryMetricsWithHttpInfoAsync(Long from, Long to, String query) Query timeseries points.See
queryMetricsWithHttpInfo(java.lang.Long, java.lang.Long, java.lang.String).- Parameters:
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)- Returns:
- CompletableFuture<ApiResponse<MetricsQueryResponse>>
-
submitDistributionPoints
public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body) throws ApiException Submit distribution points.- Parameters:
body- (required)- Returns:
- IntakePayloadAccepted
- Throws:
ApiException- if fails to make API call
-
submitDistributionPointsAsync
public CompletableFuture<IntakePayloadAccepted> submitDistributionPointsAsync(DistributionPointsPayload body) Submit distribution points.- Parameters:
body- (required)- Returns:
- CompletableFuture<IntakePayloadAccepted>
-
submitDistributionPoints
public IntakePayloadAccepted submitDistributionPoints(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) throws ApiException Submit distribution points.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- IntakePayloadAccepted
- Throws:
ApiException- if fails to make API call
-
submitDistributionPointsAsync
public CompletableFuture<IntakePayloadAccepted> submitDistributionPointsAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) Submit distribution points.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<IntakePayloadAccepted>
-
submitDistributionPointsWithHttpInfo
public ApiResponse<IntakePayloadAccepted> submitDistributionPointsWithHttpInfo(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) throws ApiException The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<IntakePayloadAccepted>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details 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 -
-
submitDistributionPointsWithHttpInfoAsync
public CompletableFuture<ApiResponse<IntakePayloadAccepted>> submitDistributionPointsWithHttpInfoAsync(DistributionPointsPayload body, MetricsApi.SubmitDistributionPointsOptionalParameters parameters) Submit distribution points.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<IntakePayloadAccepted>>
-
submitMetrics
Submit metrics.- Parameters:
body- (required)- Returns:
- IntakePayloadAccepted
- Throws:
ApiException- if fails to make API call
-
submitMetricsAsync
Submit metrics.- Parameters:
body- (required)- Returns:
- CompletableFuture<IntakePayloadAccepted>
-
submitMetrics
public IntakePayloadAccepted submitMetrics(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) throws ApiException Submit metrics.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- IntakePayloadAccepted
- Throws:
ApiException- if fails to make API call
-
submitMetricsAsync
public CompletableFuture<IntakePayloadAccepted> submitMetricsAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) Submit metrics.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<IntakePayloadAccepted>
-
submitMetricsWithHttpInfo
public ApiResponse<IntakePayloadAccepted> submitMetricsWithHttpInfo(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) throws ApiException The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed size of less than 62 megabytes (62914560 bytes).If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:
- 64 bits for the timestamp
- 64 bits for the value
- 40 bytes for the metric names
- 50 bytes for the timeseries
- The full payload is approximately 100 bytes. However, with the DogStatsD API, compression is applied, which reduces the payload size.
- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<IntakePayloadAccepted>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details 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 -
-
submitMetricsWithHttpInfoAsync
public CompletableFuture<ApiResponse<IntakePayloadAccepted>> submitMetricsWithHttpInfoAsync(MetricsPayload body, MetricsApi.SubmitMetricsOptionalParameters parameters) Submit metrics.- Parameters:
body- (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<IntakePayloadAccepted>>
-
updateMetricMetadata
public MetricMetadata updateMetricMetadata(String metricName, MetricMetadata body) throws ApiException Edit metric metadata.See
updateMetricMetadataWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.MetricMetadata).- Parameters:
metricName- Name of the metric for which to edit metadata. (required)body- New metadata. (required)- Returns:
- MetricMetadata
- Throws:
ApiException- if fails to make API call
-
updateMetricMetadataAsync
public CompletableFuture<MetricMetadata> updateMetricMetadataAsync(String metricName, MetricMetadata body) Edit metric metadata.- Parameters:
metricName- Name of the metric for which to edit metadata. (required)body- New metadata. (required)- Returns:
- CompletableFuture<MetricMetadata>
-
updateMetricMetadataWithHttpInfo
public ApiResponse<MetricMetadata> updateMetricMetadataWithHttpInfo(String metricName, MetricMetadata body) throws ApiException Edit metadata of a specific metric. Find out more about supported types.- Parameters:
metricName- Name of the metric for which to edit metadata. (required)body- New metadata. (required)- Returns:
- ApiResponse<MetricMetadata>
- 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 -
-
updateMetricMetadataWithHttpInfoAsync
public CompletableFuture<ApiResponse<MetricMetadata>> updateMetricMetadataWithHttpInfoAsync(String metricName, MetricMetadata body) Edit metric metadata.See
updateMetricMetadataWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.MetricMetadata).- Parameters:
metricName- Name of the metric for which to edit metadata. (required)body- New metadata. (required)- Returns:
- CompletableFuture<ApiResponse<MetricMetadata>>
-