Developer Platform (September 2016)

Enrollments (groups, sections, auditors)

«  Lockers   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  modules   ]   ·  Organization structure (Org units, structure)  »

Contents

These attributes and actions collect together functionality around enrollments: assigning users to the various defined organizational units.

Controlling access to enrollments. Note that system permissions can provide quite fine-grained control over what enrollments users are allowed to see. The permissions for a user’s role control that user’s ability to retrieve enrollment information in two ways:

Attributes

GRPENROLL_T

We categorize the ways that individual entities can enroll in groups using a number of different general types and use the term GRPENROLL_T to stand in for an appropriate integer value.

Up to and including LE v1.9 API ======================================== ========== Group enrollment style Values ======================================== ========== NumerOfGroupsNoEnrollment ^ 0 PeoplePerGroupAutoEnrollment 1 NumberOfGroupsAutoEnrollment 2 PeoplePerGroupSelfEnrollment 3 SelfEnrollmentNumberOfGroups 4 PeoplePerNumberOfGroupsSelfEnrollment 5 ======================================== ==========

^ The service has a known issue where this group enrollment style name is misspelled: NumerOfGroupsNoEnrollment (note missing b). You should be prepared to support this mis-spelling. It has since been corrected with LE v1.10 API .. D2L.LP.Enrollments.BaseGroup.Domain.EnrollmentStyle

LE v1.10+ API ======================================== ========== Group enrollment style Values ======================================== ========== NumberOfGroupsNoEnrollment 0 PeoplePerGroupAutoEnrollment 1 NumberOfGroupsAutoEnrollment 2 PeoplePerGroupSelfEnrollment 3 SelfEnrollmentNumberOfGroups 4 PeoplePerNumberOfGroupsSelfEnrollment 5 SingleUserMemberSpecificGroup 6 ======================================== ==========

SECTENROLL_T

We categorize the ways that individual entities can enroll into sections using a number of different general types and use the term SECTENROLL_T to stand in for an appropriate integer value.

Section enrollment style Values
PeoplePerSectionAutoEnrollment 1
NumberOfSectionsAutoEnrollment 2
Enrollment.ClasslistUser

Structure for the enrolled user’s information that the service exposes through the classlist API.

{
    "Identifier": <string:D2LID>,
    "ProfileIdentifier": <string>,
    "DisplayName": <string>,
    "UserName": <string>|null,
    "OrgDefinedId": <string>|null,
    "Email": <string>|null,
    "FirstName": <string>|null,  // Added with LE v1.7 API
    "LastName": <string>|null  // Added with LE v1.7 API
}
UserName, OrgDefinedId, Email
The back-end service can constrain the visibility of these properties through configuration of the Classlist tool. If these values are configured to be eligible to appear in the classlist for an org unit, then the API can return these values to the calling user (also assuming that the calling user’s role has permission to see those values).
Enrollment.CreateEnrollmentData
{
    "OrgUnitId": <number:D2LID>,
    "UserId": <number:D2LID>,
    "RoleId": <number:D2LID>
}
Enrollment.EnrollmentData
{
    "OrgUnitId": <number:D2LID>,
    "UserId": <number:D2LID>,
    "RoleId": <number:D2LID>,
    "IsCascading": <boolean>
}
Enrollment.MyOrgUnitInfo
{
    "OrgUnit": { <composite:Enrollment.OrgUnitInfo> },
    "Access": {
        "IsActive": <boolean>,
        "StartDate": <string:UTCDateTime>|null,
        "EndDate": <string:UTCDateTime>|null,
        "CanAccess": <boolean>,
        "ClasslistRoleName": <string>|null,  // Added with LE v1.8 API
        "LISRoles": [ <string>, ... ]  // Added with LE v1.8 API
    },
    "PinDate": <string:UTCDateTime>|null  // Appears in LE's unstable contract as of LE v10.6.2
}
ClasslistRoleName
If present, presents the name of the D2L enrollment role as its configured to appear in the classlist.
LISRoles
If present, provides the list of standard IMS LIS roles that are configured for the D2L enrollment role to get sent to an LTI Tool Provider on an LTI Launch.
PinDate
Date that this enrollment was pinned to appear at the top of the list of a user’s enrollments.
Enrollment.OrgUnitInfo
{
    "Id": <number:D2LID>,
    "Type": { <composite:OrgUnit.OrgUnitTypeInfo> },
    "Name": <string>,
    "Code": <string>|null,
    "HomeUrl": <string:URL>|null,  // Added with LP API v1.14
    "ImageUrl": <string:APIURL>|null  // Added with LP API v1.14
}
Code
In rare cases, an org unit may have no code set for it; in that case, you may get null for the code on actions that retrieve this structure. This is most likely to happen for the root organization org unit only.
HomeUrl
The value will be null when the user cannot access the org unit.
ImageUrl
A value will only be provided for course offerings that have an image set; in all other situations the value will be null.
Enrollment.OrgUnitUser
{
    "User": { <composite:User.User> },
    "Role": { <composite:Enrollment.RoleInfo> }
}
Enrollment.RoleInfo
{
    "Id": <number:D2LID>,
    "Code": <string>|null,
    "Name": <string>
}
Enrollment.UserOrgUnit
{
    "OrgUnitInfo": { <composite:Enrollment.OrgUnitInfo> },
    "RoleInfo": { <composite:Enrollment.RoleInfo> }
}

