Pearson
Always Learning

This API returns a list of the topics in a threaded discussion content item. A threaded discussion can have any number of topics (and must have at least one). Users will post their responses under a topic.

Note: Topics can only be created via the LearningStudio User Interface.
Note: Hidden Topics are not visible for students.



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/{contentItemId}/topics{.format}
  • Retrieves all the topics in a threaded discussion content item.
GET /courses/{courseId}/threadeddiscussions/{contentItemId}/topics/{topicId}{.format}
  • Retrieves a single topic.

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 of the threaded discussion. Numeric ID issued by LearningStudio
{topicId} LearningStudio Topic 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

Format

{
  "topics":[{
    "id":{topicId},
    "title":"{topicTitle}",
    "description":"{topicBody}",
    "isHiddenTopic" : {topicHidden},
    "isPostFirstEnabled" : {topicPostFirstEnabled},
    "links": [{;
          "href": "{responsesHref}",;
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/responses"
        },
        {
          "href": "{nextHref}",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/next"
        },
        {
          "href": "{previousHref}",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/previous"
        }]
  }]
}

If requesting a single topic (see Endpoints, above), there will be an additional link that serves as a "self" link. It is simply the URL of the object you requested. See last example, below.

Property Descriptions

Name Description
{topicId} ID of the topic.
{topicTitle} Topic title.
{topicBody} Topic introductory text. Note this may be HTML.
{topicHidden} Visibility status of a topic
{topicPostFirstEnabled} Visibility status of responses of a particular topic
{responsesHref} Link to the responses API for this topic, where you can retrieve the top-level responses or post a new top-level response.
{nextHref} Link to retrieve the next topic, relative to this one. This link will be included even if there is no next topic (executing a GET against it will simply return a 404-Not Found status code). Use a GET request against this complete URL to retrieve the next topic. Learn more.
{previousHref} Link to retrieve the previous topic, relative to this one. This link will be included even if there is no previous topic (executing a GET against it will simply return a 404-Not Found status code). Use a GET request against this complete URL to retrieve the next topic. Learn more.

Example: Get All Topics in a Threaded Discussion

Request

Endpoint

GET /courses/123456/threadeddiscussions/10012345678/topics

Response

Body

{
  "topics":[{
    "id":8000000555,
    "title":"Introduce Yourself",
    "description":"In about 500 words, please introduce yourself and detail any previous knowledge you have on 1800s colonial America.",
    "isHiddenTopic" : true,
    "isPostFirstEnabled" : true,
    "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000555/responses",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/responses"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000555/next",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/next"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000555/previous",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/previous"
        }]
  },{
    "id":8000000556,
    "title":"What do you expect from this class?",
    "description":"Please describe what you hope to learn from this class, and be sure to respond to each other. Similar interests may be grouped for group projects.",
    "isHiddenTopic" : false,
    "isPostFirstEnabled" : true,
    "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/responses",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/responses"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/next",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/next"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/previous",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/previous"
        }]
  }]
}

Example: Get a Single Topic

Request

Endpoint

GET /courses/123456/threadeddiscussions/10012345678/topics/8000000556

Response

Body

{
  "topics":[{;
    "id":8000000556,
    "title":"What do you expect from this class?",
    "description":"Please describe what you hope to learn from this class, and be sure to respond to each other. Similar interests may be grouped for group projects.",
    "isHiddenTopic" : false,
    "isPostFirstEnabled" : false,
    "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/responses",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/responses"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/next",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/next"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/previous",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/previous"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic"
        }]
  }]
}

Example: Get a Single Topic for a CMS course using useSourceDomain

Request

Endpoint

GET /courses/123456/threadeddiscussions/10012345678/topics/8000000556?useSourceDomain=true

Response

Body

{
  "topics":[{
    "id":8000000556,
    "title":"What do you expect from this class?",
    "description":"Please describe what you hope to learn from this class, and be sure to respond to each other. Similar interests may be grouped for group projects.
			<img src="https://api.learningstudio.com/courses/123456/files/img1.jpg?cmsContentId=2372beff-33fe-4533-a47e-cc003fa22e35" alt="test" title="test" />",
    "isHiddenTopic" : true,
    "isPostFirstEnabled" : true,
    "links": [{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/responses",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/responses"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/next",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/next"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556/previous",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic/previous"
        },{
          "href": "https://api.learningstudio.com/courses/123456/threadedDiscussions/10012345678/topics/8000000556",
          "rel": "https://api.learningstudio.com/rels/course/threadedDiscussion/topic"
        }]
  }]
}
3252 reads
Always Learning
Pearson