Valence v2.2

Enrollments (groups, sections, auditors)

«  Lockers   ·  [   home  ·   reference   ·  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.

Group enrollment style Values
NumerOfGroupsNoEnrollment ^ 0
PeoplePerGroupAutoEnrollment 1
NumberOfGroupsAutoEnrollment 2
PeoplePerGroupSelfEnrollment 3
SelfEnrollmentNumberOfGroups 4
PeoplePerNumberOfGroupsSelfEnrollment 5 (v1.3+)

^ 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.

Changed in version 1.3: PeoplePerNumberOfGroupsSelfEnrollment enrollment style added in v1.3 of the LP API. To create group categories of this type, you must use the v1.3 LP API; previous versions of the API can, however, operate upon such groups.

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.

Seciton 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:D2LID>",
    "DisplayName": "<string>",
    "UserName": "<string>|null",
    "OrgDefinedId": "<string>|null",
    "Email": "<string>|null"
}
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>"
    }
}
Enrollment.OrgUnitInfo
{
    "Id": "<number:D2LID>",
    "Type": "{composite:OrgUnit.OrgUnitTypeInfo}",
    "Name": "<string>",
    "Code": "<string>"
}
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",  // In LP v1.3 API, this field is nullable
    "AutoEnroll": "<boolean>",
    "RandomizeEnrollments": "<boolean>",
    "NumberOfGroups": "<number>|null",  // Added with LP v1.3 API
    "MaxUsersPerGroup": "<number>|null"  // Added with LP v1.3 API
}

Changed in version 1.3: With v1.3+ of the LP API, EnrollmentQuantity becomes a nullable property, and NumberOfGroups and MaxUsersPerGroup appear (as nullable properties).

EnrollmentQuantity

With v1.2 of the LP API and earlier, you must provide a non-null value for this property when creating a group category.

With v1.3+ of the LP API, if you provide a non-null value for this property, the service will create the group just as if you had used an API version of v1.2 or prior (and will ignore any values provided for NumberOfGroups and MaxUsersPerGroup).

NumberOfGroups

With v1.2 of the LP API and earlier, you should not provide this property.

With v1.3+ of the LP API (only), if you don’t provide EnrollmentQuantity, provide a non-null value for this property when creating a group category of one of these types:

  • NumerOfGroupsNoEnrollment (0)
  • NumberOfGroupsAutoEnrollment (2)
  • SelfEnrollmentNumberOfGroups (4)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)
MaxUsersPerGroup

With v1.2 of the LP API and earlier, you should provide this property.

With v1.3+ of the LP API (only), if you don’t provide EnrollmentQuantity, provide a non-null value for this property when creating a group category of one of these types:

  • PeoplePerGroupAutoEnrollment (1)
  • PeoplePerGroupSelfEnrollment (3)
  • PeoplePerNumberOfGroupsSelfEnrollment (5)

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",  // In LP v1.3 API, this field is nullable
    "MaxUsersPerGroup": "<number>|null",  // Added with LP v1.3 API
    "AutoEnroll": "<boolean>",
    "RandomizeEnrollments": "<boolean>",
    "Groups": "[array:number:D2LID]"
}

Changed in version 1.3: With v1.3+ of the LP API, the EnrollmentQuantity property becomes a nullable property, and MaxUsersPerGroup appears (as a nullable property).

EnrollmentQuantity
With v1.3+ of the LP API, this property will still appear but is deprecated, and clients should use MaxUsersPerGroup as a working value instead.
MaxUsersPerGroup

With v1.3+ of the LP API (only), this property appears and 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": "[array:number:D2LID]"
}
Enrollments
This property contains a list of user IDs for the 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": "[array:number:D2LID]"
}
Enrollments
This property contains a list of user IDs for the 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": "[array: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": "[array:Audit.Auditee]"
}
Audit.UsersAuditor

Information for an individual who can audit an enrolled user.

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

Actions

