Pearson
Always Learning

This API is the starting point for exploring the threaded discussions. It returns a list of all threaded discussion content items in the course.

Note: You can also use the Content Structure APIs to find the threaded discussion content items in context of other content. This API does not include any information about the parent unit or the discussion's location in a course. Threaded Discussions use their content item IDs as their ID.



Supported Roles and Authentication Protocols

Type Supported Values
Authentication Protocols OAuth 1.0a, OAuth 2.0
Valid for Roles (OAuth 2): Professor, Teaching Assistant, Student, Administrator

API Request

API Endpoints

HTTP Verbs and URIs

GET /courses/{courseId}/threadeddiscussions{.format}
  • Retrieves a list of threaded discussion content items in the course.
GET /courses/{courseId}/threadeddiscussions/{contentItemId}{.format}
  • Retrieves a single threaded discussion.

Parameters

Parameter Description Valid Values
{courseId} LearningStudio Course ID or relevant course overload.
  • Numeric ID issued by LearningStudio
  • ccn={callNumber}
{contentItemId} LearningStudio Content Item ID. Threaded Discussions use their content item ID as their own ID. Numeric ID issued by LearningStudio
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

Query Parameter Name Description Valid Values
useSourceDomain Include a full URL for any linked resources in content (such as images stored in LearningStudio). true if specifying this parameter, otherwise false or don't include this parameter.

Request Body

None.

API Response

Response Headers

This API returns the standard HTTP Status Codes used by the LearningStudio APIs. There are no special headers returned by the API.

Response Body

Body

{
  "threadedDiscussions":[{
     "id":{discussionId},
     "introductoryText":"{introText}",
     "links": [{
          "href": "{topicsHref}",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
    },{
    "id":{discussionId},
    "introductoryText":"{introText}",
     "links": [{
          "href": "{topicsHref}",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
  }]
}

Property Descriptions

Name Description
{discussionId} Threaded discussion's content item ID.
{introText} Introductory text for the threaded discussion. Note this may be HTML.
{topicsHref} A link to the list of topics for the threaded discussion content item.

Example

Request

Endpoint

GET /courses/123456/threadeddiscussions

Response

Body

{
  "threadedDiscussions":[{
    "id":10012345678,
    "introductoryText":"Please respond to both topics below.",
     "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
    },{
    "id":10012345679,
    "introductoryText":"Please respond to all three topics below.",
     "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345679/topics",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
 }]
}

Example - For a CMS course using useSourceDomain

Request

Endpoint

GET /courses/123456/threadeddiscussions?useSourceDomain=true

Response

Body

{
  "threadedDiscussions":[{
    "id":10012345678,
    "introductoryText":"Please respond to both topics below.<img src="https://api.learningstudio.com/courses/123456/files/img1.jpg?cmsContentId=2372beff-33fe-4533-a47e-cc003fa22e35" alt="test" title="test" />",
     "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
    },{
    "id":10012345679,
    "introductoryText":"Please respond to all three topics below.",
     "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345679/topics",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topics"
      }]
 }]
}
2782 reads
Always Learning
Pearson