List roles

GET {{baseUrl}}/api/v1/roles

This API lists a particular number of roles, based on the limit specified.

OAuth Scope

  • Desk.settings.READ
  • Desk.basic.READ

Request Params

KeyDatatypeRequiredDescription
fromstringIndex number, starting from which the roles must be listed
limitstringNumber of roles to display. The default value is 15 and the maximum value allowed is 500.
isVisiblestringKey that filters roles according to their visibility in the UI
isDefaultstringKey that denotes whether the roles must be default roles or custom roles
searchStrstringString to search for roles by name or description. The string must contain at least one character. Three search methods are supported: 1) string* - Searches for roles whose name or description start with the string, 2) string - Searches for roles whose name or description contain the string, 3) string - Searches for roles whose name or description is an exact match for the string

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{"data":[{"isDefault":true,"shareDataWithPeers":true,"immediateSubRoles":["50000785582324","50000000779019","50000001319909"],"name":"CEO","description":"Agent belongs to this role can access all other user's data.","reportsTo":null,"id":"50000000008337","isVisible":true},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":["50000091844659"],"name":"Manager","description":"Agents belongs to this cannot see admin role users data","reportsTo":"50000000008337","id":"50000000008339","isVisible":true},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"PortalUser","description":"User belongs to this role are portal users they can access their cases and solutions only","reportsTo":"50000000008337","id":"50000000008341","isVisible":false},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"Development Team Member","description":"Development team members from Engineering","reportsTo":"50000000008337","id":"50000000469017","isVisible":true},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"Product Team Member","description":"Products Managers","reportsTo":"50000000008337","id":"50000000551386","isVisible":true},{"isDefault":false,"shareDataWithPeers":true,"immediateSubRoles":[],"name":"Sales Team Member","description":"","reportsTo":"50000000008337","id":"50000000779019","isVisible":true},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"Personal","description":"Agents belongs to this role can see only unassigned and his/her data","reportsTo":null,"id":"50000002634005","isVisible":false},{"isDefault":false,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"Marketing Team Member","description":"","reportsTo":"50000000008337","id":"50000009610999","isVisible":true},{"isDefault":true,"shareDataWithPeers":false,"immediateSubRoles":[],"name":"LightAgent","description":"Agents belonging to this role can access all user's data.","reportsTo":null,"id":"50000565365005","isVisible":false}]}