Groups

Group.GroupCategoryData

Create. When you use actions that provide Group Category Data information to the service, you should provide a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichTextInput> },
    "EnrollmentStyle": <number:GRPENROLL_T>,
    "EnrollmentQuantity": <number>|null,
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>,
    "NumberOfGroups": <number>|null,
    "MaxUsersPerGroup": <number>|null,
    "AllocateAfterExpiry": <boolean>,  // Added with LP v10.5.2
    "SelfEnrollmentExpiryDate": <string:UTCDateTime>|null,  // Added with LP v10.5.2
    "GroupPrefix": <string>|null  // Added with LP v10.5.2
}
EnrollmentQuantity
If you provide a non-null value for this property, the service will ignore any values you provide for NumberOfGroups and MaxUsersPerGroup.
NumberOfGroups

If you don’t provide a value for EnrollmentQuantity, then you should provide a non-null value for this property when creating a group category of one of these types:

  • NumerOfGroupsNoEnrollment v1.9- / NumberOfGroupsNoEnrollment v1.10+ (0)
  • NumberOfGroupsAutoEnrollment (2)
  • SelfEnrollmentNumberOfGroups (4)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)
MaxUsersPerGroup

If you don’t provide a value for EnrollmentQuantity, then you should provide a non-null value for this property when creating a group category of one of these types:

  • PeoplePerGroupAutoEnrollment (1)
  • PeoplePerGroupSelfEnrollment (3)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)
AllocateAfterExpiry and SelfEnrollmentExpiryDate
You should only set AllocateAfterExpiry to true if a value is provided for SelfEnrollmentExpiryDate. You should only set these values when
you create a group category with one of these types:
  • PeoplePerGroupAutoEnrollment (1)
  • PeoplePerGroupSelfEnrollment (3)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)
GroupPrefix
If you specify a GroupPrefix, the back-end service will prepend it to both the GroupName and the GroupCode; if you don’t provide a value, the service will use default prefix values instead.
EnrollmentStyle
If you specify an EnrollmentStyle of SingleUserMemberSpecificGroup (added as of LE v1.10 API), values set for NumberOfGroups and MaxUsersPerGroup will be ignored. This style of group creates a single group per user enrolled in the orgunit.

Fetch. When you use actions that retrieve Group Category Data information, the service provides a block like this:

{
    "GroupCategoryId": <number:D2LID>,
    "Name": <string>,
    "Description": { <composite:RichText> },
    "EnrollmentStyle": <number:GRPENROLL_T>,
    "EnrollmentQuantity": <number>|null,
    "MaxUsersPerGroup": <number>|null,
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>,
    "Groups": [ <number:D2LID>, ... ],
            "AllocateAfterExpiry": <boolean>,  // Added with LP v10.5.2
            "SelfEnrollmentExpiryDate": <string:UTCDateTime>|null  // Added with LP v10.5.2
}
EnrollmentQuantity
This property may appear, but is deprecated, and you should use MaxUsersPerGroup as a working value instead.
MaxUsersPerGroup

This property will have a non-null value for groups for group category types:

  • PeoplePerGroupAutoEnrollment (1)
  • PeoplePerGroupSelfEnrollment (3)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)
