# Refresh Metrics

Source: https://agenta.ai/docs/reference/api/refresh-metrics

`POST /evaluations/metrics/refresh`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Refresh Metrics

## Request body schema

Content type: `application/json` (required)

- `metrics` (object, required)
  - `interval` (integer, nullable)
  - `timestamp` (string (date-time), nullable)
  - `timestamps` (array of string (date-time), nullable)
  - `scenario_id` (string (uuid), nullable)
  - `scenario_ids` (array of string (uuid), nullable)
  - `run_id` (string (uuid), nullable)
  - `run_ids` (array of string (uuid), nullable)

## Response schemas

### 200: Successful Response

- `count` (integer) Default: `0`.
- `metrics` (array of object) Default: `[]`.
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `id` (string (uuid), nullable)
  - `version` (string, nullable)
  - `status` (string, one of: "pending", "queued", "running", "success", "failure", "errors", "cancelled", nullable) Default: `"pending"`.
  - `data` (object, nullable)
  - `interval` (integer, nullable)
  - `timestamp` (string (date-time), nullable)
  - `scenario_id` (string (uuid), nullable)
  - `run_id` (string (uuid), required)

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
