Valence v2.2

Discussions (forums, topics, posts)

«  Organization structure (Org units, structure)   ·  [   home  ·   reference   ·  index   ·  routing table   ·  modules   ]   ·  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}",
    "AllowAnonymous": "<boolean>",
    "IsLocked": "<boolean>",
    "IsHidden": "<boolean>",
    "RequiresApproval": "<boolean>"
 }
Discussions.ForumData

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

{
    "Name": "<string>",
    "Description": "{composite:RichText}",
    "StartDate": "<string:UTCDateTime>|null",
    "EndDate": "<string:UTCDateTime>|null",
    "PostStartDate": "<string:UTCDateTime>|null",
    "PostEndDate": "<string:UTCDateTime>|null",
    "AllowAnonymous": "<boolean>",
    "IsLocked": "<boolean>",
    "IsHidden": "<boolean>",
    "RequiresApproval": "<boolean>"
}
Discussions.ForumUpdateData

When you use actions that update Forum information on the service, you should provide a block that looks like this:

{
    "Name": "<string>",
    "Description": "{composite:RichText}",
    "AllowAnonymous": "<boolean>",
    "IsLocked": "<boolean>",
    "IsHidden": "<boolean>",
    "RequiresApproval": "<boolean>",
}

Topics

SCORING_T

Discussion topics can be scored 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
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>"  // Added with LE v1.1 API
}
ScoringType
Note that although this property gets passed as a string, you should use the appropriate numeric value for the topic’s scoring type.

Changed in version 1.1: MustPostToParticipate property added to this structure with v1.1 of the LE API. 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.

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>"  // Added with LE v1.1 API
}

Changed in version 1.1: MustPostToParticipate property added to this structure with v1.1 of the LE API. 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

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",
    "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": "[array:number:D2LID]"
}
LastEditedBy
If present, the User ID for the user who last edited the post.
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.

Actions

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

Delete a particular discussion forum form an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to delete forums.
  • 404 – Forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.
GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/

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

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see forums.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)

Retrieve a particular discussion forum for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see forums.
  • 404 – Forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

POST /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/

Create a new forum for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid forum data provided.
  • 403 – No permission to create forums.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a ForumData data block containing the properties for the new discussion forum.

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

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

Update a forum for an org unit.

Parameters:
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid forum data provided.
  • 403 – No permission to manage forums.
  • 404 – Forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a ForumUpdateData data block containing the updated properties for the indicated discussion forum.

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

Topics

DELETE /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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 – Action succeeded.
  • 404 – Topic not found, forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.
DELETE /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to create forums and topics.
  • 404 – Topic not found, or forum not found, or org unit not found, or provided group not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupRestriction JSON data block containing the Group ID for the group you want to remove from the group restriction list.

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

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

Parameters:
  • version (D2LVERSION) – API version.
  • orgUnitId (D2LID) – Org Unit ID.
  • forumId (D2LID) – Forum ID.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see forum topics.
  • 404 – No topics in forum, or forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see forum topics.
  • 400 – Topic not found, or forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to create forums and topics.
  • 404 – Topic not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid topic data provided.
  • 403 – No permission to manage discussions.
  • 404 – Forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a CreateTopicData JSON data block to set the properties for the new topic.

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

PUT /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid topic data provided.
  • 403 – No permission to create forums and topics.
  • 404 – Topic not found, or forum not found, or org unit not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a CreateTopicData JSON data block to update the properties for the identified topic.

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

PUT /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to create forums and topics.
  • 404 – Topic not found, or org unit not found, or provided group not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a GroupRestriction JSON data block indicating the group ID to add to the topic’s group restriction list.

Posts

DELETE /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to delete identified post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.
DELETE /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to rate posts.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to see posts.
  • 404 – Topic not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Return. This action returns a JSON array of Post data blocks containing the properties for all the posts in the indicated discussion forum topic.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: postId)

Retrieve a particulary 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:
  • 200 – Action succeeded.
  • 403 – No permission to see posts.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see the approval status for this post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see rating data for this post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

GET /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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:
  • 200 – Action succeeded.
  • 403 – No permission to see rating data for this post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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

POST /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: 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
Status Codes:
  • 200 – Action succeded.
  • 400 – Invalid post data provided, or attempt to post anonymously when not permitted.
  • 403 – No permission to create a post or thread.
  • 404 – Parent post identified but not found, or topic not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid post data provided.
  • 403 – No permission to edit indicated post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Attempt to set approval status for a post that doesn’t require it.
  • 403 – No permssion to approve posts.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a ApprovalData JSON data block with the new approval status you want for the post.

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

PUT /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to alter post’s flagged status.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a FlagData JSON data block with the new flagged status you want for the post.

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

PUT /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 400 – Invalid rating data provided.
  • 403 – No permission to rate this post.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a UserRatingData JSON data block with the current user’s rating for the post. If your block 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/(D2LVERSION: version)/(D2LID: orgUnitId)/discussions/forums/(D2LID: forumId)/topics/(D2LID: topicId)/posts/(D2LID: 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.
Status Codes:
  • 200 – Action succeeded.
  • 403 – No permission to alter post’s read status.
  • 404 – Post not found.
API Versions:
  • 1.0+ – Route first appears in LMS v9.4.1.

Input. Provide a ReadStatusData JSON data block with the new read status you want for the post.

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


comments powered by Disqus

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