---
title: "GET /images/{image_id}/downloads/{variant}"
method: GET
path: "/images/{image_id}/downloads/{variant}"
tags: ["image"]
---

# GET /images/{image_id}/downloads/{variant}

`GET /images/{image_id}/downloads/{variant}`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/images/{image_id}/downloads/{variant}`
- Auth: one of:
  - API key in header `X-Florence-Token`
  - API key in header `Authorization`

## Path parameters

- `image_id` string, required
- `variant` string, required

## Response `200`

Successfully got download variant.

- ImageDownload: Download information for a particular image variant and resolution
  - `id` string, required: the variant
  - `height` integer: Image height, in number of pixels
  - `href` string: Full URL pointing to the image in download service
  - `palette` string: Colour palette of the variant
  - `private` string: S3 Private bucket name
  - `public` boolean: Determines if this image variant is public (i.e. it can be accessed under static.ons.gov.uk)
  - `size` integer: File size in number of bytes
  - `type` string: Type of download corresponding to this variant
  - `width` integer: Image width, in number of pixels
  - `links` object
    - `self` string
    - `image` string
  - `state` 'pending' | 'importing' | 'imported' | 'published' | 'completed' | 'failed-import' | 'failed-publish', required: The state of this download variant. The high level image will change its state to imported only when all variants are in imported state.
  - `error` string: Any error information, if there was an error with this image variant
  - `import_started` string, required: Timestamp representation for the importing process start, formatted according to RFC3339
  - `import_completed` string: Timestamp representation for the importing process completion, formatted according to RFC3339
  - `publish_started` string: Timestamp representation for the publishing process start, formatted according to RFC3339
  - `publish_completed` string: Timestamp representation for the publishing process completion, formatted according to RFC3339

## Other responses

- `401`: User or service is not authenticated
- `403`: Unauthorised to view images metadata
- `404`: Requested item cannot be found
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/image-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/image-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/image-api/revisions/0d1060eb31c2?raw)
