Valence (May 2016)

Course content (content objects, ISBNs, tables of content)

«  Grades (grade objects, categories, values, schemes)   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  modules   ]   ·  Course updates for end users  »

Contents

Attributes

CONTENT_T

Course content come in two types: course modules and course topics; we use the term CONTENT_T to stand in for an appropriate integer value:

Content object type Value
Module 0
Topic 1
TOPIC_T

Course topic objects are grouped into a set of types and we use the term TOPIC_T to stand in for an appropriate integer value.

Content Topic type Value
File 1
Link 3
SCORM_2004 5 ^
SCORM_2004_ROOT 6 ^
SCORM_1_2 7 ^
SCORM_1_2_ROOT 8 ^

^ Reserved for future implementation

COMPLETION_T

The back-end service lets you filter content items based on their completion status, and we use a numeric value to indicate the filtering policy to follow:

Completion status Value
Any 1
CompletedOnly 2
NotCompletedOnly 3
COMPLETIONTYPE_T

Completion type can be set on a content topic depending on how the topic should be completed. We use the term COMPLETIONTYPE_T to stand in for an appropriate integer value.

Completion type Value
Manual 1
Auto 2
None 3
Content.ContentObject

When you use an action to retrieve course content structure information, you will receive one of two types of ContentObject JSON blocks (which use the Type property to indicate which type it is):

IsLocked
Some SCORM content packages can support sequencing, locking the topic ordering. Content objects with this property set True don’t permit content re-ordering or navigating the content out of sequence.
Type
When you use an action that retrieves information from the service for a course’s content, you get back one of two types of ContentObject JSON blocks (as indicated in the ContentObject’s Type property). In modules, this property has the value 0; in topics, this property has the value 1.

Module.

{
    "Structure": [ <Content.ContentObject>, ... ],
    "ModuleStartDate": <string:UTCDateTime>|null,
    "ModuleEndDate": <string:UTCDateTime>|null,
    "ModuleDueDate": <string:UTCDateTime>|null,
    "IsHidden": <boolean>,
    "IsLocked": <boolean>,
    "Id": <number:D2LID>,
    "Title": <string>,
    "ShortTitle": <string>,
    "Type": 0,
    "Description": { <composite:RichText> }|null,  // Added with LE v1.10 API
    "ParentModuleId": <number:D2LID>|null  // Added with LE v1.10 API
}
ModuleDueDate
If this property is present and not null, the content module has a due date. If the property is present with a non-null value, it contains a UTCDateTime.
ParentModuleId
If null, the module is a root module and the “parent” is the owning org unit; otherwise, this property contains the ID of the parent content module.
Title
The module title as shown on the dashboard page in the LMS.

Topic.

{
    "TopicType": <number:TOPIC_T>,
    "Url": <string>,
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "IsHidden": <boolean>,
    "IsLocked": <boolean>,
    "OpenAsExternalResource": <boolean>|null,  // Added with LE v1.6 API
    "Id": <number:D2LID>,
    "Title": <string>,
    "ShortTitle": <string>,
    "Type": 1,
    "Description": { <composite:RichText> }|null,  // Added with LE v1.10 API
    "ParentModuleId": <number:D2LID>  // Added with LE v1.10 API
}
DueDate
If this property is present and not null, the content topic has a due date. If the property is present with a non-null value, it contains a UTCDateTime.
OpenAsExternalResource
In link-type topics (TopicType value 3), this property set to True will open the link as an external resource in a new window. False is the default value for this property, and if the property is False, null, or not present, the link will open in the current window. For topic types other than link-type topics, this property will always have a value of null.
ParentModuleId
Contains the ID of the parent content module.
Title
The topic title as shown on the viewContent page in the LMS.
Content.ContentObjectData

When you use an action to provide course content information, you use one of two types of ContentObjectData JSON blocks (and use the Type property to indicate which type it is):

Description
This rich text property is optional and may be empty or null.
ShortTitle
This field may be empty or null.
Title
This field may not be empty, null, or consist only of white-space characters.
Type
In modules, this property has the value 0; in topics, this property has the value 1.
Url

In link-type topics (TopicType value 3), this property should be the URL you want to fetch when the user opens the link-type topic.

