Developer Platform (May 2017)

Discussions (forums, topics, posts)

«  Organization structure (Org units, structure)   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  News service (news items, user feed)  »

Contents

Attributes

Discussions.Forum

When you use actions that retrieve Forum information, the service provides a block like this:

{
    "ForumId": <number:D2LID>,
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "PostStartDate": <string:UTCDateTime>|null,
    "PostEndDate": <string:UTCDateTime>|null,
    "Name": <string>,
    "Description": { <composite:RichText> },
    "ShowDescriptionInTopics": <boolean>|null,  // Added with LE API v1.14
    "AllowAnonymous": <boolean>,
    "IsLocked": <boolean>,
    "IsHidden": <boolean>,
    "RequiresApproval": <boolean>,
    "DisplayInCalendar": <boolean>,  // Added with LE API v1.11
    "DisplayPostDatesInCalendar": <boolean>  // Added with LE API v1.11
 }
Discussions.ForumData

When you use actions that create or edit a Forum on the service, you should provide a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichText> },
    "ShowDescriptionInTopics": <boolean>|null,  // Added with LE API v1.14
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "PostStartDate": <string:UTCDateTime>|null,
    "PostEndDate": <string:UTCDateTime>|null,
    "AllowAnonymous": <boolean>,
    "IsLocked": <boolean>,
    "IsHidden": <boolean>,
    "RequiresApproval": <boolean>,
    "MustPostToParticipate": <boolean>|null,
    "DisplayInCalendar": <boolean>|null,  // Added with LE API v1.11
    "DisplayPostDatesInCalendar": <boolean>|null  // Added with LE API v1.11
}
Description
Note that this property requires a RichText structure, and follows this general behaviour: if you provide a value for the Html property, the new forum will use that; otherwise, the new forum will use the contents of the Text property (whether it’s empty, present, or not).
ShowDescriptionInTopics
If true, the forum’s description (if present) will be displayed above the topic description when viewing topics in the Discussions tool. Default is false.
DisplayInCalendar
If true, the start date and end date of the forum (if they exist) will appear in the calendars of all users who can see the forum. Default is false. This cannot be true if neither start date nor end date is provided (400 error).
DisplayPostDatesInCalendar
If true, the posting start date and posting end date of the forum (if they exist) will appear in the calendars of all users who can see the forum. Default is false. This cannot be true if neither post start date nor post end date is provided (400 error).
MustPostToParticipate
If true, the contents of the forum won’t be visible to a user until the user creates a post for the forum; otherwise, if the user has permission to view the forum, the forum’s posts will be visible whether or not the user has posted.

Note

The old ForumUpdateData structure has been removed from the documentation for clarity; it was the same as the ForumData structure, but without the date fields (StartDate, EndDate, PostStartDate, and PostEndDate).

As of LMS v10.6.0, the LE API versions 1.10 and older still accept either the old structure (without date fields), or the ForumData structure (with date fields) for _update_ actions but in either case, the back-end service will ignore any date values you provide in these fields and not apply them to the forum’s date properties.

With LE API v1.11 and forward, the back-end service _will_ apply the values you provide in these fields, overwriting the date properties stored in the service, and if you provide null for a date field (or do not provide one in the structure you send), the service will remove the associated date property’s value it has stored for the discussion.

Topics

RATING_T

Discussion topics can be rated in different ways, classified by type. We use the term RATING_T to stand in for an appropriate integer value.

Rating type Value
None 0
FiveStar 1
UpVoteDownVote 2
UpVoteOnly 3
SCORING_T

Discussion topics can have their aggregate score calculated in different ways, classified by type. We use the term SCORING_T to stand in for an appropriate integer value.

Scoring type Value
AverageMessageScore 1
MaximumMessageScore 2
MinimumMessageScore 3
ModeHighestMessageScore 4
ModeLowestMessageScore 5
SumOfMessageScores 6
Discussions.CreateTopicData

When you use an action to create a new forum topic, or update an existing one, you should provide a block that looks like this:

