---
title: "Poll a batch enhancement job"
method: GET
path: "/api/admin/components/enhance"
tags: ["admin-components"]
---

# Poll a batch enhancement job

`GET /api/admin/components/enhance`

## Request

- Base URL: `https://voltplan.app`
- URL: `https://voltplan.app/api/admin/components/enhance`
- Auth: HTTP bearer

Returns the state of a job started with `POST /api/admin/components/enhance`. Jobs live in the memory of the server instance that started them; they are lost on restart and dropped one hour after creation (on the next POST), which answers 404.

## Query parameters

- `jobId` string

## Response `200`

Job state.

- AdminComponentEnhanceJob
  - `id` string, required
  - `createdAt` integer, required: Unix time in milliseconds.
  - `status` 'running' | 'done' | 'error', required
  - `error` string
  - `rows` AdminComponentEnhanceRow[], required
    - `id` string, required
    - `name` string, required: `(not found)` when the id could not be loaded.
    - `status` 'pending' | 'running' | 'done' | 'error', required
    - `error` string
    - `current` AdminComponentEnhanceSnapshot, required: Values the model saw; `{}` until the row is processed.
      - `id` string
      - `name` string
      - `type` string: Component type: battery, charger, inverter, transformer, load, power, fuse, shunt, switch, disconnect, bridge or tool; `""` when unset.
      - `description` string
      - `watt` number, nullable
      - `voltage_in` number, nullable
      - `voltage_in_type` string, nullable
      - `voltage_out` number, nullable
      - `voltage_out_type` string, nullable
      - `estd_price_euro` number, nullable
      - `duty_cycle` number, nullable
      - `default_utilization_factor` number, nullable
      - `usage_hours_per_day` number, nullable
      - `amperage` number, nullable
      - `cutoff_voltage` number, nullable
      - `fuse_type` string, nullable
      - `wire_gauge` string, nullable
      - `brand_name` string, nullable
    - `proposed` AdminComponentEnhanceProposal: Values proposed by the model, unvalidated. Only whitelisted fields; fields irrelevant for the component type, empty values and values equal to the current ones are removed.
  - `done` integer, required: Rows processed so far.
  - `total` integer, required: Rows in the job.

## Other responses

- `400`: `jobId` missing.
- `403`: Admin access required. Returned for a missing, invalid or expired bearer token as well as for a valid token whose user lacks `is_admin=true`; admin endpoints never answer 401.
- `404`: Unknown, expired or other-instance job.

---

[API](https://skmtc.dev/voltplan/apis/voltplan-api.md) · [All operations](https://skmtc.dev/voltplan/apis/voltplan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voltplan/apis/voltplan-api/revisions/575b86a7af92?raw)