In file-type topics (TopicType value 1), this property should contain a new path that is valid within the course offering’s content space and indicate where the system should place the file, for example:

/content/enforced/8083-EXT-101/test_topic_file.pdf

Module.

{
    "Title": <string>,
    "ShortTitle": <string>,
    "Type": 0,
    "ModuleStartDate": <string:UTCDateTime>|null,
    "ModuleEndDate": <string:UTCDateTime>|null,
    "ModuleDueDate": <string:UTCDateTime>|null,
    "IsHidden": <boolean>,
    "IsLocked": <boolean>,
    "Description": { <composite:RichTextInput> }|null  // Added with LE v1.10 API
}
ModuleDueDate
If this property is present and not null, the content module has a due date. If the property is present with a non-null value, it should contain a UTCDateTime.

Topic.

{
    "Title": <string>,
    "ShortTitle": <string>,
    "Type": 1,
    "TopicType": <number:TOPIC_T>,
    "Url": <string>,
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "IsHidden": <boolean>,
    "IsLocked": <boolean>,
    "OpenAsExternalResource": <boolean>|null,  // Added with LE v1.6 API
    "Description": { <composite:RichTextInput> }|null,  // Added with LE v1.10 API
    "MajorUpdate": <boolean>|null,  // Added with LE v1.12 API
    "MajorUpdateText": <string>,  // Added with LE v1.12 API
    "ResetCompletionTracking": <boolean>|null  // Added with LE v1.12 API
}
DueDate
If this property is present and not null, the content topic has a due date. If the property is present with a non-null value, it should contain a UTCDateTime.
MajorUpdate
When a topic is being updated, this property set to True will cause students to be notified of the change. This property otherwise has a value of null.
MajorUpdateText
When a topic is being updated and MajorUpdate is set to True, this value will be the notification summary. This property otherwise has a value of null.
OpenAsExternalResource
In link-type topics (TopicType value 3), this property set to True will open the link as an external resource in a new window. False is the default value for this property, and if the property is False, null, or not present, the link will open in the current window. For topic types other than link-type topics, this property will always have a value of null.
ResetCompletionTracking
When a topic is being updated and MajorUpdate is set to True, this property set to True will cause the topic’s completion tracking to be reset. This property otherwise has a value of null.

Content overview

Each course offering org unit can have a course overview consisting of a rich text description and an optional attachment.

Overview.Overview
{
    "Description": <composite:RichText>,
    "HasAttachment": <boolean>
}

ISBN

The ISBN actions support ISO 2108:2005 standard 10- and 13-digit ISBN numbers passed as strings in JSON blocks and HTTP query parameter values.

ISBN.IsbnAssociation

When the client uses actions that retrieve the association between an ISBN and an org unit, the service sends back data blocks that look like this:

{
    "OrgUnitId": <number:D2LID>,
    "Isbn": <string>,
    "IsRequired": <boolean>  // Optional.
}
IsRequired
If this property is present, it will be either true (to indicate that the content item is required for the org unit) or false (to indicate the content item is optional for the org unit).
ISBN.IsbnAssociationData

Client actions that provide new ISBN data to the service use a block like this:

{
    "Isbn": <string>,
    "IsRequired": <boolean>  // Optional.
}
IsRequired
If this property is present, it must be either true (to indicate that the content item is required for the org unit) or false (to incidate the content item is optional for the org unit). False is the default value for this property, and if the property is not present, the back-end service assumes false.

Scheduled items

Content.ScheduledItem

A scheduled item describes an activity in an org unit that was added to the content tool with start date, end date, or due date.

{
    "UserId": <string:D2LID>,
    "OrgUnitId": <string:D2LID>,
    "ItemId": <number:D2LID>,
    "ItemName": <string>,
    "ItemType": <number:CONTENT_T>,
    "ItemUrl": <string>|null,
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "CompletionType": <number:COMPLETIONTYPE_T>,
    "DateCompleted": <string:UTCDateTime>|null
}

