collection-data

Endpoint: GET /api/reporting/v0/collection-data/[collection-name]

The collection name is embedded in the URL, and this request takes an option at parameter which is a UTC date and time in ISO8601 format (eg "2016-08-01T12:30:00"). If the at parameter is given, data will be returned from the collection as it was at that time.

Response

The response is a JSON document with the following properties.

property name

The name of the collection.

property status

The status of the collection. If the status is "ready" then all the facts have been gathered and the data is up-to-date.

property at

The date and time when this data was the current values for the collection. Using the at parameter on the request allows past data to be collected.

property columns

A list of fact names in the same order as the values in the rows array.

property rows

An array of arrays containing the data from this collection. The values in the data arrays are in the order specified in the columns property.

property objects

If the values are of type ref, then the values in the rows property will need to be looked up in this dictionary. The objects have properties title, the ref of the parent of this object, and behaviour if the object has a behaviour API code.

Example response

GET /api/reporting/v0/collection-data/researchers?output=pretty

{
  "name": "researchers",
  "status": "ready",
  "at": "2017-05-07T16:57:41.623Z",
  "columns": [
    "ref",
    "objectTitle",
    "isExternal",
    "isExaminer",
    "examsDone",
    "nameSortAs",
    "faculty",
    "department"
  ],
  "rows": [
    [
      "80208",
      "Dr Jabez Peters",
      false,
      true,
      true,
      "peters, jabez, dr",
      "800x3",
      "800x6"
    ],
    [
      "80209",
      "Dr Rosemonde Cartwright",
      false,
      false,
      false,
      "cartwright, rosemonde, dr",
      "800x3",
      "800x6"
    ]
  ],
  "objects": {
    "800wz": {
      "title": "Science and Technology",
      "parent": "800wy"
    },
    "800x8": {
      "title": "Media",
      "parent": "800wy"
    },
    "800x9": {
      "title": "Art and Design",
      "parent": "800x8"
    },
    "800xq": {
      "title": "Journalism",
      "parent": "800x8"
    },
    "800xv": {
      "title": "Music",
      "parent": "800x8"
    },
    "800x0": {
      "title": "Computer Science",
      "parent": "800wz"
    },
    "800x1": {
      "title": "Engineering",
      "parent": "800wz"
    },
    "800x2": {
      "title": "Life Sciences",
      "parent": "800wz"
    },
    "800x3": {
      "title": "Humanities",
      "parent": "800wy"
    },
    "800x4": {
      "title": "English",
      "parent": "800x3"
    },
    "800x5": {
      "title": "Law",
      "parent": "800x3"
    },
    "800x6": {
      "title": "Politics",
      "parent": "800x3"
    },
    "800x7": {
      "title": "History",
      "parent": "800x3"
    }
  }
}