# Read an import job's progress

How far one import job has got: `state` (running | completed | failed), `total` rows it was given, `done` rows it has finished with, `failed` rows refused, `imported` rows landed, and the first 20 refusals with their row numbers in the file. This read is what MAKES the progress — it lands the job's next chunk of 200 rows before it answers, because there is no background worker — so poll it about once a second until the state is terminal, and a 5000 row file takes about 25 reads. Two reads at once never land the same chunk twice; the second answers the counts as they stand. `done` counts every finished row whatever became of it, so it reaches `total` even on a file with duplicates the policy skipped. A job nobody reads for 15 minutes is settled `failed` with "the import stopped being polled". The full per-row report and the undo live on `get_definitions_key_imports`.

Access class: `def:read`.

## Endpoint

`GET /v1/definitions/{key}/import/jobs/{jobId}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| jobId | path | string | Yes |
| body | query | null | No |
| params | query | object | No |
| query | query | object | No |

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "actorUserId": 1,
    "created": 1,
    "done": 1,
    "error": "string",
    "errors": [
      {
        "error": "string",
        "row": "string"
      }
    ],
    "failed": 1,
    "fileName": "string",
    "finishedAt": "string",
    "id": "",
    "imported": 1,
    "startedAt": "string",
    "state": "string",
    "total": 1,
    "updated": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