Groups
This property contains a list of Group IDs for all the groups that belong to this group category.

Update. When you use actions that update existing Group Category Data information, you should provide a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichTextInput> },
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>
}
Group.GroupData

Create, Update. When you use actions that provide Group Data information to the service, you should provide a block that looks like this:

{
    "Name": <string>,
    "Code": <string>,
    "Description": { <composite:RichTextInput> }
}

Fetch. When you use actions that retrieve Group Data information, the service provides a block like this:

{
    "GroupId": <number:D2LID>,
    "Name": <string>,
    "Description": { <composite:RichText> },
    "Enrollments": [ <number:D2LID>, ... ]
}
Enrollments
This property contains a list of user IDs for the explicitly enrolled users in the group.
Group.GroupEnrollment
{
    "UserId": <number:D2LID>
}

Sections

Section.SectionData

Create, Update. When you use actions that provide Section Data information to the service, you should provide a block that looks like this:

{
    "Name": <string>,
    "Code": <string>,
    "Description": { <composite:RichTextInput> }
}

Fetch. When you use actions to fetch Section Data information, the service provides a block that looks like this:

{
    "SectionId": <number:D2LID>,
    "Name": <string>,
    "Description": { <composite:RichText> },
    "Enrollments": [ <number:D2LID>, ... ]
}
Enrollments
This property contains a list of user IDs for the explicitly enrolled users enrolled in the section.
Section.SectionEnrollment
{
    "UserId": <number:D2LID>
}
Section.SectionPropertyData

Create. When you use actions to initialize section property data for an org unit, you should provide a block that looks like this:

{
    "EnrollmentStyle": <number:SECTENROLL_T>,
    "EnrollmentQuantity": <number>,
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>
}

Fetch. When you use actions to fetch Section Property Data information, the service provides a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichText> },
    "EnrollmentStyle": <number:SECTENROLL_T>,
    "EnrollmentQuantity": <number>,
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>
}

Update. When you use actions that provide updated Section Property Data information to the service, you should provide a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichTextInput> },
    "AutoEnroll": <boolean>,
    "RandomizeEnrollments": <boolean>
}

Auditors

Auditors are users that have permission to audit the presence of other users (auditees). In these structures, the properties AuditorId and AuditeeId are actually just the User ID values for the users involved: we use the Auditor and Auditee terms to make it clear which position the user occupies in this relationship.

Audit.AuditedUser

Structure mapping a single auditee to the people auditing that person.

{
    "AuditeeId": <number:D2LID>,
    "DisplayName": <string>,
    "Auditors": [ <Audit.UsersAuditor>, ... ]
}
Audit.Auditee

Information for an enrolled user who can be audited.

{
    "AuditeeId": <number:D2LID>,
    "DisplayName": <string>
}
Audit.Auditor

Structure mapping a single auditor to the enrolled auditees the person is auditing.

{
    "AuditorId": <number:D2LID>,
    "DisplayName": <string>,
    "Auditees": [ <Audit.Auditee>, ... ]
}
Audit.UsersAuditor

Information for an individual who can audit an enrolled user.

{
    "AuditorId": <number:D2LID>,
    "DisplayName": <string>
}

Actions

DELETE /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/(userId)

Delete a user’s enrollment in a provided org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • userId (D2LID) – User ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to see enrollments, or no permission to delete enrollment.
  • 404 Not Found – No such org unit, or no such user enrolled in org unit.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. Unlike most delete actions, this action returns an EnrollmentData JSON block showing the enrollment status just before this action deleted the user’s enrollment.

DELETE /d2l/api/lp/(version)/enrollments/users/(userId)/orgUnits/(orgUnitId)

Delete a user’s enrollment in a provided org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • userId (D2LID) – User ID.
  • orgUnitId (D2LID) – Org unit ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to see enrollments, or no permission to delete enrollment.
  • 404 Not Found – No such org unit, or no such user enrolled in org unit.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. Unlike most delete actions, this action returns an EnrollmentData JSON block showing the enrollment status just before this action deleted the user’s enrollment

GET /d2l/api/le/(version)/(orgUnitId)/classlist/

Retrieve the enrolled users in the classlist for an org unit.

Parameters:
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.5.3.

