---
title: "Get a single job given an ID"
method: GET
path: "/harvest/job/{ident}/"
tags: ["harvest"]
---

# Get a single job given an ID

`GET /harvest/job/{ident}/`

## Request

- Base URL: `https://dados.gov.pt/api/1`
- URL: `https://dados.gov.pt/api/1/harvest/job/{ident}/`
- Auth: none declared

Readable without a session by the same decision as the source reads --
see `SourceAPI.get`, which records it in full. The errors and captured
logs served here are redacted twice over: in their constructors on the
way into the database, and in `error_fields`/`log_fields` on the way
out, which is what covers the preview, where nothing is ever saved.
The jobs list is the one route that marshals neither, so
`_serialize_light_job` repeats the redaction by hand.

See LEDG-2477.

## Query parameters

- `page` integer
- `page_size` integer

## Headers

- `X-Fields` string, mask

## Response `200`

Success

- HarvestJob
  - `created` string, date-time, required: The job creation date
  - `ended` string, date-time: The job end date
  - `errors` HarvestError[]: The job initialization errors
    - `level` string, required
    - `message` string, required
  - `id` string, required: The job execution ID
  - `items` HarvestItem[]: The job collected items
    - `args` string[]: The item positional arguments
    - `created` string, date-time, required: The item creation date
    - `dataservice` DataserviceReference
      - `class` string, required: The object class
      - `id` string, required: The object unique identifier
      - `self_api_url` string: Link to the API endpoint for this dataservice
      - `self_web_url` string: Link to the udata web page for this dataservice
      - `title` string, required
    - `dataset` DatasetReference
      - `class` string, required: The object class
      - `id` string, required: The object unique identifier
    - `ended` string, date-time: The item end date
    - `errors` HarvestError[]: The item errors
      - `level` string, required
      - `message` string, required
    - `kwargs` object: The item keyword arguments
    - `logs` HarvestError[]: The item logs
      - `level` string, required
      - `message` string, required
    - `remote_id` string, required: The item remote ID to process
    - `remote_url` string: The item remote url (if available)
    - `started` string, date-time: The item start date
    - `status` 'pending' | 'started' | 'done' | 'failed' | 'skipped' | 'archived', required: The item status
  - `source` string, required: The source owning the job
  - `started` string, date-time: The job start date
  - `status` 'pending' | 'initializing' | 'initialized' | 'processing' | 'done' | 'done-errors' | 'failed', required: The job status

---

[API](https://skmtc.dev/dados/apis/udata-api.md) - [All operations](https://skmtc.dev/dados/apis/udata-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dados/apis/udata-api/revisions/77edaf8a00ea?raw)
