Roles

Get roles

GET /api/v1/roles

{
"data": [
{
"name": "Subscriber",
"slug": "subscriber",
"id": "5daff00321935800013e15fa",
"class": "com.factly.dega.domain.Role",
"isDefault": true,
"clientId": "default",
"keyclockId": "a2fc805b-ef02-41c5-a45a-c9e9081857d4",
"keyclockName": "ROLE_SUBSCRIBER",
"createdDate": "2019-09-11T15:49:38.555Z",
"lastUpdatedDate": "2019-09-11T15:49:38.555Z"
},
{
...
},
...
],
"paging": {
"next": "eyIkdW5kZWZpbmVkIjp0cnVlfQ",
"hasNext": false,
"previous": "eyIkdW5kZWZpbmVkIjp0cnVlfQ",
"hasPrevious": false
}
}

Query parameters

paramsvaluedescription
slugstringTo get role by slug
limitnumberTo limit number of roles
nextstringTo get next roles
previousstringTo get previous roles
sortBystringTo sort by field
sortAscbooleanTo set sort by ascending

Get role

GET /api/v1/roles/:key

Path parameters

paramsdescription
keyTo get role by Object Id or slug

Get a particular role by Object Id

GET /api/v1/roles/$roleId

{
"data" : {
"name": "Subscriber",
"slug": "subscriber",
"id": "5daff00321935800013e15fa",
"class": "com.factly.dega.domain.Role",
"isDefault": true,
"clientId": "default",
"keyclockId": "a2fc805b-ef02-41c5-a45a-c9e9081857d4",
"keyclockName": "ROLE_SUBSCRIBER",
"createdDate": "2019-09-11T15:49:38.555Z",
"lastUpdatedDate": "2019-09-11T15:49:38.555Z"
}
}

Get a particular role by slug

GET /api/v1/roles/$roleSlug

{
"data" : {
"name": "Subscriber",
"slug": "subscriber",
"id": "5daff00321935800013e15fa",
"class": "com.factly.dega.domain.Role",
"isDefault": true,
"clientId": "default",
"keyclockId": "a2fc805b-ef02-41c5-a45a-c9e9081857d4",
"keyclockName": "ROLE_SUBSCRIBER",
"createdDate": "2019-09-11T15:49:38.555Z",
"lastUpdatedDate": "2019-09-11T15:49:38.555Z"
}
}