HR Learn: API v2 - User API
The User API performs actions related to users in the HR Learn LMS.
The User API performs actions related to users in the HR Learn LMS. The following methods are available via this API:
- Create user
- Import user batch
- Search users
- Get user details
- Update user
- Delete user
- Sign user in (SSO)
- Get group memberships for user
- Attach user to group(s)
- Remove user from group(s)
- Get course enrollments for user
- Get learning path enrollments for user
- Get transcript for user
Create user
|
HTTP Action |
POST |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Endpoint URL |
/api/user/v2/create |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Request Parameters |
Note that required fields and formatting depend on settings you have configured in System > User Field Configuration. Example: Example using minimum system required parameters. { "FirstName": "API", "LastName": "User", "Username": "apiuser", "Password": "@p1UserPassword", "MustChangePassword" : "true", "Timezone": "Eastern Standard Time", "IsActive": true }
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Response |
The id of the user that was created. Example: 123 |
Import user batch
|
HTTP Action |
POST |
||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||
|
Endpoint URL |
/api/user/v2/batch/{createUsersOnly} (true/false)
|
||||||
|
Request Parameters |
|
||||||
|
Response |
NONE (200 - OK) |
Search users
|
HTTP Action |
POST |
|||||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|||||||||
|
Endpoint URL |
/api/user/v2/search |
|||||||||
|
Request Parameters |
Example: { "Type": "username", "SearchParam": "apiuser" }
|
|||||||||
|
Response |
An array of user objects matching the search criteria. Example: [ { "Id": 123, "FirstName": "API", "MiddleName": null, "LastName": "User", "DisplayName": "User, API", "Avatar": null, "Email": "apiuser@mydomain.com", "Username": "apiuser", "IdSite": 2, "IdTimezone": 15, "ObjectGUID": null, "ActivationGUID": null, "DistinguishedName": null, "IsActive": true, "MustChangePassword": false, "DtCreated": "2021-05-03T15:37:00.53Z", "DtExpires": null, "LanguageString": "en-US", "DtModified": "2021-05-03T16:45:16.81Z", "DtLastLogin": null, "EmployeeId": null, "Company": null, "Address": null, "City": null, "Province": null, "PostalCode": null, "Country": null, "PhonePrimary": null, "PhoneWork": null, "PhoneFax": null, "PhoneHome": null, "PhoneMobile": null, "PhonePager": null, "PhoneOther": null, "Department": null, "Division": null, "Region": null, "JobTitle": null, "JobClass": null, "Gender": null, "Race": null, "DtDOB": null, "DtHire": null, "DtTerm": null, "Field00": null, "Field01": null, "Field02": null, "Field03": null, "Field04": null, "Field05": null, "Field06": null, "Field07": null, "Field08": null, "Field09": null, "Field10": null, "Field11": null, "Field12": null, "Field13": null, "Field14": null, "Field15": null, "Field16": null, "Field17": null, "Field18": null, "Field19": null, "IsUserACourseExpert": false, "IsUserASupervisor": false, "IsUserAWallModerator": false, "IsUserAnILTInstructor": false, "GroupMemberships": null } ]
|
Get user details
|
HTTP Action |
GET |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id} |
|
Request Parameters |
NONE |
|
Response |
A user object matching the {id} of the user. Example: { "Id": 123, "FirstName": "API", "MiddleName": null, "LastName": "User", "DisplayName": "User, API", "Avatar": null, "Email": "apiuser@mydomain.com", "Username": "apiuser", "IdSite": 2, "IdTimezone": 15, "ObjectGUID": null, "ActivationGUID": null, "DistinguishedName": null, "IsActive": true, "MustChangePassword": false, "DtCreated": "2021-05-03T15:37:00.53Z", "DtExpires": null, "LanguageString": "en-US", "DtModified": "2021-05-03T16:45:16.81Z", "DtLastLogin": null, "EmployeeId": null, "Company": null, "Address": null, "City": null, "Province": null, "PostalCode": null, "Country": null, "PhonePrimary": null, "PhoneWork": null, "PhoneFax": null, "PhoneHome": null, "PhoneMobile": null, "PhonePager": null, "PhoneOther": null, "Department": null, "Division": null, "Region": null, "JobTitle": null, "JobClass": null, "Gender": null, "Race": null, "DtDOB": null, "DtHire": null, "DtTerm": null, "Field00": null, "Field01": null, "Field02": null, "Field03": null, "Field04": null, "Field05": null, "Field06": null, "Field07": null, "Field08": null, "Field09": null, "Field10": null, "Field11": null, "Field12": null, "Field13": null, "Field14": null, "Field15": null, "Field16": null, "Field17": null, "Field18": null, "Field19": null, "IsUserACourseExpert": false, "IsUserASupervisor": false, "IsUserAWallModerator": false, "IsUserAnILTInstructor": false, "GroupMemberships": null }
|
Update user
|
HTTP Action |
PUT |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Endpoint URL |
/api/user/v2/{id} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Request Parameters |
Note that required fields and formatting depend on settings you have configured in System > User Field Configuration. Example: Example using minimum system required parameters. { "FirstName": "API", "LastName": "User (Modified)", "Username": "apiuser", "Password": "@p1UserPassword", "MustChangePassword" : "true", "Timezone": "Eastern Standard Time", "IsActive": true }
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Response |
The id of the user that was updated. Example: 123 |
Delete user
|
HTTP Action |
DELETE |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id} |
|
Request Parameters |
NONE |
|
Response |
NONE (200 - OK) |
Sign user in (SSO)
|
HTTP Action |
POST |
||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||
|
Endpoint URL |
/api/user/v2/{id}/sso |
||||||
|
Request Parameters |
|
||||||
|
Response |
A tokenized sign-in URL that will sign the user into the system and redirect the user to the redirectUrl if specified. If a redirectUrl is not specified, the user will be redirected to the default landing page that is configured in the LMS. |
Get group memberships for user
|
HTTP Action |
GET |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id}/groups |
|
Request Parameters |
NONE |
|
Response |
An array of group objects where the user specified by {id} is a member. Example: [ { "Id": 3, "Name": "My Group", "ShortDescription": null, "Avatar": null, "LanguageSpecificProperties": [] } ]
|
Attach user to group(s)
|
HTTP Action |
POST |
||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||
|
Endpoint URL |
/api/user/v2/{id}/attachgroups |
||||||
|
Request Parameters |
Example: { "GroupIds": [ 123 ] }
|
||||||
|
Response |
NONE (200 - OK) |
Remove user from group(s)
|
HTTP Action |
POST |
||||||
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
||||||
|
Endpoint URL |
/api/user/v2/{id}/removegroups |
||||||
|
Request Parameters |
Example: { "GroupIds": [ 123 ] }
|
||||||
|
Response |
NONE (200 - OK) |
Get course enrollments for user
|
HTTP Action |
GET |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id}/courseenrollments |
|
Request Parameters |
NONE |
|
Response |
An array of course enrollment objects for the user specified by {id}. Example: [ { "Id": 16, "Name": "My Course", "ShortDescription": "This is my course.", "Credits": 0, "Avatar": null, "StartDate": "2021-04-12T11:45:20.737Z", "DueDate": null, "ExpirationDate": null, "Status": "In Progress", "EnrollmentLink": "/dashboard/v2/Enrollment.aspx?idEnrollment=16" } ]
|
Get learning path enrollments for user
|
HTTP Action |
GET |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id}/learningpathenrollments |
|
Request Parameters |
NONE |
|
Response |
An array of learning path enrollment objects for the user specified by {id}. Example: [ { "Id": 7, "Name": "My Learning Path", "ShortDescription": "This is my learning path.", "Avatar": null, "StartDate": "2021-04-30T18:18:52.307Z", "DueDate": null, "ExpirationDate": null, "Status": "In Progress", "LearningPathEnrollmentLink": "/dashboard/v2/LearningPathEnrollment.aspx?id=7" } ]
|
Get transcript for user
|
HTTP Action |
GET |
|
Base URL |
https://[Your HR Learn LMS Portal URL] |
|
Endpoint URL |
/api/user/v2/{id}/transcript |
|
Request Parameters |
NONE |
|
Response |
An array of course, learning path, and ILT objects that have been completed by the user specified by {id}. Example: { "Courses": [ { "EnrollmentId": 72134, "Name": "Storyline 2004 no quiz com-inc", "Code": "", "Credits": null, "Modules": [ { "Name": "Storyline 2004 no quiz com-inc", "CompletionDate": "2021-06-22T18:54:26.937Z", "Score": "" } ], "StartDate": "2021-04-15T02:55:02.04Z", "CompletionDate": "2021-06-22T18:54:26.937Z", "IsExternalTrainingImport": false, "IsActivityDataImport": false } ], "LearningPaths": [ { "EnrollmentId": 12345, "Name": "My Learning Path", "StartDate": "2021-04-15T02:55:02.04Z", "CompletionDate": "2021-06-22T18:54:26.937Z" } ], "Ilts": [ { "Name": "My ILT", "SessionName": "Saturday Session", "SessionDate": "2021-06-22T18:54:26.937Z", "CompletionDate": "2021-06-22T18:54:26.937Z", "Score": "100" } ] }
|