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

ParameterTypeRequiredDescription
orgCodexsd:intRequiredSupplied by Ex Libris as part of the implementation
apiKeyxsd:stringRequiredSupplied by Ex Libris as part of the implementation
emailAddressxsd:stringOptionalDefined the user to which the App Role will be added or removed
rolesToAddxsd:stringOptionalDefines 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
rolesToRemovexsd:stringOptionalDefines 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
applyToAllxsd:booleanOptionalBoolean 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

ParameterTypeRequiredDescription
apiKeyxsd:stringRequiredSupplied by Ex Libris as part of the implementation

Body Parameters

ParameterTypeRequiredDescription
orgCodexsd:intRequiredSupplied by Ex Libris as part of the implementation
apiKeyxsd:stringRequiredSupplied by Ex Libris as part of the implementation
emailAddressesxsd:stringOptionalUsed if more than one user’s roles are to be changed
emailAddressxsd:stringOptionalDefined the user to which the App Role will be added or removed
rolesToAddxsd:stringOptionalDefines 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
rolesToRemovexsd:stringOptionalDefines 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
applyToAllxsd:booleanOptionalBoolean 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:

FieldTypeDescription
typexsd:stringIndicated successful request
descxsd:stringIdentifies outcome of request, indicating which roles were changed (added or removed) from the defined user
timestampxsd:dateTimeDate: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>