Return related subjects.

GET https://api.consentgrid.io/v1/subjects/{type}/{subjectId}/is/{roles}/of
Authorization: Bearer apiKey

The above version of the API returns subjects related to subjectId with one of the roles given in roles path parameter. roles is a comma-separate list of roles. For instance, if roles=parent, then subjectId is the parent of the returned subjects.

GET https://api.consentgrid.io/v1/subjects/{type}/{subjectId}/is/{roles}/by
Authorization: Bearer apiKey

This is the inverse of the first API. It returns the subjects subjectId is related to with one of the roles given in roles path parameter. For instance, if roles=parent, then the returned subjects are the parents of subjectId.

Response

200 Ok

The response contains the related subjects:

[
  {
    "id": {
     "type":"user",
     "id": "userId"
    },
    "role":"parent",
    "properties": {}
  },
  ...
 }