User Registration and Update
This API service provides the ability to create a new user ahead of a user logging into the platform and update an existing user’s details.
Create New User
POST Method
Resource URL
POST /campusm/v1/cmrest/registerUser/<org_code>/registerUser?apikey=<API key>
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
Parameter | Type | Required | Description |
orgCode | int | Required | Supplied by Ex Libris as part of the implementation. |
string | Required | Email address of the user to be created. Must match the email address returned for the user by the Identity Management system when authenticating | |
firstName | string | Required | First name of the user to be created |
lastName | string | Required | Last name of the user to be created |
Enter the parameters as
as raw text in the body of the request:
{ "orgCode": orgCode, "email": userEmail, "firstName": firstName, "lastName": lastName }
Example
URL –
https://api-eu.hosted.exlibrisgroup.com/campusm/v1/cmrest/registerUser /{orgCode}/ registerUser?apikey=<API key>
Body –
{ "orgCode": 12345, "email": “john.smith@email.com”, "firstName": “John”, "lastName": “Smith” }
Output
The service returns a success message or an error message in case of failure.
Examples:
{ "success": true, "message": "User <personId> created successfully." }
If the user already exists, you will see:
{ "success": false, "message": "User already exists." }
If the user does not exist, but the email is also associated with another user, you will see:
{ "success": false, "message": "Error creating user, Email already exists." }
If the email is invalid, you will see:
{ "success": false, "message": "Error creating user,Invalid email address found." }
If the email suffix is not permitted, you will see:
{ "success": false, "message": "Error creating user, Email address suffix not permitted for this app." }
If parameters are missing, you will see:
{ "success": false, "message": "Bad request." }
Update Existing User
POST Method
Resource URL
POST /campusm/v1/cmrest/registerUser/<org_code>/updateUser?apikey=<API key>
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
Parameter | Type | Required | Description |
orgCode | int | Required | Supplied by Ex Libris as part of the implementation. |
string | Required | Email address of the user to be updated. Must match the email address returned for the user by the Identity Management system when authenticating | |
newEmail | string | Optional | New value for the Email Address of the user |
firstName | string | Optional | New value for the First Name of the user |
lastName | string | Optional | New value for the Last Name of the user |
Enter the parameters as
as raw text in the body of the request:
{ "orgCode": orgCode, "email": userEmail, "newEmail", Newemail "firstName": firstName, "lastName": lastName }
Example
URL –
https://api-eu.hosted.exlibrisgroup.com/campusm/v1/cmrest/registerUser /{orgCode}/updateUser?apikey=<API key>
Body –
{ "orgCode": 12345, "email": “john.smith@email.com”, "newEmail": “j.smith@email.com”, "firstName": “J” }
NOTE: The API will only update the values that are sent, so if you don’t want to update the last name, do not send it in the Post.
Output
The service returns a success message or an error message in case of failure.