Pearson
Always Learning

API Group: 

This API allows you to return either a list of all the content items in a course. Unlike it's course-level counterpart, this API is sensitive to the access rights of the specified user. This primarily applies to students; some content items may be hidden from students so this API will hide them from the results.

This API is a flattened list of the content items. There is not any hierarchy represented, however child items do include a 'parent' link that points to the Unit under which they live. The order of the results will match the order displayed in the LearningStudio user interface.

Hint About Content Item IDs: All Units have a content item ID starting with 200, and all content items have an ID starting with 100.

Note: Unlike its course-level counterpart, this API does not offer a single-item retrieval. Use the Course Items API for retrieving individual course item information.



Supported Roles and Authentication Protocols

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

API Request

API Endpoints

HTTP Verbs and URIs

GET /users/{userId}/courses/{courseId}/items{.format}
  • Retrieves all the content items that are not hidden from the specified user, in the order used by the LearningStudio user interface.

Parameters

Parameter Description Valid Values
{userId} LearningStudio User ID or relevant user overload.
  • Numeric ID issued by LearningStudio
  • loginid={clientString}|{username}
  • or replace /users/{userId} with /me
    (OAuth 2 only)
{courseId} LearningStudio Course ID. Numeric ID issued by LearningStudio. Note this API does not support course overloads.
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

Query Parameter Name Description Valid Values
expand By default the API will return links to additional access information about each content item, including the schedule dates (start/end and due dates) and access permissions (whether a student can view the item before/after the dates). This parameter opts to include the content item detail such as its name or type with the results of this API. You can expand multiple children by separating the values with a comma, for example: ?expand=access,schedule.

access
schedule
or Blank

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

{
  "items" :[ 
  { 
    "id" : "{courseItemId}", 
	  "contentType" : "{courseItemType}", 
	  "title" : "{courseItemTitle}", 
	  "links" : [ 
	  { 
		  "href" : "http://api.learningstudio.com/courses/{courseId}/items/{itemId}/access",
		  "rel" : "related", 
		  "title" : "access"
		}, 
		{
		  "href" : "http://api.learningstudio.com/courses/{courseId}/items/{itemId}/schedule", 
		  "rel" : "related", 
		  "title" : "schedule" 
		}, 
		{ 
		  "href" : "http://api.learningstudio.com/courses/{courseId}/textMultimedias/{textMultimediaId}",
		  "rel" : "http://api.learningstudio.com/rels/course/item/content" 
		}
      ] 
    },
    {
	  "id" : "{courseItemId}", 
	  "contentType" : "{courseItemType}", 
	  "title" : "{courseItemTitle}", 
	  "links" : [ 
	  { 
		  "href" : "http://api.learningstudio.com/courses/{courseId}/items/{itemId}/access",
		  "rel" : "related", 
		  "title" : "access"
		}, 
		{
		  "href" : "http://api.learningstudio.com/courses/{courseId}/items/{itemId}/schedule", 
		  "rel" : "related", 
		  "title" : "schedule" 
		}, 
		{ 
		  "href" : "http://api.learningstudio.com/courses/{courseId}/threadedDiscussions/{threadId}",
		  "rel" : "http://api.learningstudio.com/rels/course/item/content" 
      }
	  ]
	}  
  ]

Property Descriptions

Name Description
{courseItemId} ID of the course item.
{courseItemType} Type of course item in this array. Each item contains an array of link objects that connect the item to its related resources. You'll need to use the appropriate content APIs to retrieve each type of content.
MS Office Documents types

  • MSOFFICEDOC
  • EXCEL
  • PPT
  • WORD
  • MANAGED_OD

Web Content Upload types

  • WEBUPLOAD
  • MANAGED_UPLOAD

Text/Multimedia types

  • HTML
  • TEXT
  • MANAGED_HTML

Exam types

  • IQT

Thread types

  • THREAD
  • MANAGED_THREADS
{courseItemTitle} Title of course item.
hrefs Direct link to content item's actual content (or equivalent, for threads and exams). Important: you should not parse this URL to find or store the IDs. Instead, use a GET request against this complete URL to retrieve Term details. Learn more.

Every item contains links to the access and schedule resources for that item.

Schedule and Access

Content Items can have scheduling dates attached to them. These dates include a range during which students are allowed to view the item (or when they are expected to use the content). There is also a due date option available. This information is accessible through the "schedule" link.

The "access" link notes whether students are permitted to access a content item before or after the date range in the "schedule" link. It is your responsibility to respect the schedule and access settings determined by the teacher or institution; the APIs will not filter out content based on schedules alone.

Example

Request

Endpoint

GET /users/9876/courses/12345/items

or

GET /me/courses/12345/items

Response

Body

{
  "items":[
  {
    "id":000001,
    "contentType":"HTML",
    "title":"text",
    "links" :[
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000001/access",
      "rel": "related",
      "title": "access"
    },
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000001/schedule",
      "rel": "related",
      "title": "schedule"
    },
    {
      "href": "https://api.learningstudio.com/courses/12345/textMultimedias/000001",
      "rel": "https://api.learningstudio.com/rels/course/item/content"
    }
    ]
  },
  {
    "id":000002,
    "contentType":"IQT",
    "title":"Exam",
    "links" :[
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000002/access",
      "rel": "related",
      "title": "access"
    },
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000002/schedule",
      "rel": "related",
      "title": "schedule"
    }
    ]
  },
  {
    "id":000003,
    "contentType":"THREAD",
    "title":"Threaded Discussion",
    "links" :[
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000003/access",
      "rel": "related",
      "title": "access"
    },
    {
      "href": "https://api.learningstudio.com/courses/12345/items/000003/schedule",
      "rel": "related",
      "title": "schedule"
    },
    {
      "href": "https://api.learningstudio.com/courses/12345/threadedDiscussions/000003",
      "rel": "https://api.learningstudio.com/rels/course/item/content"
    }
    ]
  }
  ]
}
2997 reads
Always Learning
Pearson