image
Create a new image metadata entry
Creates a new image metadata entry corresponding to the provided body in this request. A new ID will be generated for the image, and it will be set to created state.
post/images
Request body
Example request
{
"state": "created",
"collection_id": "5557dcd9-bf58-4a67-94f7-2343569834cc",
"filename": "image-name",
"license": {
"title": "Open Government Licence v3.0",
"href": "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
},
"type": "chart"
}Response
The image metadata was correctly created and a json object containing the new image information is returned. The new image will be in 'created' state and its id will be newly generated.
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"
}