{
    "Name": <string>,
    "Description": { <composite:RichTextInput> },
    "AllowAnonymousPosts": <boolean>,
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "IsHidden": <boolean>,
    "UnlockStartDate": <string:UTCDateTime>|null,
    "UnlockEndDate": <string:UTCDateTime>|null,
    "RequiresApproval": <boolean>,
    "ScoreOutOf": <number>|null,
    "IsAutoScore": <boolean>,
    "IncludeNonScoredValues": <boolean>,
    "ScoringType": <string:SCORING_T>|null,
    "IsLocked": <boolean>,
    "MustPostToParticipate": <boolean>,
    "RatingType": <string:RATING_T>|null,
    "DisplayInCalendar": <boolean>|null,  // Added with LE API v1.12
    "DisplayUnlockDatesInCalendar": <boolean>|null  // Added with LE API v1.12
}
DisplayInCalendar
If true, the start date and end date of the topic (if they exist) will appear in the calendars of all users who can see the topic. Default is false. This cannot be true if neither start date nor end date is provided (400 error).
DisplayUnlockDatesInCalendar
If true, the unlock start date and unlock end date of the topic (if they exist) will appear in the calendars of all users who can see the topic. Default is false. This cannot be true if neither unlock start date nor unlock end date is provided (400 error).
MustPostToParticipate
If true, the contents of the topic won’t be visible to a user until the user creates a post for the topic; otherwise, if the user has permission to view the topic, the topic’s posts will be visible whether or not the user has posted.
RatingType
If null, this topic inherents the org unit’s default rating type. If not null, sets the rating type for this discussion topic.
ScoringType
Note that although this property gets passed as a string, you should use the appropriate numeric value for the topic’s scoring type.
Discussions.GroupRestriction
{
    "GroupRestriction": {
        "GroupId": <number:D2LID>
    }
}
Discussions.Topic

When you use an action to retrieve information about discussion forum topic, the service sends you a block that looks like this:

{
    "ForumId": <number:D2LID>,
    "TopicId": <number:D2LID>,
    "Name": <string>,
    "Description": { <composite:RichText> },
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "UnlockStartDate": <string:UTCDateTime>|null,
    "UnlockEndDate": <string:UTCDateTime>|null,
    "IsLocked": <boolean>,
    "AllowAnonymousPosts": <boolean>,
    "RequiresApproval": <boolean>,
    "UnApprovedPostCount": <number>,
    "PinnedPostCount": <number>,
    "ScoringType": <string:SCORING_T>,
    "IsAutoScore": <boolean>,
    "ScoreOutOf": <number>|null,
    "IncludeNonScoredValues": <boolean>,
    "ScoredCount": <number>,
    "RatingsSum": <number>,
    "RatingsCount": <number>,
    "IsHidden": <boolean>,
    "MustPostToParticipate": <boolean>,
    "RatingType": <string:RATING_T>
}
MustPostToParticipate
If true, the contents of the topic won’t be visible to a user until the user creates a post for the topic; otherwise, if the user has permission to view the topic, the topic’s posts will be visible whether or not the user has posted.

Posts

Posts can be either a thread (a post directly under a topic), or a simple post in reply to another post (including a thread). Posts and threads have the same properties and representations, and the term post will be used to refer to both.

POSTVOTE_T

Posts can receive votes of varying types. We use the term POSTVOTE_T to stand for an appropriate integer value.

Post vote type Value
UpVote 1
NoVote 0
DownVote -1
Discussions.ApprovalData
{
    "IsApproved": <boolean>
}
Discussions.CreatePostData

When you use an action to create a new post in a discussion forum, you should provide a block that looks like this:

{
    "ParentPostId": <number:D2LID>|null,
    "Subject": <string>,
    "Message": { <composite:RichTextInput> },
    "IsAnonymous": <boolean>
}
Discussions.FlagData
{
    "IsFlagged": <boolean>
}
Discussions.Post

When you use an action that retrieves information about discussion forum post, the service sends you a block that looks like this:

{
    "ForumId": <number:D2LID>,
    "PostId": <number:D2LID>,
    "TopicId": <number:D2LID>,
    "PostingUserId": <number:D2LID>|null,
    "PostingUserDisplayName": <string>,  // Added with LE API v1.10
    "ThreadId": <number:D2LID>,
    "ParentPostId": <number:D2LID>|null,
    "Message": { <composite:RichText> },
    "Subject": <string>,
    "DatePosted": <string:UTCDateTime>,
    "IsAnonymous": <boolean>,
    "RequiresApproval": <boolean>,
    "IsDeleted": <boolean>,
    "LastEditedDate": <string:UTCDateTime>|null,
    "LastEditedBy": <number:D2LID>|null,
    "CanRate": <boolean>,
    "ReplyPostIds": [ <number:D2LID>, ... ]
}
LastEditedBy
If present, the User ID for the user who last edited the post.
PostingUserDisplayName
The string for a user’s display name that the calling user would see in the Web UI.
Discussions.RatingData
{
    "CanRate": <boolean>,
    "RatingsSum": <number>,
    "RatingsCount": <number>,
    "RatingsAverage": <number>,
    "UserRating": { <composite:Discussion.UserRatingData> }
}
Discussions.ReadStatusData
{
    "IsRead": <boolean>
}
Discussions.UpdatePostData