An activity is considered scheduled for a particular user when it is accessible to that user:

  • The user is enrolled in the org unit with a role that can have content assigned to them
  • The item is a content topic in the org unit’s content
  • The item is accessible to the user, considering a variety of factors:
    • Start and end dates of the org unit
    • Scheduled dates for the item itself
    • Publication status of the item
    • Any special access status for the item
    • Applicable release conditions
Content.ScheduledItemCount

The count of content items with a start, end, or due date, for the provided org unit context.

{
    "OrgUnitId": <string:D2LID>,
    "UserId": <string:D2LID>,
    "ItemCount": <number>
}
Content.OverdueItem

An overdue item describes an activity in an org unit that was added to the content tool with a due date and that is now overdue for a particular user.

{
    "UserId": <number:D2LID>,
    "OrgUnitId": <number:D2LID>,
    "ItemId": <number:D2LID>,
    "ItemName": <string>,
    "DueDate": <string:UTCDateTime>
}

An activity is considered overdue for a particular user when these considerations are met:

  • The item is a content topic in the org unit’s content
  • The item is accessible to the user, considering a variety of factors:
    • Start and end dates of the org unit
    • Scheduled dates for the item itself
    • Item has a due date scheduled and that date is in the past
    • The user hasn’t yet completed the item

Table of contents

ToC.TableOfContents

This is a nested structure. The TableOfContent comprises a list of Module blocks. Each Module block can contain a list of Topic blocks, and can contain a list of child Module blocks. Thus, each module can have a child that’s a topic, or another module, but topics are “leaf nodes”.

{
    "Modules": [ // Array of Module blocks
        {
            "ModuleId": <number:D2LID>,
            "Title": <string>,
            "Modules": [ // Array of child Module blocks
                {
                    "ModuleId": <number:D2LID>,
                    "Title": <string>,
                    "Modules": [ <ToC.Module>, ... ],
                    "Topics": [ <ToC.Topic>, ... ]
                },
                { <composite:Module> }, ...
            ],
            "Topics": [ // Array of Topic blocks
                {
                    "TopicId": <number:D2LID>,
                    "Identifier": <string:D2LID>,
                    "TypeIdentifier": <string>,
                    "Title": <string>,
                    "Bookmarked": <boolean>,
                    "Unread": <boolean>,
                    "Url": <string>
                },
                { <composite:Topic> }, ...
            ]
        },
        { <composite:Module> }, ...
    ]
}
ModuleId
Contains a D2LID for the module.
TopicId
Contains a D2LID for the topic. Note that this property contains the same identifier as the Identifier property, but formatted as a JSON number rather than as a string.
Url
Carries the same value as appears in a ContentObjectData block: for link content topics, it’s the content link; for file content topics, it’s the path in the course content space for the file data.

User Progress

UserProgress.UserProgressData

When the client uses an action to retrieve the user’s progress through content, the back-end service reports on the progress using blocks that look like this:

{
    "ObjectId": <number:D2LID>,
    "UserId": <number:D2LID>,
    "CompletedDate": <string:UTCDateTime>|null,
    "IsRead": <boolean>,
    "NumVisits": <number>,
    "TotalTime": <number>,
    "LastVisited": <string:UTCDateTime>|null,
    "Visited": <boolean>,
    "Completed": <boolean>
}
ObjectId
ID of the content topic in question.
TotalTime
Total time spent on the page in milliseconds. You cannot update this property to a lower value than its current value; also, the service will not update the value to a time past the last login time of the user.
LastVisited
Date and time the user last visited the content.
Visited
If true, the user has visited the page; otherwise, false.
IsRead
If true, the user has read the page; otherwise, false.

Actions

DELETE /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)

Delete a specific module from an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • moduleId (D2LID) – Module ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content object with provided module ID is not a module.
  • 403 Forbidden – No permission to delete course content.
  • 404 Not Found – Module ID not found in provided org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
DELETE /d2l/api/le/(version)/(orgUnitId)/content/topics/(topicId)

Delete a specific topic from an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • topicId (D2LID) – Topic ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content object with provided topic ID is not a topic.
  • 403 Forbidden – No permission to delete course content.
  • 404 Not Found – Topic ID not found in provided org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.
GET /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)

