Return related subjects.

GET /v1/subjects/{type}/{subjectId}/is/{roles}/of

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 /v1/subjects/{type}/{subjectId}/is/{roles}/by

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": {}
  },
  ...
 }