When you use an action to update an existing discussion forum post, you should send a block that looks like this:

{
    "Subject": <string>,
    "Message": { <composite:RichTextInput> }
}
Discussions.UserRatingData
{
    "Rating": <number>|null
}
Rating
Discuss ratings can have a value of 1 through 5, inclusive. If you provide 0 when providing or updating a rating value, the service removes the rating and treats the discussion as unrated.
Discussions.UserVoteData
{
    "Vote": <string:POSTVOTE_T>
}
Discussions.VotesData
{
   "NumUpVotes": <number>,
   "NumDwnVotes": <number>,
   "UserVote": { <composite:Discussion.UserVoteData> }
}

Actions

DELETE /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)

Delete a particular discussion forum from an org unit.

Parameters:
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.
GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/

Retrieve a list of all discussion forums for an org unit.

Parameters:
Oauth2 Scopes:

discussions:forums:read

Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a JSON array of Forum data blocks for all the discussion forums associated with the provided org unit.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)

Retrieve a particular discussion forum for an org unit.

Parameters:
Oauth2 Scopes:

discussions:forums:read

Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Forum data block for the indicated discussion forum.

POST /d2l/api/le/(version)/(orgUnitId)/discussions/forums/

Create a new forum for an org unit.

Parameters:
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Forum JSON block containing the properties for the newly created discussion forum.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)

Update a forum for an org unit.

Parameters:
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Input. With LE API v1.10 of this action and older, you can either provide a complete ForumData structure, or the old ForumUpdateData structure with all the date fields absent (StartDate, EndDate, PostStartDate, and PostEndDate): but, in either case, the service ignores any date values you send.

With LE v1.11 of the API and forward, the back-end service accepts, and applies, the date values you send (and if you don’t send any date properties, the service assumes a value of null for the missing date properties and will remove them from the forum).

Return. This action returns a Forum JSON block containing the properties for the newly updated discussion forum.

Topics

DELETE /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)

Delete a particular topic from the provided discussion forum in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
Status Codes:
  • 200 OK – Action succeeded.
  • 404 Not Found – Topic not found, forum not found, or org unit not found.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.
DELETE /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/groupRestrictions/

Delete a group restriction for a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to create forums and topics.
  • 404 Not Found – Topic not found, or forum not found, or org unit not found, or provided group not found.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Note

You must provide a JSON post body with this delete request.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/

Retrieve topics from the provided discussion forum in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
Oauth2 Scopes:

discussions:topics:read

Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to see forum topics.
  • 404 Not Found – No topics in forum, or forum not found, or org unit not found.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a JSON array of Topic data blocks containing the properties for some topics in the indicated discussion forum.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)

Retrieve a particular topic from the provided discussion forum in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
Oauth2 Scopes:

discussions:topics:read

Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Topic JSON data block containing the properties for the indicated discussion forum topic.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/groupRestrictions/

Retrieve the group restrictions for a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a JSON array of GroupRestriction data blocks indicating all the groups in the topic’s group restriction list.

POST /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/

Create a new topic for the provided discussion forum in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Topic JSON data block containing the properties for for the newly created topic.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)

Update an existing topic for the provided discussion forum in an org unit.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Topic JSON data block containing the properties for the newly updated topic.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/groupRestrictions/

Add a group to the group restriction list for a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 403 Forbidden – No permission to create forums and topics.
  • 404 Not Found – Topic not found, or org unit not found, or provided group not found.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Posts

DELETE /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)

Delete a particular post from a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.
DELETE /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Rating/MyRating

Delete the current user context’s rating for a particular post from a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Using this action causes the service to update the current user context’s rating for a post with a null rating value.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/

Retrieve all posts in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
Query Parameters:
 
  • pageSize (integer) – Optional. Number of topics (maximum) to return in each data page (default, maximum value is 1000).
  • pageNumber (integer) – Optional. Ordinal number for the data page to fetch (default value is 1).
  • threadsOnly (boolean) – Optional. When true, the service will only return threads (default value is false).
  • threadId (number:D2LID) – Optional. If present and true, the service returns only posts in this thread; otherwise, the service returns posts in multiple threads.
  • sort (string) – Optional. Sort by creationdate, rating, votes, upvotes, or threaded (see description).
Oauth2 Scopes:

discussions:posts:read

Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.12 – Added support for the threadsOnly, threadId, and sort query parameters.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Input. You can control the sorting of results retrieved with this action using the sort query parameter.

