---
title: "Get Batch"
method: GET
path: "/v1/batch/{job_id}"
tags: ["v1"]
---

# Get Batch

`GET /v1/batch/{job_id}`

## Request

- Base URL: `https://api.korely.ai`
- URL: `https://api.korely.ai/v1/batch/{job_id}`
- Auth: HTTP bearer

Where an import stands: its `status`, how many rows were `received`,
`imported` and `failed`, and the `errors` of the rows that failed. A job
of another project is a 404.

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- BatchStatus
  - `id` string, required
  - `status` 'pending' | 'processing' | 'completed' | 'failed', required: pending (queued, no worker on it yet), processing (being imported now), completed (every item tried: `imported` and `failed` are final) or failed (stopped on an error of the worker, tried again from where it stopped until its attempts are used, so it may still become completed). The POST answers the stored value, as the GET does.
  - `received` integer, required
  - `imported` integer, required
  - `failed` integer, required
  - `errors` object[], required

## Other responses

- `401`: `invalid_key`: the `Authorization: Bearer` key is missing, unknown, revoked or expired.
- `403`: `forbidden`: the key lacks the scope this operation needs; `message` names it.
- `404`: `not_found`: nothing with that id is reachable with this key.
- `422`: `invalid_request`: the body, a query parameter or a path parameter is malformed (`detail` is the list of fields that failed, `message` names the first), or the endpoint refuses a value (an empty content, an unreadable timestamp; `detail` is a sentence or `{code, message}`).
- `429`: `rate_limit_exceeded`: past the request ceiling, the per-minute one set on this install (`RATE_LIMIT_PER_MINUTE`) or, on the hosted service, the plan's minute, hour or day; `message` names the window and `Retry-After` the seconds until it resets.
- `500`: `internal_error`: the server failed on this request; `message` holds no detail of it.
- `503`: A dependency did not answer: the database while the key was checked (`unavailable`, see `Retry-After`), or the one `code` names. Nothing was written; retry.

---

[API](https://skmtc.dev/korely/apis/korely-agents-api.md) · [All operations](https://skmtc.dev/korely/apis/korely-agents-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korely/apis/korely-agents-api/revisions/8a40bf09eca1?raw)
