v1

latestOpenAPI 3.0.0Open Government Licence v3.02026-07-239817.3 KB
image

Get an image metadata by its id

Returns an image metadata whose id matches the id provided as path parameter

get/images/{image_id}

Path parameters

image_idstring required

A unique id for an image metadata entry

Response

A json with the requested image metadata

idstring required

Image metadata unique identifier

collection_idstring required

Collection unique identifier corresponding to this image

state'created' | 'uploaded' | 'importing' | 'imported' | 'published' | 'completed' | 'deleted' | 'failed_import' | 'failed_publish' required

The state of the image

errorstring

Any error information, if there was an error with this image

filenamestring

Image's file name. According to SEO recommendations, the name should not be longer than 5 words. And it should not include extension because multiple extensions for the same image might be available as download variants.

typestring required

Type of image, which might define a set of possible formats and variants or resolutions.

Example response

{
  "id": "042e216a-7822-4fa0-a3d6-e3f5248ffc35",
  "collection_id": "5557dcd9-bf58-4a67-94f7-2343569834cc",
  "state": "published",
  "error": "publish process failed",
  "filename": "image-name",
  "license": {
    "title": "Open Government Licence v3.0",
    "href": "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
  },
  "links": {
    "downloads": "https://localhost:100000/images/042e216a-7822-4fa0-a3d6-e3f5248ffc35/downloads"
  },
  "upload": {
    "path": "images/025a789c-533f-4ecf-a83b-65412b96b2b7/image-name.png"
  },
  "type": "chart"
}