You can control the sorting key field, and the direction of the sort, by using the key name in combination with a minus sign (to make the sort descending instead of ascending). Thus, to do an ascending sort by rating you use ?sort=rating; to do a descending sort by votes you use ?sort=-votes.

If you don’t provide the parameter, this action behaves as if you had provided ?sort=-creationdate (descending sort by creation date value).

Return. This action returns a JSON array of Post data blocks containing the properties for all the posts (including threads) in the indicated discussion forum topic that meet the provided optional filters. The data blocks returned here respect the org unit’s privacy settings with respect to 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).

Note

If the calling user context has permission to approve posts, then the returned block includes any unapproved posts as well as approved posts. If the calling user context has permission to see deleted posts, then the returned block includes deleted posts as well as those not deleted.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)

Retrieve a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Oauth2 Scopes:

discussions:posts:read

Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a Post data block containing the properties for the indicated discussion forum post. The data blocks returned here respect the org unit’s privacy settings with respect to the DisplayName properties (typically, the display-name gets formed from the user’s first and last names, and privacy settings govern the visibility of those items).

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Approval

Retrieve the approval status for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a ApprovalData JSON data block containing the approval status for the indicated discussion forum post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Flag

Retrieve the flagged status for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a FlagData JSON data block containing the flagged status for the indicated discussion forum post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Rating

Retrieve the rating data for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a RatingData JSON data block containing current rating data for the indicated discussion forum post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Rating/MyRating

Retrieve the current user context’s rating data for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a UserRatingData JSON data block containing the current user’s rating data for the indicated discussion form post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/ReadStatus

Retrieve the current read status for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a ReadStatusData JSON data block containing the read status for the indicated discussion forum post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Votes

Retrieve all the vote data for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4Obsolete as of LMS v10.7.0.

Return. This action returns a VotesData JSON data block containing the vote data for the indicated discussion forum post.

GET /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Votes/MyVote

Retrieve the current user’s vote data for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4Obsolete as of LMS v10.7.0.

Return. This action returns a UserVoteData JSON data block containing the current user’s vote data for the indicated discussion forum post.

POST /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/

Create a new post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID
JSON Parameters:
 
Status Codes:
  • 200 OK – Action succeeded.
  • 400 Bad Request – Invalid post data provided, or attempt to post anonymously when not permitted.
  • 403 Forbidden – No permission to create a post or thread.
  • 404 Not Found – Parent post identified but not found, or topic not found.
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Input. You can use this action in two ways:

  • If you want to create a new post with no file attachments, then send a simple POST with a CreatePostData JSON data block for the new post’s information, as you would any other POST passing just the JSON structure to the back-end learning service.
  • If you want to create a new post with one or more file attachments, then you must use an RFC2388-style Multipart/Mixed body where the first part is the CreatePostData JSON data block for the new post’s information, and the subsequent part(s) contain the files you want to upload.

To create the new post within the thread of an existing post, use the ParentPostId property to indicate that post (if you provide null for the ParentPostID property, this action creates a new thread of posts for the discussion forum topic).

Return. This action returns a Post JSON data block containing the properties for the newly created discussion forum post.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)

Update a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Input. The action’s body should be a multipart with a single part consisting of a UpdatePostData JSON data block to provide the post’s updated subject and/or message.

Return. This action returns a Post JSON data block containing the properties for the newly updated discussion forum post.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Approval

Update the approval status of a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a ApprovalData JSON data block containing the new approval status for the indicated discussion forum post.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Flag

Update the flagged status of a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a FlagData JSON data block containing the new flagged status for the indicated discussion forum post.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Rating/MyRating

Update the current user context’s rating for a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Input. If your provided new user rating contains a valid rating value, it replaces the current user’s rating for the post.

Return. This action returns a UserRatingData JSON data block containing the current user’s updated rating for the indicated discussion forum post.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/ReadStatus

Update the read status of a particular post in a discussion forum topic.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

Return. This action returns a ReadStatusData JSON data block containing the new read status for the indicated discussion forum topic.

PUT /d2l/api/le/(version)/(orgUnitId)/discussions/forums/(forumId)/topics/(topicId)/posts/(postId)/Votes/MyVote

Update a discussion forum topic post’s vote data for the current user.

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org unit ID.
  • forumId (D2LID) – Forum ID.
  • topicId (D2LID) – Topic ID.
  • postId (D2LID) – Post ID.
JSON Parameters:
 
Status Codes:
API Versions:
  • 1.12+ – Route first appears in LMS v10.6.0.
  • 1.5-1.11Deprecated as of LMS v10.7.0.
  • 1.4-Obsolete as of LMS v10.7.0.

«  Organization structure (Org units, structure)   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  News service (news items, user feed)  »