v1

latestOpenAPI 3.0.0Open Government Licence v3.02026-07-23111218.0 KB
File upload started

POST's metadata for a file when an upload has started

post/files

Request body

pathstring required

Path to file

is_publishableboolean required

Is the file publishable

collection_idstring

The collection ID to which the file is attached

bundle_idstring

The bundle ID to which the file is attached

titlestring

The title given to the file

size_in_bytesinteger required

Size of the file in bytes

typestring required

The file type

licencestring required

The type of licence the file has

licence_urlstring required

Licence URL

Example request

{
  "path": "images/meme.jpg",
  "is_publishable": true,
  "collection_id": "1234-asdfg-54321-qwerty",
  "bundle_id": "bundle-789-xyz",
  "title": "The latest Meme",
  "size_in_bytes": 14794,
  "type": "image/jpeg",
  "licence": "OGL v3",
  "licence_url": "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",
  "content_item": {
    "dataset_id": "cpih01",
    "edition": "time-series",
    "version": "1"
  }
}

Response

OK