Retrieve a specific module for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • moduleId (D2LID) – Module ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content object with provided module ID is not a module.
  • 403 Forbidden – No permission to view course content.
  • 404 Not Found – Module ID not found in provided org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a ContentObject JSON data block of type Module.

GET /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)/structure/

Retrieve the structure for a specific module in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • moduleId (D2LID) – Module ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content object with provided module ID is not a module.
  • 403 Forbidden – No permission to view course content.
  • 404 Not Found – Module ID not found in provided org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a JSON array of ContentObject data blocks (can by either Module or Topic type blocks).

GET /d2l/api/le/(version)/(orgUnitId)/content/root/

Retrieve the root module(s) for an org unit.

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

Return. This action returns a JSON array of ContentObject data blocks of type Module.

GET /d2l/api/le/(version)/(orgUnitId)/content/topics/(topicId)

Retrieve a specific topic for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • topicId (D2LID) – Topic ID.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content object with provided topic ID is not a topic.
  • 403 Forbidden – No permission to view course content.
  • 404 Not Found – Topic ID not found in provided org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a ContentObject JSON data block of type Topic.

GET /d2l/api/le/(version)/(orgUnitId)/content/topics/(topicId)/file

Retrieve the content topic file for a content topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • topicId (D2LID) – Topic ID.
Query Parameters:
 
  • stream (boolean) – Optional. If set to true, will stream the file instead of downloading it.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Content topic is not a file.
  • 403 Forbidden – No permission to view course content.
  • 404 Not Found – Topic ID not found in provided org unit, or org unit not found, or content topic’s file not found.
API Versions:
  • 1.9 – Added support for the stream query parameter.
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action retrieves the underlying file for a file content topic.

You can use the optional stream query parameter to change the content disposition of the returned data; if you don’t provide the parameter (or set it to a value of false), the returned Content-Disposition header indicates the data payload is an “attachment”; otherwise, the header indicates the data payload is “inline”.

POST /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)/structure/

Add a child module or topic to a specific module’s structure.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • moduleId (D2LID) – Module ID for the parent module.
JSON Parameters:
 
  • varies – Varies (see input description).
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Provided parent module ID does not identify a module, invalid child topic data provided, or OpenAsExternalResource is set to true on a topic type other than a link.
  • 403 Forbidden – No permission to create or edit course content.
  • 404 Not Found – Parent module ID not found in provided org unit, or org unit not found, or attempt to re-use existing file failed because existing file not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. You can use this action in several ways, depending on whether you’re attempting to add a child module, a child link topic, or a child file topic to an existing (parent) module.

Module. If you’re adding a child module to a parent module’s structure, you should provide a POST body containing a single part: a ContentObjectData JSON data block of type Module.

Link Topic. If you’re adding a child topic to a parent module’s structure that consists of a Link type topic (3), you should provide a POST body containing a single part: a ContentObjectData JSON data block of type Topic. In this case, the Url property in the data block points to the resource you want the link to point to.

File Topic. If you’re adding a child topic to a parent module’s structure that consists of a File type topic (1), you should provide a multipart/mixed post body with two parts (as with the simple file upload process): the first, a ContentObjectData JSON data block of type Topic; the second, the file attachment data itself that you want to store in the org unit’s content area.

When providing a file, the ContentObjectData’s Url property must contain a path that’s valid for the current org unit’s content space, identifying the path to the new file, and the name the new file will have in the content space (typically something like /content/enforced/orgunit_id-org_id/newfilename).

If you want to re-use a file in the org unit’s content space, you can provide a ContentObjectData block that points to the existing file, indicate a File topic type (1), and not post any attached file data.

Return. On success, this action returns a JSON data block containin the properties for the content object you’ve created:

  • If you’re adding a module, this action returns a ContentObject JSON data block of type Module.
  • If you’re adding a file or link type topic, this action returns a ContentObject JSON data block of type Topic.
POST /d2l/api/le/(version)/(orgUnitId)/content/root/

Create a new root module for an org unit.

Parameters:
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to create or edit course content.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Return. This action returns a ContentObject JSON data block of type Module.

PUT /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)

Update a particular module for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • moduleId (D2LID) – Module ID.
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid module data provided, or module ID provided does not identify a module.
  • 403 Forbidden – No permission to create or edit course content.
  • 404 Not Found – No such module found in org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. Note that you cannot use this action to affect a module’s existing Structure property.

