Blobs

  1. Get an blob
  2. List blobs

See the Blob definition to understand how this resource fits into the data model.

Get an blob

Endpoint

GET /blobs/{id}

Parameters

Name Type Description
id Hash The Blob identifier.

Gets an blob by hash.

The column order is implementation dependent when the data is represented in a tabular format like CSV. For tree-like formats like JSON, the object has to be treated as unordered.

To determine the set of attributes and their value types the user SHOULD use the schema from the Context resource.

For example, the following request shows a blob in the JSON representation:

GET /blobs/12206b18693874513ba13da54d61aafa7cad0c8f5573f3431d6f1c04b07ddb27d6bb HTTP/1.1
Host: country.register.gov.uk
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 156

{
  "_id": "12206b18693874513ba13da54d61aafa7cad0c8f5573f3431d6f1c04b07ddb27d6bb",
  "country":"GB",
  "official-name":"The United Kingdom of Great Britain and Northern Ireland",
  "name":"United Kingdom",
  "citizen-names":["Briton","British citizen"]
}

List blobs

Endpoint

GET /blobs

Gets the list of blobs. This resource MAY be paginated.

The order SHOULD be by consistent regardless of new elements being added to the dataset.

The reference implementation gives a numeric index to each blob when they are inserted to the database so complete pages always return the same set of blobs and incomplete pages grow in an ordered manner.

GET /blobs HTTP/1.1
Host: local-authority-eng.register.gov.uk
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Link: </blobs?cursor=2112>; rel="next"

[{
  "_id": "12206a048d58e944ce2430256d04de09fc70a5c0ff08f08569a7fd5cb96dc559d7cb",
  "local-authority-eng": "CAB",
  "name": "Cambridge"
}, {
  "_id": "1220d87a75d2333ceaf0e308380ddc0de9fa47eb969413d917f934ee9c9cb31caadd",
  "local-authority": "NMD",
  "name": "Wycombe"
}]

© Crown copyright released under the Open Government Licence.