---
title: "List all jobs for a given source (lightweight: counts + failed items only)"
method: GET
path: "/harvest/source/{source}/jobs/"
tags: ["harvest"]
---

# List all jobs for a given source (lightweight: counts + failed items only)

`GET /harvest/source/{source}/jobs/`

## Request

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

The full `items` array is never serialized here — it can be tens of
thousands of entries (e.g. INE) and would blow up the payload. Per-status
counts are computed in MongoDB via aggregation and only the items that
actually have errors are returned. Use `/job/<id>/` for the full detail.

## Query parameters

- `page` integer
- `page_size` integer

## Headers

- `X-Fields` string, mask

## Response `200`

Success

- HarvestJobLightPage
  - `data` HarvestJobLight[]
    - `created` string, date-time, required: The job creation date
    - `ended` string, date-time: The job end date
    - `error_items` HarvestJobErrorItem[]: Only the items that have errors
      - `dataset` HarvestJobErrorItemDataset
        - `id` string
        - `page` string
        - `title` string
      - `errors` HarvestErrorLight[]: The item errors
        - `details` string: Optional details (only for super-admins)
        - `message` string: The error short message
      - `remote_id` string: The item remote ID
      - `remote_url` string: The item remote url (if available)
      - `status` string: The item status
    - `errors` HarvestErrorLight[]: The job initialization errors
      - `details` string: Optional details (only for super-admins)
      - `message` string: The error short message
    - `id` string, required: The job execution ID
    - `item_counts` HarvestJobItemCounts
      - `archived` integer: Number of archived items
      - `done` integer: Number of done items
      - `failed` integer: Number of failed items
      - `pending` integer: Number of pending items
      - `skipped` integer: Number of skipped items
      - `started` integer: Number of started items
      - `total` integer: Total number of items
    - `source` string, required: The source owning the job
    - `started` string, date-time: The job start date
    - `status` string, required: The job status
  - `next_page` string: The next page URL if any
  - `page` integer: The current page
  - `page_size` integer: The page size
  - `previous_page` string: The previous page URL if any
  - `total` integer: Total number of jobs

---

[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)
