Pearson
Always Learning

Retrieves and optionally updates the schedules for all content items (including units) in the specified course. All items are included, regardless of access controls to students, so students cannot use this API unless they have access to all items.

Note: This API only works with all items in the course. Every item is returned and when updating, the schedule for every item must be sent.



Supported Roles and Authentication Protocols

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

API Request

API Endpoints

HTTP Verbs and URIs

GET /courses/{courseId}/itemSchedules{.format}
  • Retrieves the schedules for all content items in the course.
PUT /courses/{courseId}/itemSchedules{.format}
  • Update the schedules for all content items in the course.
  • The data submitted must include every content item in the course.

Parameters

Parameter Description Valid Values
{courseId} LearningStudio Course ID or relevant course overload.

Important: Overloads cannot be used with PUT, you must use the course ID.

  • Numeric ID issued by LearningStudio
  • ccn={callNumber} (GET only)
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

No query string parameters are supported.

Request Body

For GET Requests

None.

For PUT Requests

Remember: You must submit a schedule for all items even if you are not changing them. This format is demonstrating only two items.

{
  "itemSchedules": [{
    "itemId": {itemId},
    "schedule": {
      "accessSchedule": {
        "startDateTime": "{startDateTime}",
        "endDateTime": "{endDateTime}",
        "canAccessBeforeStartDateTime": {canAccessBeforeStartDateTimeFlag},
        "canAccessAfterEndDateTime": {canAccessAfterStartDateTimeFlag}
      }
    }
    },{
    "itemId": {itemId},
    "schedule": {
      "accessSchedule": {
        "startDateTime": "{startDateTime}",
        "endDateTime": "{endDateTime}",
        "canAccessBeforeStartDateTime": {canAccessBeforeStartDateTimeFlag},
        "canAccessAfterEndDateTime": {canAccessAfterStartDateTimeFlag}
      }
    }
    }]
}

The following describes the request elements:

Name Description Valid Values
{itemId} LearningStudio Content Item ID. Numeric ID issued by LearningStudio
{startDateTime} Start date and time for the course item. If you do not supply the startDateTime property for an item on a PUT request, it is assumed that start dates for that item should be inherited from it's parent. ISO-8601 formatted timestamp, e.g.
YYYY-MM-DDTHH:MM:SSZ
{endDateTime} End date and time for the course item. If you do not supply the endDateTime property for an item on a PUT request, it is assumed that end dates for that item should be inherited from it's parent. ISO-8601 formatted timestamp, e.g.
YYYY-MM-DDTHH:MM:SSZ
{canAccessBeforeStartDateTimeFlag} Designates whether the item can be accessed before the start date/time.
  • true
  • false
{canAccessAfterEndDateTimeFlag} Designates whether the item can be accessed after the end date/time.
  • true
  • false
{dueDateTime} The scheduled date/time when the course item is due. ISO-8601 formatted timestamp, e.g.
YYYY-MM-DDTHH:MM:SSZ

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.

When updating an item, the API will return a status code of 204 - No Content with no response body.

Response Body

Format

{
  "itemSchedules": [{
    "itemId": {itemId},
    "itemTitle": "{itemTitle}",
    "schedule": {
      "accessSchedule": {
        "startDateTime": "{startDateTime}",
        "endDateTime": "{endDateTime}",
        "isInherited": {isInheritedFlag},
        "canAccessBeforeStartDateTime": {canAccessBeforeStartDateTimeFlag},
        "canAccessAfterEndDateTime": {canAccessAfterEndDateTimeFlag}
      }
    },
    "links": [{
      "href": "{itemHref}",
      "rel": "self"
    }]
  }]
}

Property Descriptions

Name Description
{itemId} LearningStudio Content Item ID
{itemTitle} Content Item Title
{startDateTime} Start date and time for the course item. Format is ISO-8601, e.g., YYYY-MM-DDTHH:MM:SSZ.
{endDateTime} Start date and time for the course item. Format is ISO-8601, e.g., YYYY-MM-DDTHH:MM:SSZ.
{isInheritedFlag} Designates whether the item date/time was inherited from the parent course. Value is boolean. If the schedule is not inherited this property may be missing.
{canAccessBeforeStartDateTimeFlag} Designates whether the item can be accessed before the start date/time. Value is boolean.
{canAccessAfterEndDateTimeFlag} Designates whether the item can be accessed before the start date/time. Value is boolean.
{itemHref} Link to the content item detail object.

Example: Retrieve All Schedules

Request

Endpoint

GET /courses/123456/itemschedules

Response

Body

This example body is truncated.

{
  "itemSchedules": [{
    "itemId": 987654321,
    "itemTitle": "Course Home",
    "schedule": {
      "accessSchedule": {
        "startDateTime": "2010-01-01T07:00:00Z",
        "endDateTime": "2010-04-01T07:00:00Z",
        "isInherited": false,
        "canAccessBeforeStartDateTime": false,
        "canAccessAfterEndDateTime": true
      }
    },
    "links": [{
      "href": "https://api.learningstudio.com/courses/123456/items/987654321",
      "rel": "self"
    }]
    }, {
    "itemId": 987456123,
    "itemTitle": "Assignment 1",
    "schedule": {
      "dueDate": "2011-03-08T06:59:00Z",
      "accessSchedule": {
        "startDateTime": "2011-02-28T07:00:00Z",
        "endDateTime": "2011-03-08T06:59:00Z",
        "isInherited": true,
        "canAccessBeforeStartDateTime": true,
        "canAccessAfterEndDateTime": true
      }
    },
    "links": [{
      "href": "https://api.learningstudio.com/courses/123456/items/987456123",
      "rel": "self"
    }]
  }, 
 	... truncated ...
  ]
}

Example: Update Item Schedule

Request

Endpoint

PUT /courses/123456/itemschedules

Body

All content items must be sent in this request. This example is truncated.

{
  "itemSchedules": [{
    "itemId": 200987654321,
    "schedule": {
      "accessSchedule": {
        "startDateTime": "2010-01-01T07:00:00Z",
        "endDateTime": "2010-04-01T07:00:00Z",
        "canAccessBeforeStartDateTime": true,
        "canAccessAfterEndDateTime": true
      }
    }
    },{
    "itemId": 100123456789,
    "schedule": {
      "accessSchedule": {
        "startDateTime": "2010-01-01T07:00:00Z",
        "endDateTime": "2010-04-01T07:00:00Z",
        "canAccessBeforeStartDateTime": true,
        "canAccessAfterEndDateTime": false
      }
    }
    },
  ... truncated ... 
]
}

Response

HTTP Status Code

204 No Content
2704 reads
Always Learning
Pearson