PUT /d2l/api/le/(version)/(orgUnitId)/content/topics/(topicId)

Update a particular topic for an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • topicId (D2LID) – Topic ID.
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid topic data provided, topic ID provided does not identify a topic, or OpenAsExternalResource is set to true on a topic type other than a link.
  • 403 Forbidden – No permission to create or edit course content.
  • 404 Not Found – No such topic found in org unit, or org unit not found.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. Note that you can use this action to change a topic’s Url property, but if it changes the new URL must be a valid one for the org unit’s content store (the service makes no check that the URL actually points at anything useful, however). You cannot use this action to provide new file data for an existing topic.

Content overview

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

Retrieve the overview for a course offering.

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

Return. This action returns a Overview JSON data block containing the course offering overview’s details.

GET /d2l/api/le/(version)/(orgUnitId)/overview/attachment

Retrieve the overview file attachment for a course offering.

Parameters:
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to retrieve course offering overview or overview attachment.
  • 404 Not Found – Course has no overview set, or course has no overview attachment, or cannot find attachment file.
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.

Return. This action returns a file stream containing the course offering’s overview attachment.

ISBN

DELETE /d2l/api/le/(version)/(orgUnitId)/content/isbn/(isbn)

Remove the association between an ISBN and org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • isbn (string) – ISBN.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.
GET /d2l/api/le/(version)/content/isbn/(isbn)

Retrieve all the org units associated with an ISBN.

Parameters:
  • version (D2LVERSION) – API version.
  • isbn (string) – ISBN.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.

Return. This action returns a JSON array of IsbnAssociation data blocks specifying all the org units associated with the provided ISBN.

GET /d2l/api/le/(version)/(orgUnitId)/content/isbn/

Retrieve all ISBNs associated with an org unit.

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

Return. This action returns a JSON array of IsbnAssociation data blocks specifying all the org units associated with the provided ISBN.

GET /d2l/api/le/(version)/(orgUnitId)/content/isbn/(isbn)

Retrieve the association between a ISBN and org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • isbn (string) – ISBN.
Status Codes:
API Versions:
  • 1.5+ – Route first appears in LMS v10.4.3.
  • 1.4Deprecated as of LMS v10.5.6.

Return. This action returns a IsbnAssociation JSON data block specifying the association between an org unit and an ISBN.

POST /d2l/api/le/(version)/(orgUnitId)/content/isbn/

Create a new association between an ISBN and an org unit.

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

Return. This action returns a IsbnAssociation JSON data block for the newly created association.

Scheduled items

Scheduled items are activities in content that have assigned dates (start, end, and/or due), and become therefore, scheduled for a user’s attention. Start and end dates govern the accessibility of the activity, while a due date specifies a date after which the item will become overdue if the user does not complete it.

GET /d2l/api/le/(version)/content/myItems/

Retrieve the calling user’s scheduled items.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • orgUnitIdsCSV (CSV of D2LIDs) – List of org unit IDs (limited to 100 or fewer).
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid org unit ID or provided start date later than end date.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you must provide a list of org unit IDs that amount to some or all of the calling user’s active enrollments. You can also filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns an ObjectListPage JSON block containing a list of ScheduledItem blocks, sorted by the earliest of start date, end date, or due date that match the provided query parameter filters.

This action ignores invalid selection data on input (unknown or inaccessible org units or items), returning only those items that the calling user has access to.

GET /d2l/api/le/(version)/content/myItems/due/

Retrieve the calling user’s scheduled items still due.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • orgUnitIdsCSV (CSV of D2LIDs) – List of org unit IDs (limited to 100 or fewer).
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid org unit ID or provided start date later than end date.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you must provide a list of org unit IDs that amount to some or all of the calling user’s active enrollments. You can also filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns an ObjectListPage JSON block containing a list of ScheduledItem blocks of the user’s scheduled items that are still due, sorted by the due date, and that match the provided query parameter filters.

This action ignores invalid selection data on input (unknown or inaccessible org units or items), returning only those items that the calling user has access to.

