Change App Roles
This API service provides the ability to securely add or remove App Roles from defined users.
GET Method
Resource URL
GET /campusm/v1/addons/ addAppRole
URL Parameters
None
The hostname corresponds to the region where your campusM instance is hosted. For getting started using API keys, your org code and calling your campusM regional API hostname, please refer to this.
Query string Parameters
Parameter | Type | Required | Description |
orgCode | xsd:int | Required | Supplied by Ex Libris as part of the implementation |
apiKey | xsd:string | Required | Supplied by Ex Libris as part of the implementation |
emailAddress | xsd:string | Optional | Defined the user to which the App Role will be added or removed |
rolesToAdd | xsd:string | Optional | Defines the Role to add to the user defined by the email address. This should take the form Profile::AppRole. More than one Role can be added by separating each Role using a comma |
rolesToRemove | xsd:string | Optional | Defines the Role to remove from the user defined by the email address. This should take the form Profile::AppRole. More than one Role can be removed by separating each Role using a comma |
applyToAll | xsd:boolean | Optional | Boolean used to define if the change should apply to all users (TRUE) or not (FALSE) |
Body Parameters
None
Example
URL –
https://api-eu.hosted.exlibrisgroup.com/campusm/v1/addons/addAppRole?apiKey=<API KEY>&orgCode=<ORG CODE>&emailAddress=<EMAIL ADDRESS>& rolesToAdd=<APP ROLE>&rolesToRemove<APP ROLE>&applyToAll<TRUEorFALSE>
POST Method
Resource URL
POST /campusm/v1/addons/ addAppRole
URL Parameters
None
Query string Parameters
Parameter | Type | Required | Description |
apiKey | xsd:string | Required | Supplied by Ex Libris as part of the implementation |
Body Parameters
Parameter | Type | Required | Description |
orgCode | xsd:int | Required | Supplied by Ex Libris as part of the implementation |
apiKey | xsd:string | Required | Supplied by Ex Libris as part of the implementation |
emailAddresses | xsd:string | Optional | Used if more than one user’s roles are to be changed |
emailAddress | xsd:string | Optional | Defined the user to which the App Role will be added or removed |
rolesToAdd | xsd:string | Optional | Defines the Role to add to the user defined by the email address. This should take the form Profile::AppRole. More than one Role can be added by separating each Role using a comma |
rolesToRemove | xsd:string | Optional | Defines the Role to remove from the user defined by the email address. This should take the form Profile::AppRole. More than one Role can be removed by separating each Role using a comma |
applyToAll | xsd:boolean | Optional | Boolean used to define if the change should apply to all users (TRUE) or not (FALSE) |
Enter the parameters as a raw text in the body of the request such as the following text and fill in the fields with actual data:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="http://campusm.gw.com/campusm"> <soapenv:Header /> <soapenv:Body> <cam:addAppRoleRequest> <cam:orgCode>ORG CODE</cam:orgCode> <cam:emailAddresses> <cam:emailAddress>EMAIL ADDRESS 1</cam:emailAddress> <cam:emailAddress>EMAIL ADDRESS 2</cam:emailAddress> </cam:emailAddresses> <cam:rolesToAdd>APP ROLE</cam:rolesToAdd> <cam:rolesToRemove>APP ROLE</cam:rolesToRemove> <cam:applyToAll>TRUE or FALSE</cam:applyToAll> </cam:addAppRoleRequest> </soapenv:Body> </soapenv:Envelope>
Example
URL –
https://api-eu.hosted.exlibrisgroup.com/campusm/v1/addons/addAppRole?apiKey=<API KEY>
Body –
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cam="http://campusm.gw.com/campusm"> <soapenv:Header /> <soapenv:Body> <cam:addAppRoleRequest> <cam:orgCode>123456789</cam:orgCode> <cam:emailAddresses> <cam:emailAddress>matt@rolesdemo.com</cam:emailAddress> <cam:emailAddress>jon@rolesdemo.com</cam:emailAddress> </cam:emailAddresses> <cam:rolesToAdd /> <cam:rolesToRemove>LDAP 1::DemoRole1</cam:rolesToRemove> <cam:applyToAll>FALSE</cam:applyToAll> </cam:addAppRoleRequest> </soapenv:Body> </soapenv:Envelope>
Output
This service returns a list of addAppRole Response object.
Description:
Field | Type | Description |
type | xsd:string | Indicated successful request |
desc | xsd:string | Identifies outcome of request, indicating which roles were changed (added or removed) from the defined user |
timestamp | xsd:dateTime | Date:time request was processed |
Example
<?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns1:addAppRoleResponse xmlns:ns1="http://campusm.gw.com/campusm"> <ns1:type>S</ns1:type> <ns1:desc>No roles added. Roles Removed: LDAP 1::COVID, . </ns1:desc> <ns1:timestamp>2020-11-02T14:02:42.118+00:00</ns1:timestamp> </ns1:addAppRoleResponse> </soapenv:Body> </soapenv:Envelope>