Retrieve the current or an older version of a data subject.

GET /v1/subjects/{type}/{subjectId}?version=ver

This API retrieves the stored subject data. type determines the subject type, usually user. If version query parameter is ommitted or version=0, it retrieves the latest version of the subject. If the version is a nonzero value, the requested version of the record is loaded and returned. The first version of the subject record has version=1.

Response

200 Ok

If the requested subject record and version is found, the data subject information is returned with the following envelope:

{
  "id": {
    "type": "user",
    "id": "123abc"
  },
  "version": 3,
  "versionTime": "2019-01-02T15:04:05Z07:00",
  "by": {
    "type": "user",
    "id": "def821"
  }.
  "data": {
    ... // Subject data
  }
}
400 Bad Request

Malformed request, invalid value, etc. The return value is a JSON error object containing diagnostic information.

403 Forbidden

The authenticated key does not have the privileges for this operation. The return value is a JSON error object containing diagnostic information.

404 Not Found

Subject or the requested version was not found.