---
title: "Gets a migration job's tasks"
method: GET
path: "/migration-jobs/{job_number}/tasks"
tags: ["private"]
---

# Gets a migration job's tasks

`GET /migration-jobs/{job_number}/tasks`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/migration-jobs/{job_number}/tasks`
- Auth: API key in header `Authorization`

"Gets a specific migration job using the unique job number and returns  it's tasks in a paginated list"

## Path parameters

- `job_number` integer, required

## Query parameters

- `limit` integer
- `offset` integer
- `state` 'submitted' | 'in_review' | 'approved' | 'published' | 'completed' | 'rejected' | 'cancelled' | 'migrating' | 'publishing' | 'pending_post_publish' | 'post_publishing' | 'reverting' | 'failed_post_publish' | 'failed_publish' | 'failed_migration' | 'failed_reversion'

## Response `200`

Successful response

- MigrationTaskList
  - `count` integer: How many jobs are present in the response
  - `limit` integer: Max number of jobs we are returning with this response
  - `offset` integer: The number of documents into the full list this response started at
  - `total_count` integer: How many jobs are available in total
  - `items` MigrationTask[]: Array containing results.
    - `id` string
    - `last_updated` string, date-time
    - `source` MigrationTaskMetadata
      - `id` string
      - `label` string
      - `dataset_id` string
    - `state` 'submitted' | 'in_review' | 'approved' | 'published' | 'completed' | 'rejected' | 'cancelled' | 'migrating' | 'publishing' | 'pending_post_publish' | 'post_publishing' | 'reverting' | 'failed_post_publish' | 'failed_publish' | 'failed_migration' | 'failed_reversion'
    - `target` MigrationTaskMetadata
      - `id` string
      - `label` string
      - `dataset_id` string
    - `type` 'dataset_series' | 'dataset_edition' | 'dataset_version' | 'dataset_download'

## Other responses

- `400`: Invalid request parameter(s)
- `401`: Request is not authenticated
- `403`: Request is not authorised
- `404`: Migration job not found
- `500`: Generic error response

---

[API](https://skmtc.dev/office-of-national-statistics/apis/dis-migration-service.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/dis-migration-service/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/dis-migration-service/revisions/5dddd1472e20?raw)
