---
title: "Recover token usage from daemon job logs and AgentsView"
method: POST
path: "/api/maintenance/tokens/backfill"
tags: ["maintenance"]
---

# Recover token usage from daemon job logs and AgentsView

`POST /api/maintenance/tokens/backfill`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- ScanTokenUsageInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `dry_run` boolean, required

## Response `200`

OK

- ScanTokenUsageReport
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `failed` integer, required
  - `jobs` ScannedTokenUsage[], required
    - `agent` string, required
    - `job_id` integer, required
    - `summary` string, required
  - `skipped` integer, required
  - `total` integer, required
  - `updated` integer, required

## Other responses

- `default`: Error

## Changes

- **2026-10-02** `f4a08e7ffd79`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kenn-io/apis/roborev/changes/api/maintenance/tokens/backfill/post.md)

---

[API](https://skmtc.dev/kenn-io/apis/roborev.md) - [All operations](https://skmtc.dev/kenn-io/apis/roborev/llms.txt) - [OpenAPI document](https://skmtc.dev/kenn-io/apis/roborev/revisions/5803a85073e3?raw)