Return. This action returns a JSON array of ClasslistUser data blocks. Note that the data blocks returned here respect the org unit’s privacy settings with respect to the UserName, OrgDefinedId, Email, FirstName, LastName and the contents of the DisplayName properties (typically, the display-name gets formed from the user’s first and last names, and privacy settings govern the visibility of those items).

GET /d2l/api/lp/(version)/enrollments/myenrollments/

Retrieve the list of all enrollments for the current user.

Parameters:
Query Parameters:
 
  • orgUnitTypeId (CSV of D2LIDs) – Optional. Filter list to specific org unit types.
  • bookmark (string) – Optional. Bookmark to use for fetching next data set segment.
  • sortBy (string) – Optional. Sort by key-expression (see description).
  • isActive (bool) – Optional. Filter on the org unit’s isActive property and select only records that match your provided parameter value.
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
  • canAccess (bool) – Optional. Filter on the org unit’s Access.CanAccess property and select only records that match your provided parameter value.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid query parameter value, or endDateTime value is earlier than startDateTime value.
  • 403 Forbidden – No current user context.
API Versions:
  • 1.14+startDateTime, endDateTime, canAccess, and isActive query parameters added.
  • 1.7+orgUnitTypeId parameter became a CSV, sortBy parameter added.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. You can use a bookmark query parameter as a paging offset, to indicate that the service should return the segment of results immediately following your bookmark.

sortBy

This action uses the sortBy query parameter to control the sorting of items retrieved:

  • By default, this action sorts results in ascending order by org unit ID.
  • You can indicate you want to sort in descending order with a key by using a minus sign (for example, -OrgUnitId).
  • You can sort by multiple keys, by using the query parameter more than once; sortation happens in the order you provide the parameters (for example: &sortBy=-OrgUnitId&sortBy=OrgUnitName).
  • You can use these keys for sorting: EndDate, FavoritedAt, OrgUnitTypeId, OrgUnitName, StartDate.
endDateTime and startDateTime
These parameters describe a time range that will match against any org units that have a start date occurring before the endDateTime and an end date occurring after the startDateTime (so that the time range you provide overlaps with the time span for the org unit). Note that org units without start dates are assumed to have a start date earlier than any other time, while org units without end dates are assumed to have an end date later than any other time.

Return. This action returns a paged result set containing the resulting MyOrgUnitInfo data blocks for the segment following your bookmark parameter (or the first segment if the parameter is empty or missing). If the request included sortBy, the same sortBy parameters must be specified with the bookmark parameter when fetching the next page.

Note

This action uses the org unit’s Id property enclosed within the MyOrgUnitInfo block as the paging control value. You can fetch the segment of results following any org unit’s entry in the entire data set by passing that org unit’s Id as the bookmark value.

GET /d2l/api/lp/(version)/enrollments/myenrollments/(orgUnitId)

Retrieve the enrollment details for the current user in the provided org unit.

Parameters:
Status Codes:
API Versions:
  • 1.8+ – Route first appears in LMS v10.5.5.

Return. This action returns a MyOrgUnitInfo JSON block.

GET /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/

Retrieve the collection of users enrolled in the identified org unit.

Parameters:
Query Parameters:
 
  • roleId (D2LID) – Optional. Filter list to a specific user role.
  • bookmark (string) – Optional. Bookmark to use for fetching next data set segment.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. You can use a bookmark query parameter as a paging offset, to indicate that the service should return the segment of results immediately following your bookmark.

Return. This action returns a paged result set containing the resulting OrgUnitUser data blocks for the segment following your bookmark parameter (or the first segment if the parameter is empty or missing).

Note

This action employs the user’s Identifier property enclosed within the OrgUnitUser block as the paging control value. You can fetch the segment of results following any user’s entry in the entire data set by passing that user’s Identifier as the bookmark value.

GET /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/(userId)

Retrieve enrollment details for a user in the provided org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • userId (D2LID) – User ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns an EnrollmentData JSON block.

Note

This call is equivalent to the route that fetches by specifying the user first, and then the org unit.

GET /d2l/api/lp/(version)/enrollments/users/(userId)/orgUnits/

Retrieve a list of all enrollments for the provided user.

