Pearson
Always Learning

This API retrieves the content for a text/multimedia content item.



Supported Roles and Authentication Protocols

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

API Request

API Endpoints

HTTP Verbs and URIs

GET /courses/{courseId}/textMultimedias/{contentItemId}/content.html
  • Retrieves the content for a text/multimedia item.

Note: this type of content is always returned as text and may contain HTML if it exists in the content item.

Parameters

Name Description Valid Values
{courseId} LearningStudio Course ID. Numeric ID issued by LearningStudio. Note this API does not support course overloads.
{contentItemId} ID of the Content Item. Numeric ID issued by LearningStudio

Query String Parameters

Query Parameter Name Description Valid Values
useSourceDomain Content can contain images or other external resources which are uploaded through the visual editor in LearningStudio's user interface. When these resources are stored in LearningStudio, the relative path is saved in the HTML generated for the content item. In order for your application to display those images, you will need the absolute, full URL. This query string parameter will change those relative resource paths into full URLs, which you can then use to retrieve the image.

true , false or Blank

Request Body

None

API Response

Response Header

This API returns the standard HTTP Status Codes used by the LearningStudio APIs.

In addition, it also sends a Content-Type: text/html HTTP header.

Response Body

This API returns text-based content with HTML markup if it exists. There is no JSON or XML envelope, and the payload is suitable for immediate rendering to your application view, if applicable.

Example

Request

Endpoint

GET /courses/1234/textMultimedias/12345678/content.html

Response

HTTP Headers (Partial)

HTTP/1.1 200 OK
Content-Type: text/html

Body

<div class="pageTitle">Assignment 1</div>
<br /><br /><p>Please submit your assignment to the dropbox.</p>

Example for a CMS course using UseSourceDomain

Request

Endpoint

GET /courses/123456/textMultimedias/12345678/content.html?useSourceDomain=true

Response

HTTP Headers (Partial)

HTTP/1.1 200 OK
Content-Type: text/html

Body

<div class="pageTitle">Assignment 1</div>
<br /><br /><img src="https://api.learningstudio.com/courses/123456/files/img1.jpg?cmsContentId=2372beff-33fe-4533-a47e-cc003fa22e35" alt="test" title="test" /><p>Please submit your assignment to the dropbox.</p>
2826 reads
Always Learning
Pearson