GET /d2l/api/le/(version)/content/myItems/itemCounts/

Retrieve the quantities of the calling user’s scheduled items, organized by org unit.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • orgUnitIdsCSV (CSV of D2LIDs) – List of org unit IDs (limited to 100 or fewer).
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid org unit ID or provided start date later than end date.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you must provide a list of org unit IDs that amount to some or all of the calling user’s active enrollments. You can also filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns an ObjectListPage JSON block containing a list of ScheduledItemCount blocks containing only the quantity of the calling user’s scheduled items that match the provided query parameter filters.

This action ignores invalid selection data on input (unknown or inaccessible org units or items), returning only those items that the calling user has access to.

GET /d2l/api/le/(version)/content/myItems/due/itemCounts/

Retrieve the quantities of the calling user’s scheduled items still due.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • orgUnitIdsCSV (CSV of D2LIDs) – List of org unit IDs (limited to 100 or fewer).
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid org unit ID or provided start date later than end date.
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you must provide a list of org unit IDs that amount to some or all of the calling user’s active enrollments. You can also filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns an ObjectListPage JSON block containing a list of ScheduledItemCount blocks containing only the quantity of the calling user’s scheduled items that are still due and match the provided query parameter filters.

GET /d2l/api/le/(version)/(orgUnitId)/content/myItems/

Retrieve the calling user’s scheduled items for a particular org unit.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you can filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns an ObjectListPage JSON block containing a list of ScheduledItem blocks, sorted by the earliest of start date, end date, or due date, that match the provided query parameter filters.

GET /d2l/api/le/(version)/(orgUnitId)/content/myItems/due/

Retrieve the calling user’s scheduled items still due for a particular org unit.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you can filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. An ObjectListPage JSON block containing a list of ScheduledItem blocks of the user’s scheduled items that are still due, sorted by due date, and that match the provided query parameter filters.

GET /d2l/api/le/(version)/(orgUnitId)/content/myItems/itemCount

Retrieve the quantity of the calling user’s scheduled items for provided org unit.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you can filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns a ScheduledItemCount JSON block containing only the quantity of the calling user’s scheduled items that match the provided query parameter filters.

GET /d2l/api/le/(version)/(orgUnitId)/content/myItems/due/itemCount

Retrieve quantity of the calling user’s scheduled items still due for a particular org unit.

Parameters:
Query Parameters:
 
  • completion (COMPLETION_T) – Optional. Completion status.
  • startDateTime (UTCDateTime) – Optional. Start of time window to examine.
  • endDateTime (UTCDateTime) – Optional. End of time window to examine.
Status Codes:
API Versions:
  • unstable – Route first appears in LMS v10.6.2.

Input. When calling this action, you can filter the data retrieved based on its completion status or whether an item’s due date falls within a provided time window.

Return. This action returns a ScheduledItemCount JSON block containing only the quantity of the calling user’s scheduled items that are still due and match the provided query parameter filters.

GET /d2l/api/le/(version)/overdueItems/

Retrieve the overdue items for a particular user in a particular org unit.

Parameters:
Query Parameters:
 
  • userId (D2LID) – User for which to retrieve the overdue activities.
  • orgUnitIdsCSV (CSV of D2LIDs) – Optional. List of Org unit IDs.
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • 1.9+ – Route first appears in LMS v10.5.5.

Input. For this call, you must provide a userId query parameter and may provide an orgUnitIdsCSV query parameter:

  • Users can query about their own overdue items.
  • Auditors can query about overdue items for users they audit.
  • Users that have Manage Content permission over org units (for example, instructors for course offerings) may be able to query about overdue items for users enrolled in those org units (for example, students), but not for overdue items in org units that the user identified by userId has Manage Content permission over.

Return. This action returns an ObjectListPage JSON block containing a list of OverdueItem blocks.

GET /d2l/api/le/(version)/overdueItems/myItems

Retrieves the calling user’s overdue items, within a number of org units.

Parameters:
Query Parameters:
 
  • orgUnitIdsCSV (CSV of D2LIDs) – Optional. List of Org unit IDs.
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • 1.9+ – Route first appears in LMS v10.5.5.

