Pearson
Always Learning

This API retrieves a lit of all the MS Office Document® content items in a course. Each item contains the content item ID and the link URL to the MS Office Documents HTML Content API where you can retrieve the HTML version of the content.

Note this API is the only way to get the URL for the HTML content. That URI is not predictable. This is a two step process:

  1. Use this API to retrieve the content URL for MS Office Document content items. (You can retrieve all of them or a single one by content item ID.)
  2. GET the URL provided in the contentUrl parameter from this response. That URL will be the HTML Content API.

When a teacher creates a content item from a Word®, PowerPoint®, or Excel® document, LearningStudio creates an HTML version of it, which is described above. You can also use the Original Document API to download the original file.



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}/msOfficeDocuments{.format}
  • Retrieves a list of all the MS Office Document content items in the course.
GET /courses/{courseId}/msOfficeDocuments/{contentItemId}{.format}
  • Retrieves a list of all the MS Office Document content items in the course.

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
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

No Query String Parameters are supported.

Request Body

None

API Response

Response Header

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

{
  "msOfficeDocuments":[{
    "id":"{contentItemId}",	
    "contentUrl":"http://api.learningstudio.com/courses/{courseId}/msOfficeDocuments/{contentItemId}/content/{contentPath}.html"
  },{
    "id":"{contentItemId}",	
    "contentUrl":"http://api.learningstudio.com/courses/{courseId}/msOfficeDocuments/{contentItemId}/content/{contentPath}.html"
  },{
    "id":"{contentItemId}",	
    "contentUrl":"http://api.learningstudio.com/courses/{courseId}/msOfficeDocuments/{contentItemId}/content/{contentPath}.html"
  }
 
]
}

Description

Each item in the response contains the content item ID (which matches those returned by the content structure APIs) and the path of the API to retrieve the MS Office Document HTML content. No additional detail or content is available via this API.

Note: If you are requesting a single MS Office Document item (see Endpoints, above), the format is the same but there is only one item in the msOfficeDocuments array.

Note: If the content item exists but no document has yet been uploaded to it, the contentUrl property will be empty.

Example

Request

Endpoint

GET /courses/123456/msOfficeDocuments

Response

{
  "msOfficeDocuments": [
    {
      "id": 123456789,
      "contentUrl": "https://api.learningstudio.com/courses/123456/msOfficeDocuments/123456789/content/14142534-d846-2422-ad7b-b733f0852d22.htm"
    },
    {
      "id": 987654321,
      "contentUrl": "https://api.learningstudio.com/courses/123456/msOfficeDocuments/987654321/content/234244-d846-4a03-ad7b-asdfsfa.htm"
    }
  ]
}
2820 reads
Always Learning
Pearson