---
title: "Query raw (un-deduped) metric writes from a run"
method: GET
path: "/api/runs/metrics/raw"
tags: ["Runs"]
---

# Query raw (un-deduped) metric writes from a run

`GET /api/runs/metrics/raw`

## Request

- Base URL: `https://pluto-api.trainy.ai`
- URL: `https://pluto-api.trainy.ai/api/runs/metrics/raw`
- Auth: HTTP bearer

Returns every row written to ClickHouse for the given (run, metric), including duplicates from resumes/re-logs, with the original write `time`. Reads from the un-deduped `mlop_metrics` table — no FINAL, no reservoir sampling. Each row carries a `nonFiniteFlags` bitmask (bit0=NaN, bit1=+Inf, bit2=-Inf); when a flag is set, `value` is `0` and the flag is the source of truth. Use `/metrics` for analysis or chart rendering — this endpoint is for audit and cleanup.

## Query parameters

- `runId` number, nullable: Numeric run ID
- `projectName` string, required: Project name
- `logName` string, required: Metric name (e.g., train/loss). Required — scoping every raw scan to a single metric keeps payloads bounded.
- `stepMin` integer, nullable: Minimum step number (inclusive).
- `stepMax` integer, nullable: Maximum step number (inclusive).
- `limit` integer: Maximum rows to return (default and max: 50000). Page by narrowing stepMin/stepMax when more is needed.

## Response `200`

Raw metric rows

- QueryRawMetricsResponse
  - `rows` object[], required
    - `logGroup` string, required
    - `step` number, required
    - `time` string, required: Server-side write timestamp (ClickHouse DateTime64(3)).
    - `value` number, required
    - `nonFiniteFlags` number, required: Bitmask: bit0=NaN, bit1=+Inf, bit2=-Inf. When non-zero, `value` is 0 and the flag is the source of truth.
  - `truncated` boolean, required: True when the row count hit `limit` and more rows likely exist — narrow stepMin/stepMax to page.

---

[API](https://skmtc.dev/trainy/apis/mlop-api.md) - [All operations](https://skmtc.dev/trainy/apis/mlop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trainy/apis/mlop-api/revisions/5d2c0b0baecb?raw)