Input. You may provide orgUnitIdsCSV query parameter for this call; you will be unable to retrieve overdue items for org units for which you do not have Manage Content privileges.

Return. This action returns an ObjectListPage JSON block containing a list of OverdueItem.

Table of contents

GET /d2l/api/le/(version)/(orgUnitId)/content/bookmarks

Retrieve a list of topics that have been bookmarked.

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

Return. This action returns a JSON array of Topic ToC entries.

GET /d2l/api/le/(version)/(orgUnitId)/content/recent

Retrieve a list of the most recently visited topics.

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

Return. This action returns a JSON array of Topic ToC entries.

GET /d2l/api/le/(version)/(orgUnitId)/content/toc

Retrieve the table of course content for an org unit.

Parameters:
Query Parameters:
 
  • ignoreModuleDateRestrictions (boolean) – Optional. Include content modules where date restriction would otherwise hide them from view.
Status Codes:
API Versions:
  • 1.12+ – Support for the ignoreModuleDateRestrictions query parameter deployed as of LMS v10.6.0.
  • 1.4Deprecated as of LMS v10.5.6.
  • 1.3-Obsolete as of LMS v10.4.7.

Input. This action’s optional ignoreModuleDateRestrictions query parameter supports inclusion of content module entries regardless of date restrictions on viewing content:

  • If false (or you don’t provide the query parameter) then this action fetches back the table of contents excluding all items restricted from view by date restriction, unless the calling user has permission to view them anyway (for example, administrator users).

  • If true, then this action fetches back the table of contents including modules that would otherwise be restricted from view by date restriction (start or end dates). No special view permissions are required from the calling user, and therefore, students will be allowed to view such modules and their sub-modules even if the restrictions are not met.

    Nevertheless, the descendant content topics remain excluded, unless the calling user has permission to view them anyway (for example, administrator users).

Return. This action returns a TableOfContents JSON block.

User Progress

GET /d2l/api/le/(version)/(orgUnitId)/content/userprogress/

Retrieve the user progress items in an org unit, for specific users or content topics.

Parameters:
Query Parameters:
 
  • userId (D2LID) – Report on progress for these users (you can use this parameter more than once for multiple users).
  • objectId (D2LID) – Report on progress through these content topics (you can use this parameter more than once for multiple topics).
  • pageSize – Optional. Number of entries to return in each data page (default is 20).
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • unstable – Route first appears in LMS v10.6.0.

Input. The calling user context’s role affects the scope of this action:

  • Users can query about their own progress through content.
  • Auditors can query about progress for users they audit.
  • Users with permission to see progress for all users over org units (for example, instructors for course offering org units) may be able to query about progress for all users enrolled in those org units.

Return. This action returns an ObjectListPage JSON block containing a list of UserProgressData.

Note that with this action, you will only retrieve user progress information for those users that have made some progress through content topics; you will not retrieve records for users that have made no progress on topics past the default state.

GET /d2l/api/le/(version)/(orgUnitId)/content/userprogress/(topicId)

Retrieve one user’s progress within an org unit for a particular content topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org Unit ID.
  • topicId (D2LID) – Topic ID.
Query Parameters:
 
  • userId (D2LID) – Report on progress for this user.
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • unstable – Route first appears in LMS v10.6.0.

Input. The calling user context’s role affects the scope of this action:

  • Users can query about their own progress through content.
  • Auditors can query about progress for a user they audit.
  • Users with permission to see progress for all users over org units (for example, instructors for course offering org units) may be able to query about progress for all users enrolled in those org units.

Return. This action returns a UserProgressData JSON block.

Note that with this action, you will retrieve all user progress records for the topic, including records with a default state for those users that have made no progress past that state.

POST /d2l/api/le/(version)/(orgUnitId)/content/userprogress/

Update a user progress item.

Parameters:
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
API Versions:
  • unstable – Route first appears in LMS v10.6.0.

Input. Note that the UserId property in your provided user progress data must be the ID for the calling user context: this action only lets users update their own progress through content.

Return. This action returns a UserProgressData JSON data block containing the updated state of the user’s progress.

«  Grades (grade objects, categories, values, schemes)   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  modules   ]   ·  Course updates for end users  »