CDS MENTOR LMS INTEGRATION API DOCUMENTATION
Description:
This documentation serves as the basis for the APIs available for any LMS integration systems to interact with CDS Mentor to check and share the application relevant data between each other. Below listed are the APIs exposed at CDS Mentor and do not involve any APIs of any integration system that CDS Mentor would be invoking.
Table of Contents
Check if the user exists in CDS Mentor. | 2 |
Create the user in CDS Mentor. | 4 |
Edit the user in CDS Mentor | 6 |
Assign the course content to a set of users. | 8 |
- Check if the user exists in CDS Mentor
Endpoint | https://mentor.cdsvisual.net/api/integration/lms/user/{username} |
Description | Check for the existence of user account based on username. This API can be a prerequisite before assigning a content to the user and any failure response to this API would mean the user is not in the CDS Mentor and the integration system can call Create User API and then assign the contents. |
HTTP Request Method | GET |
Sample Response Body |
https://mentor.cdsvisual.net/api/integration/lms/user/johnDoe@example.com { "statusCode": 200, "message": "Success", "errorMessage": "", "data": { "id": "b2a455vfsa184cf1ab52882f4247ecec", "organizationId": "b0ddass6-fa0e-4846-b018-4500a473b3b6", "organizationName": "Sample Organization", "personas": [ { "id": "570fb5ca-299c-4e58-8cf4-eb99f415ca66", "appId": "Mentor", "name": "Mentor Trainee", } ], "createdOn": 1685960779, "modifiedOn": 1685960779, "isActive": true, "email": "johnDoe@example.com", "firstName": "John", "lastName": "Doe", "userName": "johnDoe@example.com", "scopes": [ "mentor:work_instruction:21nn925-c993-4b60-a4f1-901ccc830ef5:procedure:771cddd-c656-49d4-96e0-8d9b76af7362", ] }, "messageCode": "SUCCESS" } |
Sample headers |
{ “Authorization”: “Bearer <add your bearer token here>”, “username”: “johnDoeTrainer@mailinator.com” } |
Swagger Link | Get User by Username |
Input Parameter Definitions
Parameter Name | Definition |
username | The username of the user that needs to be checked if present in CDS Mentor. (MANDATORY) |
username – From headers | The username of the username requesting CDS Mentor |
Output Parameter Definitions
Parameter Name | Definition |
statusCode | The HTTP Status code of the request |
message | Any message that is associated with the response. Success responses will have messages. In case of failure response, the message is empty. |
errorMessage | Any error message that is associated with the response |
data | The actual data associated with the response |
messageCode | The code associated with the response |
- Create the user in CDS Mentor
Endpoint | https://mentor.cdsvisual.net/api/integration/lms/user |
Description | Creates the user account in CDS Mentor. All the created users will have the role of “Mentor Trainee” in the CDS Mentor. |
HTTP Request Method | POST |
Sample Request Body |
{ "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe" } |
Sample Response Body |
{ "statusCode": 201, "message": "Success", "errorMessage": "", "data": { "id": "c301d99633a34613babcabc745759089b", "organizationId": "aabcabc7-95bb-4821-9ee0-5fcabcxx9d", "organizationName": "Org 1", "isActive": true, "personas": [ { "id": "47fbe318-878c-4a76-b091-c94abcabcd8", "appId": "Mentor", "name": "Mentor Trainee" "_id": "6304a870abcx1d3b0f29b" } ], "createdOn": 1661249648, "modifiedOn": 1661249648 }, "messageCode": "SUCCESS" } |
Sample headers |
{ “Authorization”: “Bearer <add your bearer token here>”, “Content-Type”: “application/json”, “username”: “johnDoeTrainer@mailinator.com” } |
Swagger Link | Create User |
Input Parameter Definitions
Parameter Name | Definition |
Email address of the user. This is then treated as the username of user in CDS Mentor. (MANDATORY) | |
firstName | First name of the user to be created. (MANDATORY) |
lastName | Last name of the user to be created. (MANDATORY) |
username – From headers | The username of the username requesting CDS Mentor |
Output Parameter Definitions
Parameter Name | Definition |
statusCode | The HTTP Status code of the request |
message | Any message that is associated with the response. Success responses will have messages. In case of failure response, the message is empty. |
errorMessage | Any error message that is associated with the response |
data | The actual data associated with the response |
messageCode | The code associated with the response |
- Edit the user in CDS Mentor
Endpoint | https://mentor.cdsvisual.net/api/integration/lms/user/{username} |
Description | Edits the user account in CDS Mentor. The user’s first name and/or last name can be edited. |
HTTP Request Method | PUT |
Sample Request Body |
{ "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe" } |
Sample Response Body |
{ "statusCode": 201, "message": "Success", "errorMessage": "", "data": { "id": "c301d99633a34613babcabc745759089b", "organizationId": "aabcabc7-95bb-4821-9ee0-5fcabcxx9d", "organizationName": "Org 1", "isActive": true, "personas": [ { "id": "47fbe318-878c-4a76-b091-c94abcabcd8", "appId": "Mentor", "name": "Mentor Trainee" "_id": "6304a870abcx1d3b0f29b" } ], "createdOn": 1661249648, "modifiedOn": 1661249648 }, "messageCode": "SUCCESS" }
|
Sample headers |
{ “Authorization”: “Bearer <add your bearer token here>”, “Content-Type”: “application/json”, “username”: “johnDoeTrainer@mailinator.com” } |
Swagger Link | Edit User First name and/or Last name |
Input Parameter Definitions
Parameter Name | Definition |
Email address of the user. This is then treated as the username of user in CDS Mentor. (MANDATORY) | |
firstName | First name of the user to be created. (MANDATORY) |
lastName | Last name of the user to be created. (MANDATORY) |
username – From headers | The username of the username requesting CDS Mentor |
Output Parameter Definitions
Parameter Name | Definition |
statusCode | The HTTP Status code of the request |
message | Any message that is associated with the response. Success responses will have messages. In case of failure response, the message is empty. |
errorMessage | Any error message that is associated with the response |
data | The actual data associated with the response |
messageCode | The code associated with the response |
- Assign the course content to a set of users.
Endpoint | https://mentor.cdsvisual.net/api/integration/lms/procedure/assign |
Description | Assigns the set of “Mentor Trainees” with the procedure that is accessible for training in CDS Mentor. |
HTTP Request Method | POST |
Sample Request Body |
{ "procedureId": " abbxssx7-95bb-4821-9ee0-5fcgggx9d ", "users": [ { "email": "johnDoe@example.com", "references": "<Application Reference ID 1>" }, { "email": "janeDoe@example.com", "references": "<Application Reference ID 2>" } ] } |
Sample Response Body |
{ "statusCode": 200, "data": null, "message": "Assigned the procedure to the user.", "errorMessage": "", "messageCode": "SUCCESS" } |
Sample headers |
{ “Authorization”: “Bearer <add your bearer token here>”, “Content-Type”: “application/json”, “username”: “johnDoeTrainer@mailinator.com” } |
Swagger Link | Assign Procedure |
Input Parameter Definitions
Parameter Name | Definition |
procedureId | Procedure ID is a unique ID associated with each procedure in CDS Mentor. Ensure that this ID is referenced in the Integration system during the publish flow. (MANDATORY) |
users | List of the all the users that need access to the procedure. (MANDATORY) |
Username of the user who needs access to the procedure. (MANDATORY) | |
references | Any reference ID that needs to be associated with the user while assigning the procedure. This can be expected as a part of user progress API by configuring it in CDS Mentor. (OPTIONAL) |
username – From headers | The username of the user requesting CDS Mentor. |
Output Parameter Definitions
Parameter Name | Definition |
statusCode | The HTTP Status code of the request |
message | Any message that is associated with the response. Success responses will have messages. In case of failure response, the message is empty. |
errorMessage | Any error message that is associated with the response |
data | The actual data associated with the response |
messageCode | The code associated with the response |
Comments
0 comments
Please sign in to leave a comment.