Skip to content
English
  • There are no suggestions because the search field is empty.

HR Learn: API v2 - Learning Path Enrollment API

The Learning Path Enrollment API performs actions related to learning path enrollments in the HR Learn LMS.

The Learning Path Enrollment API performs actions related to learning path enrollments in the HR Learn LMS. The following methods are available via this API:

Enroll a user in learning path(s)

HTTP Action

POST

Base URL

https://[Your HR Learn LMS Portal URL]

Endpoint URL

/api/learningpathenrollment/v2/enroll

Request Parameters

Parameter Data Type Description
IdUser (required) integer

The id of the user to enroll in course(s).

LearningPathIds (required) array<integer> An array of one or more learning path ids to enroll the user in.
Timezone (required) string The time zone for the enrollment. This should be a standard time zone name, a list of acceptable values can be found here.
StartDate (optional) datetime The start date of the enrollment in ISO format. If not specified, the enrollment will start immediately.
Due (optional)

object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the start date of the enrollment, i.e. "This enrollment is due 60 days from its start date." If not specified, the enrollment will not have a due date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)
AccessFromStart (optional) object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the start date of the enrollment, i.e. "This enrollment will expire 120 days from its start date." If not specified, the enrollment will not have an expiration date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)
AccessFromFirstLaunch (optional) object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the date the user first launches the enrollment, i.e. "This enrollment will expire 120 days from the date the user first accesses it." If not specified, the enrollment will not have an expiration date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)

Example:

{ 	"IdUser": 2, 	"LearningPathIds": [ 123 ], 	"Timezone": "Eastern Standard Time", 	"StartDate": "2021-07-01", 	"Due": { "Interval": 30, "Timeframe": "d" }, 	"AccessFromStart": null, 	"AccessFromFirstLaunch": null	 } 

Response

The id of the learning path enrollment that was created.

Example:

123456

Get learning path enrollment details

HTTP Action

GET

Base URL

https://[Your HR Learn LMS Portal URL]

Endpoint URL

/api/learningpathenrollment/v2/{id}

Request Parameters

NONE

Response

A learning path enrollment object matching the {id} of the learning path enrollment.

Example:

{     "Id": 123456,     "IdSite": 2,     "IdLearningPath": 123,     "IdUser": 2,     "IdRuleSetLearningPathEnrollment": null,     "IdLearningPathEnrollment": null,     "IdTimezone": 15,     "Title": "My Learning Path",     "DtStart": "2021-07-01T04:00:00Z",     "DtDue": "2021-01-31T04:00:00Z",     "DtExpiresFromStart": null,     "DtExpiresFromFirstLaunch": null,     "DtEffectiveExpires": null,     "DtFirstLaunch": null,     "DtCompleted": null,     "DtCreated": "2021-06-29T07:59:18.813Z",     "DueInterval": 30,     "DueTimeframe": "d",     "ExpiresFromStartInterval": null,     "ExpiresFromStartTimeframe": null,     "ExpiresFromFirstLaunchInterval": null,     "ExpiresFromFirstLaunchTimeframe": null,     "IdActivityImport": null,     "NumberOfCourses": 2,     "NumberOfCoursesCompleted": 0,     "IsSelfEnrollment": false,     "LearningPathEnrollmentLink": "/dashboard/v2/LearningPathEnrollment.aspx?id=123456" }

Update learning path enrollment

HTTP Action

PUT

Base URL

https://[Your HR Learn LMS Portal URL]

Endpoint URL

/api/learningpathenrollment/v2/{id}

Request Parameters

Parameter Data Type Description

Timezone (optional)

* Specify only if changing the time zone.

string The time zone for the enrollment. This should be a standard time zone name, a list of acceptable values can be found here.

Due (optional)

If you are not making changes to this property, the parameter must match the original parameter value.

object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the start date of the enrollment, i.e. "This enrollment is due 60 days from its start date." If not specified, the enrollment will not have a due date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)

AccessFromStart (optional)

If you are not making changes to this property, the parameter must match the original parameter value.

object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the start date of the enrollment, i.e. "This enrollment will expire 120 days from its start date." If not specified, the enrollment will not have an expiration date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)

AccessFromFirstLaunch (optional)

If you are not making changes to this property, the parameter must match the original parameter value.

object <integer, string>

A date interval object consisting of the following parameters to specify an offset from the date the user first launches the enrollment, i.e. "This enrollment will expire 120 days from the date the user first accesses it." If not specified, the enrollment will not have an expiration date.

  • "Interval" : the number of days, weeks, months, or years to offset
  • "Timeframe" : days, weeks, months, years specified as:
    • "d" – Day(s)
    • "ww" – Week(s)
    • "m" – Month(s)
    • "yyyy" – Year(s)

Example:

{ 	"StartDate": "2021-07-15", 	"Due": { "Interval": 30, "Timeframe": "d" }, 	"AccessFromStart": null, 	"AccessFromFirstLaunch": null	 } 

Response

The id of the learning path enrollment.

Example:

123456

Delete learning path enrollment

HTTP Action

DELETE

Base URL

https://[Your HR Learn LMS Portal URL]

Endpoint URL

/api/learningpathenrollment/v2/{id}

Request Parameters

NONE

Response

NONE (200 - OK)

Reset learning path enrollment

HTTP Action

GET

Base URL

https://[Your HR Learn LMS Portal URL]

Endpoint URL

/api/learningpathenrollment/v2/{id}/reset

Request Parameters

NONE

Response

NONE (200 - OK)