Return audit trail information for data subject.

GET /v1/subjects/{type}/{subjectId}/auditTrail?queryParameters

Returns a list of consent operations performed for this data subject, ordered by descending date. The query accepts the following parameters:

fromDate, toDate
Date limits for audit trail records. Both limits are optional. The date must be of the format yyyy-mm-dd.
fromDateTime, toDateTime
Date-time limits for audit trail records. Both limits are optional. The date-time must be of the format yyyy-mm-ddTHH:MM:SS.sssZ07:00.
from
0-based offset into the result set.
max
Number of results to return. The maximum number of results that can be returned by a single API call is 100.

type determines the subject type, usually user.

Response

200 Ok

The response contains the total number of records matching the query, and the selected range of audit trail records ordered by descending date.

{
 "total": 20,
 "results": [{
   "by": {
     "type": "user",
     "id": "5e81f9c9-d88a-4c83-a586-f888317ef48c"
   },
   "timestamp": "2019-02-04T05:57:12.233Z",
   "type": "save",
   "saveConsentData": {
     "id": "GBACYkMQ0Gw2Mo2GA4FplGozMItGg0MwyFo5GYwG4tGQyGY5HBjMIxGUQGQTDA1MZiHMrGRmGhjkoyHAwm4xg4xG07gIFQ",
     "uri": "https://consentgrid.dev/v1/consents/GBACYkMQ0Gw2Mo2GA4FplGozMItGg0MwyFo5GYwG4tGQyGY5HBjMIxGUQGQTDA1MZiHMrGRmGhjkoyHAwm4xg4xG07gIFQ"
  },
  {
   "by": {
     "type": "user",
     "id": "5e81f9c9-d88a-4c83-a586-f888317ef48c"
   },
   "timestamp": "2019-02-06T04:11:09.143Z",
   "type": "check",
   "checkConsentData": {
     "context": {
       "currentDateTime": "2019-06-10T11:01:45.444Z",
       "currentDate": "2019-06-10",
       "currentTime": "11:01:45.444Z",
       "subject": {...}
     },
     "granules": {
       "terms": true
     }
   }
  },...]
}
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 not found.