Create and Remove Customer Roles

This API service provides the ability for admins to add or remove customer roles from the application.

POST Method

Resource URL

POST /​campusm/​cmrest/customerRole/{org_code}/updateCustomerRole

URL Parameters

ParameterTypeRequiredDescription
org_codestringRequiredThe organisation  code as specified in the app configuration in the settings page of app manager

 

Query string Parameters

ParameterTypeRequiredDescription
apiKeystringRequiredSupplied by Ex Libris as part of the implementation

Body Parameters

Parameter Type Required Description 
name string Required Name of the role supplied by the customer 
description string  Required  Description of the role 
message string  Optional  Additional information  

Enter the parameters as a JSON object in the body of the request such as the following text and fill in the fields with actual data:  

{
   "rolesToAdd":[
      {
         "name":"<NAME>",
         "description":"<DESCRIPTION>",
         "message":"<MESSAGE>"
      }
   ],
   "rolesToRemove":[
      {
         "name":"<NAME>",
         "description":"<DESCCRIPTION>",
         "message":"<MESSAGE>"
      }
   ]
}

Example

URL –  
https://api-eu.hosted.exlibrisgroup.com/​campusm/​cmrest/customerRole/{org_code}/updateCustomerRole?apiKey=<API KEY> 

Body –

{
   "rolesToAdd":[
      {
         "name":"newRole",
         "description":"this is a new role to add",
         "message":"message"
      }
   ],
   "rolesToRemove":[
      {
         "name":"oldRole",
         "description":"role to remove",
         "message":"message"
      }
   ]
}

Output

This service returns a list of customerRole Response object.  

Description:

Field Type Description 
name string  Name of role  
description string  The description added by the customer  
message String A message indicating if the role was added or removed 

Example

{
   "success":true,
   "message":"newRole",
   "rolesList":[
      {
         "name":"newRole",
         "description":"new role description",
         "message":"Added Role."
      }
   ]
}

GET Method 

Resource URL 

POST /​campusm/​cmrest/customerRole/{org_code}/ getCustomerRoles 

URL Parameters 

Parameter Type Required Description 
org_code string  Required  The organisation  code as specified in the app configuration in the settings page of app manager  

 

Query string Parameters 

Parameter Type Required Description 
apiKey  string  Required  Supplied by Ex Libris as part of the implementation  

 

Body Parameters 

NONE 

Example 

URL – 
https://api-eu.hosted.exlibrisgroup.com/​campusm/​cmrest/customerRole/{org_code}/getCustomerRoles?apiKey=<API KEY> 

Output 

This service returns a list of customerRole Response object.  

Description: 

Field Type Description 
name string  Name of role  
description string  The description added by the customer  
message String A message indicating if the role was added or removed 

Example 

{
   "success":true,
   "rolesList":[
      {
         "name":"newRole",
         "description":"new role description",
         "message":"Added Role."
      }
   ]
}