Parameters:
Query Parameters:
 
  • orgUnitTypeId (CSV of D2LIDs) – Optional. Filter list to specific org unit types.
  • roleId (D2LID) – Optional. Filter list to a specific user role.
  • bookmark (string) – Optional. Bookmark to use for fetching next data set segment.
Status Codes:
API Versions:
  • 1.7 – orgUnitTypeId parameter became a CSV
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. You can use a bookmark query parameter as a paging offset, to indicate that the service should return the segment of results immediately following your bookmark.

Return. This action returns a paged result set containing the resulting UserOrgUnit data blocks for the segment following your bookmark parameter (or the first segment if the parameter is empty or missing).

Note

This action employs the org unit’s Id property enclosed within the UserOrgUnit block as the paging control value. You can fetch the segment of results following any org unit’s entry in the entire data set by passing that org unit’s Id as the bookmark value.

GET /d2l/api/lp/(version)/enrollments/users/(userId)/orgUnits/(orgUnitId)

Retrieve enrollment details in an org unit for the provided user.

Parameters:
  • version (D2LVERSION) – API version.
  • userId (D2LID) – User ID.
  • orgUnitId (D2LID) – Org unit ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to see enrollments.
  • 404 Not Found – No such org unit, or no such user, or no such user enrollment in org unit, or no permission to see this user’s enrollment in this org unit.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns an EnrollmentData JSON block.

Note

This call is equivalent to the route that fetches by specifying the org unit first, and then the user.

POST /d2l/api/lp/(version)/enrollments/

Create a new enrollment for a user.

Parameters:
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to create enrollment.
  • 404 Not Found – Provided User ID not found, or provided Org unit ID not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns an EnrollmentData JSON block for the newly enrolled user.

Pinning

An org unit that is pinned appears sorted to the top of the list of courses presented to the user in the service’s web user interface. These routes let you add and remove pins from a user’s enrolled org units.

DELETE /d2l/api/lp/(version)/enrollments/myenrollments/(orgUnitId)/pin

Remove the pin from the provided org unit.

Parameters:
Status Codes:
  • 200 OK – Action succeeded.
  • 404 Not Found – No enrollment for current user in the specified org unit.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.
POST /d2l/api/lp/(version)/enrollments/myenrollments/(orgUnitId)/pin

Pin an org unit to the top of the list of a user’s enrollments.

Parameters:
Status Codes:
  • 200 OK – Action succeeded.
  • 404 Not Found – No enrollment for current user in the specified org unit.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Return. This action returns a MyOrgUnitInfo JSON block.

Groups

DELETE /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)

Delete a particular group category from an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.5.2.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Note

You cannot use this action to delete a group category that currently has associated groups.

DELETE /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)

Delete a particular group from an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
  • groupId (D2LID) – Group ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
DELETE /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)/enrollments/(userId)

Remove a particular user from a group.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
  • groupId (D2LID) – Group ID.
  • userId (D2LID) – User ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
GET /d2l/api/lp/(version)/(orgUnitId)/groupcategories/

Retrieve a list of all the group categories for the provided org unit.

Parameters:
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.5.2.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of GroupCategoryData blocks, in the Fetch form.

GET /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)

Retrieve a particular group category for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.5.2.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupCategoryData JSON block, in the Fetch form.

GET /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/

Retrieve a list of all the groups in a particular group category for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of GroupData data blocks, in the Fetch form.

GET /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)

Retrieve a particular group in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
  • groupId (D2LID) – Group ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupData JSON data block, in the Fetch form.

POST /d2l/api/lp/(version)/(orgUnitId)/groupcategories/

Create a new group category for an org unit.

Parameters:
JSON Parameters:
 
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.5.2.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupCategoryData JSON block, in the Fetch form, for the newly created group category.

Note

Starting with v1.3 of the LP API, the service provides a new way to create group categories; please review the GroupCategoryData description for details.

POST /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/

Create a new group for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupData JSON block, in the Fetch form, for the newly created group.

POST /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)/enrollments/

Enroll a user in a group.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
  • groupId (D2LID) – Group ID.
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to manage groups.
  • 404 Not Found – Group category not found, or group not found, or provided user ID not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
PUT /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)

Update a particular group category for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.5.2.
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupCategoryData JSON block, in the Fetch form, for the newly updated group category.

PUT /d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/(groupId)

