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:
The View User Enrollments permission controls, in general, a user role’s ability to see user enrollments at all.
If the role for the calling user context does not have this permission enabled for the relevant org unit, the caller may not be authorized to use routes that retrieve enrollment data. In some cases, the service may let the call proceed, but will return back an empty result set.
The various Search for {roleName} permissions control a user role’s ability to search for enrollments in an org unit for users that belong to the named role. This allows the APIs to retrieve enrollment data for only those enrolled user roles the calling user has permission to see (for example, a teacher role might have permission to see student user enrollments for an org unit, but not the admin users also enrolled in the org unit).
If the calling user context does not have this permission enabled for the relevant org unit, and the relevant roleName, the caller will not see any users with that role listed in enrollment data retrieved through the API.
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.
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, "LastName": <string>|null, "RoleId": <number:D2LID>|null, "LastAccessed": <string:UTCDateTime>|null, "IsOnline": <boolean> }
- UserName, OrgDefinedId, Email, LastAccessed
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, "LISRoles": [ <string>, ... ], "LastAccessed": <string:UTCDateTime>|null // Added as of LMS v20.21.7 }, "PinDate": <string:UTCDateTime>|null }
- StartDate
If present, presents the start date of the org unit.
- EndDate
If present, presents the end date of the org unit.
- ClasslistRoleName
If present, presents the name of the D2L enrollment role as it is 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 on an LTI launch.
- LastAccessed
If present, presents the date the user last accessed the org unit.
- PinDate
Date that this enrollment was pinned to appear at the top of the list of a user’s enrollments.
- Enrollment.MyOrgUnitAccessInfo¶
{ "OrgUnitId": <number:D2LID>, "AccessInfo": { "IsActive": <boolean>, "StartDate": <string:UTCDateTime>|null, "EndDate": <string:UTCDateTime>|null, "CanAccess": <boolean>, "ClasslistRoleName": <string>|null, "LISRoles": [ <string>, ... ], "LastAccessed": <string:UTCDateTime>|null // Added as of LMS v20.21.7 } }
- StartDate
If present, presents the start date of the org unit.
- EndDate
If present, presents the end date of the org unit.
- ClasslistRoleName
If present, presents the name of the D2L enrollment role as it is 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 on an LTI Launch.
- LastAccessed
If present, presents the date the user last accessed the org unit.
- Enrollment.OrgUnitInfo¶
{ "Id": <number:D2LID>, "Type": { <composite:OrgUnit.OrgUnitTypeInfo> }, "Name": <string>, "Code": <string>|null, "HomeUrl": <string:URL>|null, "ImageUrl": <string:APIURL>|null }
- 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¶
{ "OrgUnit": { <composite:Enrollment.OrgUnitInfo> }, "Role": { <composite:Enrollment.RoleInfo> }, "IsCascading": <boolean>, // Appears in LP's unstable contract "EnrolledByUserId": <number:D2LID>|null, // Appears in LP's unstable contract "EnrolledByUserDate": <string:UTCDateTime>|null // Appears in LP's unstable contract }
- EnrolledByUserId
If the enrollment was directly made by a user, provides the user ID of the person who created this enrollment. If the enrollment was made by other methods such as an auto enrollment of a cascading role, the field will be null.
- EnrolledByUserDate
If the enrollment was directly made by a user, provides the date when this enrollment was created. If the enrollment was made by other methods such as an auto enrollment of a cascading role, the field will be null.
Groups¶
- 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> } }
- Code
Note that group code values have these limitations:
They cannot be more than 50 characters in length.
They may not contain these special characters:
\ : * ? “ ” < > | ‘ # , % &
- Description
Note that this property uses the RichTextInput structure type.
Fetch. When you use actions that retrieve Group Data information, the service provides a block like this:
{ "GroupId": <number:D2LID>, "Name": <string>, "Code": <string>, // Added as of LMS v20.21.8 "Description": { <composite:RichText> }, "Enrollments": [ <number:D2LID>, ... ] }
- Enrollments
This property contains a list of user IDs for the explicitly enrolled users in the group.
- 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>, "SelfEnrollmentExpiryDate": <string:UTCDateTime>|null, "GroupPrefix": <string>|null, "RestrictedByOrgUnitId": <number:D2LID>|null }
- Description
Note that this property uses the RichTextInput structure type.
- 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:
NumberOfGroupsNoEnrollment (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.
- RestrictedByOrgUnitId
If you specify a RestrictedByOrgUnitId, the orgunit must be the id of a group or section also in the parent orgunit. The group category’s group members are restricted to only members of the group or section specified by the RestrictedByOrgUnitId.
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>, "SelfEnrollmentExpiryDate": <string:UTCDateTime>|null, "RestrictedByOrgUnitId": <number:D2LID>|null }
- 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> }
- Description
Note that this property uses the RichTextInput structure type.
- 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> } }
- Code
Note that section code values have these limitations:
They cannot be more than 50 characters in length.
They may not contain these special characters:
\ : * ? “ ” < > | ‘ # , % &
- Description
Note that this property uses the RichTextInput structure type.
Fetch. When you use actions to fetch Section Data information, the service provides a block that looks like this:
{ "SectionId": <number:D2LID>, "Name": <string>, "Code": <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> }
- Description
Note that this property uses the RichTextInput structure type.
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.
- Oauth2 Scopes
enrollment:orgunit:delete
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
enrollment:orgunit:delete
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
enrollment:orgunit:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see class list.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
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).Warning
Some orgunits can have very large numbers of enrolled users, so the classlist can be a quite large collection. We advise you to make very careful use of this API call because it asks for an unbounded set of results. We strongly recommend you use the
paged version of this call
instead.
- GET /d2l/api/le/(version)/(orgUnitId)/classlist/paged/¶
Retrieve the enrolled users in the classlist for an org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Query Parameters
onlyShowShownInGrades – (Optional) If true, retrieve only gradeable users; false by default.
searchTerm (string) – (Optional) Search term to look for.
- Oauth2 Scopes
enrollment:orgunit:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see class list.
404 Not Found – Unable to retrieve classlist for provided org unit, or view any users in the classlist.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
Input. You can provide a searchTerm query parameter string to filter results returned; the back-end service looks for fields that contain your search term in these
ClasslistUser
fields: UserName, OrgDefinedId, FirstName, LastName.Return. This action returns an
object list page
JSON block containing a list ofClasslistUser
blocks, sorted first (ascending) by the users’ first names, then by their last names (seeUser.LegalPreferredNames
for detail on how last names are chosen for sorting), and then by the users’ Identifier values.
- GET /d2l/api/lp/(version)/enrollments/myenrollments/¶
Retrieve the list of all enrollments for the current user.
- Parameters
version (D2LVERSION) – API version.
- 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.
- Oauth2 Scopes
enrollment:own_enrollment:read
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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, PinDate, 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 resultingMyOrgUnitInfo
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
enrollment:own_enrollment:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No current user context.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
Return. This action returns a
MyOrgUnitInfo
JSON block.
- GET /d2l/api/lp/(version)/enrollments/myenrollments/(orgUnitId)/access¶
Retrieve abbreviated enrollment details for the current user in the provided org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
enrollment:own_enrollment:read
- Status Codes
200 OK – Action succeeded.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
Return. This action returns a
MyOrgUnitAcessInfo
JSON block.
- GET /d2l/api/lp/(version)/enrollments/myenrollments/(orgUnitId)/parentOrgUnits¶
Retrieve enrollment details of all parent org units of the provided org unit in which the current user is enrolled.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Query Parameters
bookmark (string) – Optional. Bookmark to use for fetching next data set segment.
- Oauth2 Scopes
enrollment:own_enrollment:read
- Status Codes
200 OK – Action succeeded.
404 Not Found – No enrollment for current user in the specified org unit or the org unit does not exist.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.30 – Deprecated as of LMS v20.22.1.
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 resultingMyOrgUnitInfo
data blocks for the segment following your bookmark parameter (or the first segment if the parameter is empty or missing).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/orgUnits/(orgUnitId)/users/¶
Retrieve the collection of users enrolled in the identified org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Query Parameters
roleId (D2LID) – Optional. Filter list to a specific user role.
isActive (bool) – Optional. Filter list to only active or inactive users.
bookmark (string) – Optional. Bookmark to use for fetching next data set segment.
- Oauth2 Scopes
enrollment:orgunit:read
- Status Codes
200 OK – Action succeeded.
404 Not Found – Org unit not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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 resultingOrgUnitUser
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.Support for the isActive query paramter was added to this action as of LP API v1.26.
- 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.
- Oauth2 Scopes
enrollment:orgunit:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see enrollments.
404 Not Found – No such org unit, or no such user enrolled in org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
userId (D2LVERSION) – User ID.
- Query Parameters
- Oauth2 Scopes
enrollment:orgunit:read
- Status Codes
200 OK – Action succeeded.
404 Not Found – User ID not found in known org units.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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 resultingUserOrgUnit
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.
- Oauth2 Scopes
enrollment:orgunit:read
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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 or update a new enrollment for a user.
- Parameters
version (D2LVERSION) – API version.
- JSON Parameters
CreateEnrollmentData (
Enrollment.CreateEnrollmentData
) – New enrollment record.
- Oauth2 Scopes
enrollment:orgunit:create
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
Input. If the user doesn’t already have an enrollment in the applicable org unit, this action creates a new enrollment; if the user does already have an enrollment in the org unit, this action updates the enrollment in place to use the new role.
Return. This action returns an
EnrollmentData
JSON block for the newly enrolled user.
Pinning¶
An org unit that is pinned appears sorted tom 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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Status Codes
200 OK – Action succeeded.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- DELETE /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/(userId)/pin¶
Remove the pin from the provided org unit for specific user.
- 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 or create enrollment.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- 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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Status Codes
200 OK – Action succeeded.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
Return. This action returns a
MyOrgUnitInfo
JSON block.
- POST /d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/(userId)/pin¶
Pin an org unit to the top of the list for a user’s enrollments.
- 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 or create enrollment.
404 Not Found – No enrollment for current user in the specified org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
groups:group:delete
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit, or group category contains groups.
403 Forbidden – No permission to modify groups.
404 Not Found – Group category not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
groups:group:delete
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit.
403 Forbidden – No permission to modify groups.
404 Not Found – Group category not found, or group not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- 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.
- Oauth2 Scopes
groups:enrollment:delete
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit.
403 Forbidden – No permission to modify groups.
404 Not Found – Group category not found, or group not found, or group does not belong to declared category.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- GET /d2l/api/lp/(version)/(orgUnitId)/groupcategories/¶
Retrieve a list of all the group categories for the provided org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
groups:group:read
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit.
403 Forbidden – No permission to see groups.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
groups:group:read
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit.
403 Forbidden – No permission to see groups.
404 Not Found – Group category not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
groups:group:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see groups.
404 Not Found – Group category not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
groups:group:read
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit.
403 Forbidden – No permission to see groups.
404 Not Found – Group category not found, group not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- JSON Parameters
GroupCategoryData (
Group.GroupCategoryData
in Create form) – New group category properties.
- Oauth2 Scopes
groups:group:create
- Status Codes
200 OK – Action succeeded.
400 Bad Request – No such org unit, or invalid group category data provided.
403 Forbidden – No permission to modify groups.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
Return. This action returns a
GroupCategoryData
JSON block, in the Fetch form, for the newly created group category.
- 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
GroupData (
Group.GroupData
in Create form) – New group properties.
- Oauth2 Scopes
groups:group:create
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid group data provided.
403 Forbidden – No permission to modify groups.
404 Not Found – Group category not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
GroupEnrollment (
Group.GroupEnrollment
) – Enrollment block for enrollment in the group.
- Oauth2 Scopes
groups:enrollment:create
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- 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
GroupCategoryData (
Group.GroupCategoryData
in Update form) – Updated group category properties.
- Oauth2 Scopes
groups:group:update
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid group category data provided.
403 Forbidden – No permission to manage groups.
404 Not Found – Group category not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
GroupData (
Group.GroupData
in Update form) – Updated group properties.
- Oauth2 Scopes
groups:group:update
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid group data provided.
403 Forbidden – No permission to manage groups.
404 Not Found – Group category not found, or group not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
sections:section:delete
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- GET /d2l/api/lp/(version)/(orgUnitId)/sections/¶
Retrieve all the sections for a provided org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
sections:section:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see sections.
404 Not Found – No such org unit, or org unit has no sections.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes
sections:section:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see sections.
404 Not Found – No such org unit, or org unit has no set property data.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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.
- Oauth2 Scopes
sections:section:read
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to see sections.
404 Not Found – No such org unit, or no such section.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- JSON Parameters
SectionData (
Section.SectionData
in Create form) – New section data.
- Oauth2 Scopes
sections:section:create
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid section data provided.
403 Forbidden – No permission to manage sections.
404 Not Found – No such org unit, or org unit has no sections.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
SectionEnrollment (
Section.SectionEnrollment
) – Enrollment block for enrollment in the section.
- Oauth2 Scopes
sections:enrollment:create
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
- PUT /d2l/api/lp/(version)/(orgUnitId)/sections/¶
Initialize one or more sections for a particular org unit.
- Parameters
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- JSON Parameters
SectionPropertyData (
Section.SectionPropertyData
in Create form) – New properties for org unit sections.
- Oauth2 Scopes
sections:section:update
- 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.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- JSON Parameters
SectionPropertyData (
Section.SectionPropertyData
in Update form) – Updated properties for org unit sections.
- Oauth2 Scopes
sections:section:update
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid section property data provided
403 Forbidden – No permission to modify sections.
404 Not Found – No such org unit, or org unit has no current section properties.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
SectionData (
Section.SectionData
in Update form) – Updated section data.
- Oauth2 Scopes
sections:section:update
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid section data provided.
403 Forbidden – No permission to manage sections.
404 Not Found – No such org unit, or no such section or org unit has no sections.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.31+ – Route first appears in LMS v20.21.6.
1.26-1.30 – Deprecated as of LMS v20.22.1.
1.25- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
auditorId (D2LID) – Auditor ID.
- JSON Parameters
AuditeeId (D2LID as single JSON number) – Auditee to remove.
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid Auditee ID provided.
403 Forbidden – No permission to manage auditors.
404 Not Found – No auditor found, or no auditee found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
Input. Note that you must pass a single JSON number in the body of this request; for example, if you want to remove user with ID 1234 from the an auditor’s list of auditees, your POST body would be:
1234
- GET /d2l/api/le/(version)/auditing/auditees/(auditeeId)¶
Retrieve information for an auditee.
- Parameters
version (D2LVERSION) – API version.
auditeeId (D2LID) – Auditee ID.
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to manage auditors.
404 Not Found – No auditee found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
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
200 OK – Action succeeded.
403 Forbidden – No permission to manage auditors.
404 Not Found – No auditor found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
- 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
version (D2LVERSION) – API version.
auditorId (D2LID) – Auditor ID.
- Status Codes
200 OK – Action succeeded.
403 Forbidden – No permission to manage auditors.
404 Not Found – No auditor found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
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
version (D2LVERSION) – API version.
auditorId (D2LID) – Auditor ID.
- JSON Parameters
AuditeeId (D2LID as single JSON number) – Auditee to add.
- Status Codes
200 OK – Action succeeded.
400 Bad Request – Invalid Auditee ID provided.
403 Forbidden – No permission to manage auditors.
404 Not Found – No auditor found, or no auditee found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions
1.51+ – Route first appears in LMS v20.21.1.
1.41-1.50 – Deprecated as of LMS v20.22.1.
1.40- – Obsolete as of LMS v20.22.1.
Input. Note that you must pass a single JSON number in the body of this request; for example, if you want to remove user with ID 1234 from the an auditor’s list of auditees, your POST body would be:
1234
The auditee ID you provide must be a valid user, and may not be the same ID as the auditor ID owning the list (that is, users cannot audit themselves).