DELETE /d2l/api/lp/(D2LVERSION: version)/enrollments/orgUnits/(D2LID: orgUnitId)/users/(D2LID: 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 – Action succeeded.
  • 403 – No permission to see enrollments, or no permission to delete enrollment.
  • 404 – No such org unit, or no such user enrolled in org unit.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Return. This action returns an EnrollmentData JSON block showing the enrollment status just before this action deleted the user’s enrollment.

DELETE /d2l/api/lp/(D2LVERSION: version)/enrollments/users/(D2LID: userId)/orgUnits/(D2LID: 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 – Action succeeded.
  • 403 – No permission to see enrollments, or no permission to delete enrollment.
  • 404 – No such org unit, or no such user enrolled in org unit.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Return. This action returns an EnrollmentData JSON block showing the enrollment status just before this action deleted the user’s enrollment

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/classlist/

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see class list.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.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, and Email properties.

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

Retrieve the list of all enrollments for the current user.

Parameters:
Query Parameters:
 
  • orgUnitTypeId – Optional. Filter to a specific org unit type.
  • bookmark – Optional. Bookmark to use for fetching next data set segment.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No current user context.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. You can limit the list to only enrollments for a particular org unit type by providing the orgUnitTypeId query parameter: the service expects to receive a value it can interpret as an Org Unit Type ID.

You can also 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 MyOrgUnitInfo 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/(D2LVERSION: version)/enrollments/orgUnits/(D2LID: orgUnitId)/users/

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

Parameters:
Query Parameters:
 
  • roleId – Optional. Filter to a specific user role.
  • bookmark – Optional. Bookmark to use for fetching next data set segment.
Status Codes:
  • 200 – Action succeeded.
  • 404 – Org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. You can limit the list to only users of a particular role by providing the roleId query parameter: the service expects to receive a value it can interpret as a Role ID.

You can also 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/(D2LVERSION: version)/enrollments/orgUnits/(D2LID: orgUnitId)/users/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see enrollments.
  • 404 – No such org unit, or no such user enrolled in org unit.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.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/(D2LVERSION: version)/enrollments/users/(D2LID: userId)/orgUnits/

Retrieve a list of all enrollments for the provided user.

Parameters:
Query Parameters:
 
  • orgUnitTypeId – Optional. Filter to a specific org unit type.
  • roleId – Optional. Filter to a specific user role.
  • bookmark – Optional. Bookmark to use for fetching next data set segment.
Status Codes:
  • 200 – Action succeeded.
  • 404 – User ID not found in known org units.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. You can use both the orgUnitTypeId and roleId query parameters to filter the list results to those matching the respective org unit types and user roles: the service interprets the values of these parameters as D2LID identifiers.

You can also use a bookmark query parameter as a paging offset, to indicate that the service shoudl 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/(D2LVERSION: version)/enrollments/users/(D2LID: userId)/orgUnits/(D2LID: orgUnitId)

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see enrollments.
  • 404 – 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.
  • 1.0+ – Route first appears in LMS v9.4.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/(D2LVERSION: version)/enrollments/

Create a new enrollment for a user.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to create enrollment.
  • 404 – Provided User ID not found, or provided Org Unit ID not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a CreateEnrollmentData JSON block.

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

Groups

DELETE /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: 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:
  • 200 – Action succeeded.
  • 400 – No such org unit, or group category contains groups.
  • 403 – No permission to modify groups.
  • 404 – Group category not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Note

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

DELETE /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: groupCategoryId)/groups/(D2LID: 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:
  • 200 – Action succeeded.
  • 400 – No such org unit.
  • 403 – No permission to modify groups.
  • 404 – Group category not found, or group not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.
DELETE /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: groupCategoryId)/groups/(D2LID: groupId)/enrollments/(D2LID: 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:
  • 200 – Action succeeded.
  • 400 – No such org unit.
  • 403 – No permission to modify groups.
  • 404 – Group category not found, or group not found, or group does not belong to declared category.
API Versions:
  • 1.2+ – Route first appears in LMS v10.1.0
GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – No such org unit.
  • 403 – No permission to see groups.

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

GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: 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:
  • 200 – Action succeeded.
  • 400 – No such org unit.
  • 403 – No permission to see groups.
  • 404 – Group category not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see groups.
  • 404 – Group category not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: groupCategoryId)/groups/(D2LID: 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:
  • 200 – Action succeeded.
  • 400 – No such org unit.
  • 403 – No permission to see groups.
  • 404 – Group category not found, group not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

POST /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/

Create a new group category for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – No such org unit, or invalid group category data provided.
  • 403 – No permission to modify groups.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupCategoryData JSON block, in the Create form.

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.

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

POST /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid group data provided.
  • 403 – No permission to modify groups.
  • 404 – Group category not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupData JSON block, in the Create form.

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

POST /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: groupCategoryId)/groups/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to manage groups.
  • 404 – Group category not found, or group not found, or provided user ID not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupEnrollment JSON block.

PUT /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid group category data provided.
  • 403 – No permission to manage groups.
  • 404 – Group category not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupCategoryData JSON block, in the Update form.

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.

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

PUT /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/groupcategories/(D2LID: groupCategoryId)/groups/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid group data provided.
  • 403 – No permission to manage groups.
  • 404 – Group category not found, or group not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupData JSON block, in the Update form.

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

Sections

DELETE /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/(D2LID: 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 – Action succeeded.
  • 403 – No permission to manage sections.
  • 404 – No such org unit, or org unit has no sections, or no such section.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.
GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/

Retrieve all the sections for a provided org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see sections.
  • 404 – No such org unit, or org unit has no sections.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/settings

Retrieve the section property data for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see sections.
  • 404 – No such org unit, or org unit has no set property data.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see sections.
  • 404 – No such org unit, or no such section.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

POST /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/

Create a new section in a particular org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid section data provided.
  • 403 – No permission to manage sections.
  • 404 – No such org unit, or org unit has no sections.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a SectionData JSON block in the Create form.

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 initialised with an initial section. After adding the first section to an org unit, you should use PUT /d2l/api/lp/(D2LVERSION:version)/(D2LID:orgUnitId)/sections/.

POST /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to manage sections.
  • 404 – No such org unit, or section not found, or no enrollment parameter provided, or user to enroll not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a SectionEnrollment JSON block.

PUT /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/

Initialize the sections for a particular org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid section data provided, or org unit has already been initialized (has at least one section).
  • 403 – No permission to manage sections.
  • 404 – No such org unit.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a SectionPropertyData JSON block in the Create form.

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

Note

You can only use this action to add the first section 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/(D2LVERSION:version)/(D2LID:orgUnitId)/sections/.

PUT /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/settings

Update the section properties for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid section property data provided
  • 403 – No permission to modify sections.
  • 404 – No such org unit, or org unit has no current section properties.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a SectionPropertyData JSON block in the Update form.

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

PUT /d2l/api/lp/(D2LVERSION: version)/(D2LID: orgUnitId)/sections/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid section data provided.
  • 403 – No permission to manage sections.
  • 404 – No such org unit, or no such section or org unit has no sections.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a SectionData JSON block in the Update form.

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 properites, 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/(D2LVERSION: version)/auditing/auditors/(D2LID: auditorId)/auditees/

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid Auditee ID provided.
  • 403 – No permission to manage auditors.
  • 404 – No auditor found, or no auditee found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a JSON block indicating only the numeric Auditee ID of the auditee to delete from the auditor’s list:

"<number:D2LID>"
GET /d2l/api/le/(D2LVERSION: version)/auditing/auditees/(D2LID: auditeeId)

Retrieve information for an auditee.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to manage auditors.
  • 404 – No auditee found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Return. This action returns a AuditedUser JSON block.

GET /d2l/api/le/(D2LVERSION: version)/auditing/auditors/(D2LID: auditorId)

Retrieve information for an auditor.

Parameters:
  • version (D2LVERSION) – API version.
  • auditorId – Auditor ID.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to manage auditors.
  • 404 – No auditor found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Return. This action returns a Auditor JSON block.

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

Retrieve the list of users an auditor is auditing.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to manage auditors.
  • 404 – No auditor found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

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

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid Auditee ID provided.
  • 403 – No permission to manage auditors.
  • 404 – No auditor found, or no auditee found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a JSON block indicating only the numeric Auditee ID of the auditee to add to the auditor’s list:

"<number:D2LID>"

Note that 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).


comments powered by Disqus

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