Update a particular group for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • groupCategoryId (D2LID) – Group category ID.
  • groupId (D2LID) – Group ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a GroupData JSON block, in the Fetch form, for the newly updated group.

Sections

DELETE /d2l/api/lp/(version)/(orgUnitId)/sections/(sectionId)

Delete a section from a provided org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • sectionId (D2LID) – Section ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to manage sections.
  • 404 Not Found – No such org unit, or org unit has no sections, or no such section.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
GET /d2l/api/lp/(version)/(orgUnitId)/sections/

Retrieve all the sections for a provided org unit.

Parameters:
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of SectionData blocks in the Fetch form.

GET /d2l/api/lp/(version)/(orgUnitId)/sections/settings

Retrieve the section property data for an org unit.

Parameters:
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a SectionPropertyData JSON block in the Fetch form.

GET /d2l/api/lp/(version)/(orgUnitId)/sections/(sectionId)

Retrieve a section from a particular org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • sectionId (D2LID) – Section ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a SectionData JSON block in the Fetch form.

POST /d2l/api/lp/(version)/(orgUnitId)/sections/

Create a new section in a particular org unit.

Parameters:
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns the SectionData JSON block, in its Fetch form, for the org unit’s new section.

Note

You can only use this action to add a section to an org unit that’s already been initialized with one or more initial sections by using PUT /d2l/api/lp/(version)/(orgUnitId)/sections/.

POST /d2l/api/lp/(version)/(orgUnitId)/sections/(sectionId)/enrollments/

Enroll a user in a section for a particular org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • sectionId (D2LID) – Section ID.
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to manage sections.
  • 404 Not Found – No such org unit, or section not found, or no enrollment parameter provided, or user to enroll not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
PUT /d2l/api/lp/(version)/(orgUnitId)/sections/

Initialize one or more sections for a particular org unit.

Parameters:
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid section data provided, or org unit has already been initialized (has at least one section).
  • 403 Forbidden – No permission to manage sections.
  • 404 Not Found – No such org unit.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of SectionData data blocks, in the Fetch form, for the org unit’s initial section(s).

Note

You can only use this action to add the initial section(s) to an org unit. Once you’ve used this action to do so, you cannot use it to add a section; rather, you must use POST /d2l/api/lp/(version)/(orgUnitId)/sections/.

PUT /d2l/api/lp/(version)/(orgUnitId)/sections/settings

Update the section properties for an org unit.

Parameters:
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns the SectionPropertyData JSON block, in its Fetch form, for the org unit’s updated section properties.

PUT /d2l/api/lp/(version)/(orgUnitId)/sections/(sectionId)

Update information for a section in a particular org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • sectionId (D2LID) – Section ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns the updated SectionData JSON block, in its Fetch form.

Auditors

In these routes, when we use the terms AuditorId and AuditeeId, as parameters or JSON properties, these are actually the UserId values for the appropriate users. Users auditing, or being audited, will not have separate IDs for that relationship.

DELETE /d2l/api/le/(version)/auditing/auditors/(auditorId)/auditees/

Remove an auditee from the list of users that an auditor is auditing.

Parameters:
JSON Parameters:
 
  • AuditeeId (D2LID as single JSON number) – Auditee to remove.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
GET /d2l/api/le/(version)/auditing/auditees/(auditeeId)

Retrieve information for an auditee.

Parameters:
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a AuditedUser JSON block.

GET /d2l/api/le/(version)/auditing/auditors/(auditorId)

Retrieve information for an auditor.

Parameters:
  • version (D2LVERSION) – API version.
  • auditorId – Auditor ID.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a Auditor JSON block.

GET /d2l/api/le/(version)/auditing/auditors/(auditorId)/auditees/

Retrieve the list of users an auditor is auditing.

Parameters:
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of Auditee blocks.

POST /d2l/api/le/(version)/auditing/auditors/(auditorId)/auditees/

Add a user to the list of those an auditor is auditing.

Parameters:
JSON Parameters:
 
  • AuditeeId (D2LID as single JSON number) – Auditee to add.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Note

The Auditee ID you provide must be a valid user entity, and may not be the same ID as the auditor ID owning the list (that is, users cannot audit themselves).

«  Lockers   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  modules   ]   ·  Organization structure (Org units, structure)  »