GET ./roles

Tags: simple-query, pagination

Returns all roles available.

GET parameters

NameValue TypeValidationDetails
searchstringOptionalString used for search. Performs a full text search in roleName.
withPermissionsintOptionalvalues[0,1]; If present, a permissions key will be present with all permID's that the role contains.
withUserCountintOptionalvalues[0,1]; If present, a usercount key will be present with the amount of users that have the role assigned.
astIDintOptionalIf present will filter the roles to those assigned to that specific study year.

Output example

{
"meta": {
"countTotal": "3",
"countData": "3",
"countOffset": "0"
},
"data": [
{
"roleID": "1",
"roleName": "RoleNameHere",
"roleUaTip": "3",
"roleIsAdministrative": "0",
"roleIsImplicit": "1",
"roleIsImplicitAst": null,
"roleVisibleInTitle": "1",
"permissions": false,
"usercount": "0"
},
{
"roleID": "2",
"roleName": "RoleNameHere",
"roleUaTip": "3",
"roleIsAdministrative": "0",
"roleIsImplicit": "1",
"roleIsImplicitAst": null,
"roleVisibleInTitle": "1",
"permissions": false,
"usercount": "0"
},
{
"roleID": "1429",
"roleName": "Test",
"roleUaTip": "1",
"roleIsAdministrative": "0",
"roleIsImplicit": "0",
"roleVisibleInTitle": "0",
"roleIsImplicitAst": [
"1",
"2",
"3",
"5"
],
"usercount": "2162"
}
}