---
title: "Get a historical metrics configuration"
method: GET
path: "/api/v2/metrics/historical-metrics-configurations/{metric_name}"
tags: ["Metrics"]
---

# Get a historical metrics configuration

`GET /api/v2/metrics/historical-metrics-configurations/{metric_name}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/metrics/historical-metrics-configurations/{metric_name}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `metrics_read`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/metrics/historical-metrics-configurations/:metric_name/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the historical metrics ingestion configuration for a metric. Existence of the
resource means historical metrics ingestion is enabled; returns 404 when it is not
enabled for the metric.

## Path parameters

- `metric_name` string, required

## Response `200`

OK

- HistoricalMetricsConfigurationResponse: Response containing a historical metrics configuration.
  - `data` HistoricalMetricsConfigurationData: A historical metrics configuration resource object. Existence of this resource means historical metrics ingestion is enabled for the metric; there is no separate enabled attribute.
    - `attributes` HistoricalMetricsConfigurationAttributes: Attributes of a historical metrics configuration.
      - `created_at` string, date-time: Timestamp when historical metrics ingestion was enabled for the metric.
    - `id` string: The metric name, used as the resource ID.
    - `type` 'historical_metrics_configurations': The historical metrics configuration resource type.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
