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¶
- 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>, "ClasslistRoleDisplayName": <string> // Added with LMS v20.22.12 }
- Username, OrgDefinedId, Email, RoleId, 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).
- ClasslistRoleDisplayName
This field will be an empty string if the role referenced does not have the setting: Display this role in the classlist.
- Enrollment.BatchEnrollmentError¶
This structure gets used to report back errors on specific user-enrollment problems within
batch enrollment creation actions
.{ "StatusCode": <number>, "StatusMessage": <string>, "OrgUnitId": <number:D2LID>, "UserId": <number:D2LID>, "RoleId": <number:D2LID> }
- StatusCode
A HTTP Status code indicating what type of error caused the enrollment to fail.
- StatusMessage
An error message describing why a user failed to be enrolled.
- OrgUnitId, UserId, RoleId
The org unit, user, and role IDs assocated with the attempted enrollment.
- 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 }, "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 1EdTech 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 } }
- 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 1EdTech 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>, // Added with LP's unstable contract "EnrolledByUserId": <number:D2LID>|null, // Added with LP's unstable contract "EnrolledByUserDate": <string:UTCDateTime>|null // Added with 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.
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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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 parameter 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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.
- POST /d2l/api/lp/(version)/enrollments/batch/¶
Create a batch of new enrollments for users.
- Parameters:
version (D2LVERSION) – API version.
- JSON Parameters:
enrollments (JSON array of
CreateEnrollmentData
blocks.) – List of enrollment records.
- Oauth2 Scopes:
enrollment:orgunit:create
- Status Codes:
201 Created – Action accepted and the service created at least one enrollment.
400 Bad Request – All attempts to create enrollments failed, or provided too many enrollments in request.
403 Forbidden – No permission to create enrollments.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.45+ – Route first appears in LMS v20.23.11.
Input. For this action, provide a simple JSON array of
CreateEnrollmentData
JSON blocks. Note that you may only include a maximum of 1000 enrollments in each batch. If you provide an element with enrollment details for a user and org unit where the user is already enrolled, the one you provide will replace the existing enrollment. The back-end service processes each entry in the list individually, and functionality for each is consistent with the action tocreate a single enrollment
.Return. This action returns a JSON array. If any attempt to create an enrollment failed, the back-end service includes a
BatchEnrollmentError
JSON block describing why creating that particular enrollment failed. If all enrollment actions suceeded, the service returns an empty JSON array.
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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.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.43+ – Route first appears in LMS v20.23.5.
1.35-1.42 – Deprecated as of LMS v20.24.1.
1.34- – Obsolete as of LMS v20.24.1.
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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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.67+ – Route first appears in LMS v20.23.1.
1.61-1.66 – Deprecated as of LMS v20.24.1.
1.60- – Obsolete as of LMS v20.24.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).