import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { IntakePayloadAccepted } from "../models/IntakePayloadAccepted"; import { MetricAllTagsResponse } from "../models/MetricAllTagsResponse"; import { MetricAssetsResponse } from "../models/MetricAssetsResponse"; import { MetricBulkTagConfigCreateRequest } from "../models/MetricBulkTagConfigCreateRequest"; import { MetricBulkTagConfigDeleteRequest } from "../models/MetricBulkTagConfigDeleteRequest"; import { MetricBulkTagConfigResponse } from "../models/MetricBulkTagConfigResponse"; import { MetricContentEncoding } from "../models/MetricContentEncoding"; import { MetricEstimateResponse } from "../models/MetricEstimateResponse"; import { MetricPayload } from "../models/MetricPayload"; import { MetricsAndMetricTagConfigurations } from "../models/MetricsAndMetricTagConfigurations"; import { MetricsAndMetricTagConfigurationsResponse } from "../models/MetricsAndMetricTagConfigurationsResponse"; import { MetricSuggestedTagsAndAggregationsResponse } from "../models/MetricSuggestedTagsAndAggregationsResponse"; import { MetricTagCardinalitiesResponse } from "../models/MetricTagCardinalitiesResponse"; import { MetricTagConfigurationCreateRequest } from "../models/MetricTagConfigurationCreateRequest"; import { MetricTagConfigurationMetricTypeCategory } from "../models/MetricTagConfigurationMetricTypeCategory"; import { MetricTagConfigurationResponse } from "../models/MetricTagConfigurationResponse"; import { MetricTagConfigurationUpdateRequest } from "../models/MetricTagConfigurationUpdateRequest"; import { MetricVolumesResponse } from "../models/MetricVolumesResponse"; import { ScalarFormulaQueryRequest } from "../models/ScalarFormulaQueryRequest"; import { ScalarFormulaQueryResponse } from "../models/ScalarFormulaQueryResponse"; import { TimeseriesFormulaQueryRequest } from "../models/TimeseriesFormulaQueryRequest"; import { TimeseriesFormulaQueryResponse } from "../models/TimeseriesFormulaQueryResponse"; export declare class MetricsApiRequestFactory extends BaseAPIRequestFactory { createBulkTagsMetricsConfiguration(body: MetricBulkTagConfigCreateRequest, _options?: Configuration): Promise; createTagConfiguration(metricName: string, body: MetricTagConfigurationCreateRequest, _options?: Configuration): Promise; deleteBulkTagsMetricsConfiguration(body: MetricBulkTagConfigDeleteRequest, _options?: Configuration): Promise; deleteTagConfiguration(metricName: string, _options?: Configuration): Promise; estimateMetricsOutputSeries(metricName: string, filterGroups?: string, filterHoursAgo?: number, filterNumAggregations?: number, filterPct?: boolean, filterTimespanH?: number, _options?: Configuration): Promise; getMetricTagCardinalityDetails(metricName: string, _options?: Configuration): Promise; listActiveMetricConfigurations(metricName: string, windowSeconds?: number, _options?: Configuration): Promise; listMetricAssets(metricName: string, _options?: Configuration): Promise; listTagConfigurationByName(metricName: string, _options?: Configuration): Promise; listTagConfigurations(filterConfigured?: boolean, filterTagsConfigured?: string, filterMetricType?: MetricTagConfigurationMetricTypeCategory, filterIncludePercentiles?: boolean, filterQueried?: boolean, filterQueriedWindowSeconds?: number, filterTags?: string, filterRelatedAssets?: boolean, windowSeconds?: number, pageSize?: number, pageCursor?: string, _options?: Configuration): Promise; listTagsByMetricName(metricName: string, windowSeconds?: number, filterTags?: string, filterMatch?: string, filterIncludeTagValues?: boolean, filterAllowPartial?: boolean, pageLimit?: number, _options?: Configuration): Promise; listVolumesByMetricName(metricName: string, windowSeconds?: number, _options?: Configuration): Promise; queryScalarData(body: ScalarFormulaQueryRequest, _options?: Configuration): Promise; queryTimeseriesData(body: TimeseriesFormulaQueryRequest, _options?: Configuration): Promise; submitMetrics(body: MetricPayload, contentEncoding?: MetricContentEncoding, _options?: Configuration): Promise; updateTagConfiguration(metricName: string, body: MetricTagConfigurationUpdateRequest, _options?: Configuration): Promise; } export declare class MetricsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createBulkTagsMetricsConfiguration * @throws ApiException if the response code was not in [200, 299] */ createBulkTagsMetricsConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createTagConfiguration * @throws ApiException if the response code was not in [200, 299] */ createTagConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteBulkTagsMetricsConfiguration * @throws ApiException if the response code was not in [200, 299] */ deleteBulkTagsMetricsConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTagConfiguration * @throws ApiException if the response code was not in [200, 299] */ deleteTagConfiguration(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to estimateMetricsOutputSeries * @throws ApiException if the response code was not in [200, 299] */ estimateMetricsOutputSeries(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getMetricTagCardinalityDetails * @throws ApiException if the response code was not in [200, 299] */ getMetricTagCardinalityDetails(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listActiveMetricConfigurations * @throws ApiException if the response code was not in [200, 299] */ listActiveMetricConfigurations(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listMetricAssets * @throws ApiException if the response code was not in [200, 299] */ listMetricAssets(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listTagConfigurationByName * @throws ApiException if the response code was not in [200, 299] */ listTagConfigurationByName(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listTagConfigurations * @throws ApiException if the response code was not in [200, 299] */ listTagConfigurations(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listTagsByMetricName * @throws ApiException if the response code was not in [200, 299] */ listTagsByMetricName(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listVolumesByMetricName * @throws ApiException if the response code was not in [200, 299] */ listVolumesByMetricName(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to queryScalarData * @throws ApiException if the response code was not in [200, 299] */ queryScalarData(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to queryTimeseriesData * @throws ApiException if the response code was not in [200, 299] */ queryTimeseriesData(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to submitMetrics * @throws ApiException if the response code was not in [200, 299] */ submitMetrics(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateTagConfiguration * @throws ApiException if the response code was not in [200, 299] */ updateTagConfiguration(response: ResponseContext): Promise; } export interface MetricsApiCreateBulkTagsMetricsConfigurationRequest { /** * @type MetricBulkTagConfigCreateRequest */ body: MetricBulkTagConfigCreateRequest; } export interface MetricsApiCreateTagConfigurationRequest { /** * The name of the metric. * @type string */ metricName: string; /** * @type MetricTagConfigurationCreateRequest */ body: MetricTagConfigurationCreateRequest; } export interface MetricsApiDeleteBulkTagsMetricsConfigurationRequest { /** * @type MetricBulkTagConfigDeleteRequest */ body: MetricBulkTagConfigDeleteRequest; } export interface MetricsApiDeleteTagConfigurationRequest { /** * The name of the metric. * @type string */ metricName: string; } export interface MetricsApiEstimateMetricsOutputSeriesRequest { /** * The name of the metric. * @type string */ metricName: string; /** * Comma-separated list of tag keys that the metric is configured to query with. For example: `filter[groups]=app,host`. * @type string */ filterGroups?: string; /** * The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours. * @type number */ filterHoursAgo?: number; /** * Deprecated. Number of aggregations has no impact on volume. * @type number */ filterNumAggregations?: number; /** * A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. * @type boolean */ filterPct?: boolean; /** * A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour. * @type number */ filterTimespanH?: number; } export interface MetricsApiGetMetricTagCardinalityDetailsRequest { /** * The name of the metric. * @type string */ metricName: string; } export interface MetricsApiListActiveMetricConfigurationsRequest { /** * The name of the metric. * @type string */ metricName: string; /** * The number of seconds of look back (from now). * Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). * @type number */ windowSeconds?: number; } export interface MetricsApiListMetricAssetsRequest { /** * The name of the metric. * @type string */ metricName: string; } export interface MetricsApiListTagConfigurationByNameRequest { /** * The name of the metric. * @type string */ metricName: string; } export interface MetricsApiListTagConfigurationsRequest { /** * Only return custom metrics that have been configured with Metrics Without Limits. * @type boolean */ filterConfigured?: boolean; /** * Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded). * @type string */ filterTagsConfigured?: string; /** * Only return metrics of the given metric type. * @type MetricTagConfigurationMetricTypeCategory */ filterMetricType?: MetricTagConfigurationMetricTypeCategory; /** * Only return distribution metrics that have percentile aggregations enabled (true) or disabled (false). * @type boolean */ filterIncludePercentiles?: boolean; /** * Only return metrics that have been queried (true) or not queried (false) in the look back window. Set the window with `filter[queried][window][seconds]`; if omitted, a default window is used. * @type boolean */ filterQueried?: boolean; /** * This parameter has no effect unless `filter[queried]` is also set. Only return metrics that have been queried or not queried in the specified window. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. For example: `filter[queried]=true&filter[queried][window][seconds]=604800`. * @type number */ filterQueriedWindowSeconds?: number; /** * Only return metrics that were submitted with tags matching this expression. You can use AND, OR, IN, and wildcards. For example: `filter[tags]=env IN (staging,test) AND service:web*`. * @type string */ filterTags?: string; /** * Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO. * @type boolean */ filterRelatedAssets?: boolean; /** * Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. * @type number */ windowSeconds?: number; /** * Maximum number of results per page. Send `page[size]` on the first request to opt in to pagination. On each subsequent request, send `page[cursor]` set to the value of `meta.pagination.next_cursor` from the previous response. The default value is 10000, the maximum value is 10000, and the minimum value is 1. * @type number */ pageSize?: number; /** * Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null. * @type string */ pageCursor?: string; } export interface MetricsApiListTagsByMetricNameRequest { /** * The name of the metric. * @type string */ metricName: string; /** * The number of seconds of look back (from now) to query for tag data. * Default value is 14400 (4 hours), minimum value is 14400 (4 hours). * @type number */ windowSeconds?: number; /** * Filter results to tags from data points that have the specified tags. * For example, `filter[tags]=env:staging,host:123` returns tags only from data points with both `env:staging` and `host:123`. * @type string */ filterTags?: string; /** * Filter returned tags to those matching a substring. * For example, `filter[match]=env` returns tags like `env:prod`, `environment:staging`, etc. * @type string */ filterMatch?: string; /** * Whether to include tag values in the response. * Defaults to true. * @type boolean */ filterIncludeTagValues?: boolean; /** * Whether to allow partial results. * Defaults to false. * @type boolean */ filterAllowPartial?: boolean; /** * Maximum number of results to return. * @type number */ pageLimit?: number; } export interface MetricsApiListVolumesByMetricNameRequest { /** * The name of the metric. * @type string */ metricName: string; /** * The number of seconds of look back (from now). * Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month). * @type number */ windowSeconds?: number; } export interface MetricsApiQueryScalarDataRequest { /** * @type ScalarFormulaQueryRequest */ body: ScalarFormulaQueryRequest; } export interface MetricsApiQueryTimeseriesDataRequest { /** * @type TimeseriesFormulaQueryRequest */ body: TimeseriesFormulaQueryRequest; } export interface MetricsApiSubmitMetricsRequest { /** * @type MetricPayload */ body: MetricPayload; /** * HTTP header used to compress the media-type. * @type MetricContentEncoding */ contentEncoding?: MetricContentEncoding; } export interface MetricsApiUpdateTagConfigurationRequest { /** * The name of the metric. * @type string */ metricName: string; /** * @type MetricTagConfigurationUpdateRequest */ body: MetricTagConfigurationUpdateRequest; } export declare class MetricsApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: MetricsApiRequestFactory, responseProcessor?: MetricsApiResponseProcessor); /** * Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. * Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. * Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. * If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not * expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to * the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric. * Can only be used with application keys of users with the `Manage Tags for Metrics` permission. * @param param The request object */ createBulkTagsMetricsConfiguration(param: MetricsApiCreateBulkTagsMetricsConfigurationRequest, options?: Configuration): Promise; /** * Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. * Optionally, include percentile aggregations on any distribution metric. By setting `exclude_tags_mode` * to true, the behavior is changed from an allow-list to a deny-list, and tags in the defined list are * not queryable. Can only be used with application keys of users with the `Manage Tags for Metrics` * permission. * @param param The request object */ createTagConfiguration(param: MetricsApiCreateTagConfigurationRequest, options?: Configuration): Promise; /** * Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. * Metrics are selected by passing a metric name prefix. * Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. * Can only be used with application keys of users with the `Manage Tags for Metrics` permission. * @param param The request object */ deleteBulkTagsMetricsConfiguration(param: MetricsApiDeleteBulkTagsMetricsConfigurationRequest, options?: Configuration): Promise; /** * Deletes a metric's tag configuration. Can only be used with application * keys from users with the `Manage Tags for Metrics` permission. * Note: This operation is irreversible. * @param param The request object */ deleteTagConfiguration(param: MetricsApiDeleteTagConfigurationRequest, options?: Configuration): Promise; /** * Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. * @param param The request object */ estimateMetricsOutputSeries(param: MetricsApiEstimateMetricsOutputSeriesRequest, options?: Configuration): Promise; /** * Returns the cardinality details of tags for a specific metric. * @param param The request object */ getMetricTagCardinalityDetails(param: MetricsApiGetMetricTagCardinalityDetailsRequest, options?: Configuration): Promise; /** * List tags and aggregations that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name. * @param param The request object */ listActiveMetricConfigurations(param: MetricsApiListActiveMetricConfigurationsRequest, options?: Configuration): Promise; /** * Returns dashboards, monitors, notebooks, and SLOs that a metric is stored in, if any. Updated every 24 hours. * @param param The request object */ listMetricAssets(param: MetricsApiListMetricAssetsRequest, options?: Configuration): Promise; /** * Returns the tag configuration for the given metric name. * @param param The request object */ listTagConfigurationByName(param: MetricsApiListTagConfigurationByNameRequest, options?: Configuration): Promise; /** * Get a list of actively reporting metrics for your organization. Pagination is optional using the `page[cursor]` and `page[size]` query parameters. * * Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`. * @param param The request object */ listTagConfigurations(param?: MetricsApiListTagConfigurationsRequest, options?: Configuration): Promise; /** * Provide a paginated version of listTagConfigurations returning a generator with all the items. */ listTagConfigurationsWithPagination(param?: MetricsApiListTagConfigurationsRequest, options?: Configuration): AsyncGenerator; /** * View indexed and ingested tags for a given metric name. * Results are filtered by the `window[seconds]` parameter, which defaults to 14400 (4 hours). * @param param The request object */ listTagsByMetricName(param: MetricsApiListTagsByMetricNameRequest, options?: Configuration): Promise; /** * View hourly average metric volumes for the given metric name over the look back period. * * Custom metrics generated in-app from other products will return `null` for ingested volumes. * @param param The request object */ listVolumesByMetricName(param: MetricsApiListVolumesByMetricNameRequest, options?: Configuration): Promise; /** * Query scalar values (as seen on Query Value, Table, and Toplist widgets). * Multiple data sources are supported with the ability to * process the data using formulas and functions. * @param param The request object */ queryScalarData(param: MetricsApiQueryScalarDataRequest, options?: Configuration): Promise; /** * Query timeseries data across various data sources and * process the data by applying formulas and functions. * @param param The request object */ queryTimeseriesData(param: MetricsApiQueryTimeseriesDataRequest, options?: Configuration): Promise; /** * The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. * The maximum payload size is 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed size of less than 5 megabytes (5242880 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 * - 20 bytes for the metric names * - 50 bytes for the timeseries * - The full payload is approximately 100 bytes. * * Host name is one of the resources in the Resources field. * @param param The request object */ submitMetrics(param: MetricsApiSubmitMetricsRequest, options?: Configuration): Promise; /** * Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations * of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed * from an allow-list to a deny-list, and tags in the defined list will not be queryable. * Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires * a tag configuration to be created first. * @param param The request object */ updateTagConfiguration(param: MetricsApiUpdateTagConfigurationRequest, options?: Configuration): Promise; }