# List Metric History

Launch stage: GA

`GET /api/2.0/mlflow/metrics/get-history`

Gets a list of all values for the specified metric for a given run.

API scopes: mlflow

## Query parameters

- `run_id` (string, optional)
  ID of the run from which to fetch metric values. Must be provided.
- `run_uuid` (string, optional)
  [Deprecated, use `run_id` instead] ID of the run from which to fetch metric values. This field
   will be removed in a future MLflow version.
- `metric_key` (string, optional)
  Name of the metric.
- `page_token` (string, optional)
  Token indicating the page of metric histories to fetch.
- `max_results` (int32, optional)
  Maximum number of Metric records to return per paginated request. Default is set to 25,000. If set higher than
   25,000, a request Exception will be raised.
  Constraints: `<= 25000`

## Returns

- `metrics` (array of object, optional)
  All logged values for this metric if `max_results` is not specified in the request or if the total count of
   metrics returned is less than the service level pagination threshold. Otherwise, this is one page of results.
  - `key` (string, optional)
    The key identifying the metric.
  - `value` (double, optional)
    The value of the metric.
  - `timestamp` (int64, optional)
    The timestamp at which the metric was recorded.
  - `step` (int64, optional)
    The step at which the metric was logged.
    Default: `0`
  - `dataset_name` (string, optional)
    The name of the dataset associated with the metric.
     E.g. “my.uc.table@2” “nyc-taxi-dataset”, “fantastic-elk-3”
  - `dataset_digest` (string, optional)
    The dataset digest of the dataset associated with the metric,
     e.g. an md5 hash of the dataset that uniquely identifies it
     within datasets of the same name.
  - `model_id` (string, optional)
    The ID of the logged model or registered model version associated with
     the metric, if applicable.
  - `run_id` (string, optional)
    The ID of the run containing the metric.
- `next_page_token` (string, optional)
  A token that can be used to issue a query for the next page of metric history values. A missing token indicates
   that no additional metrics are available to fetch.

## Response

```json
{
  "metrics": [
    {
      "key": "string",
      "value": 0,
      "timestamp": 0,
      "step": 0,
      "dataset_name": "string",
      "dataset_digest": "string",
      "model_id": "string",
      "run_id": "string"
    }
  ],
  "next_page_token": "string"
}
```

