🚀 Heads up: Our API Docs Have Moved!
We have relocated to Instructure Developer Documentation Portal. 🎉 Please update your bookmarks. This page will automatically redirect after July 1, 2026.

Learning Object Dates API

API for accessing date-related attributes on assignments, quizzes, modules, discussions, pages, and files. Note that support for files is not yet available.

A LearningObjectDates object looks like:

{
  // the ID of the learning object (not present for checkpoints)
  "id": 4,
  // the due date for the learning object. returns null if not present or
  // applicable. never applicable for ungraded discussions, pages, and files
  "due_at": "2012-07-01T23:59:00-06:00",
  // the lock date (learning object is locked after this date). returns null if
  // not present
  "lock_at": "2012-07-01T23:59:00-06:00",
  // the reply_to_topic sub_assignment due_date. returns null if not present
  "reply_to_topic_due_at": "2012-07-01T23:59:00-06:00",
  // the reply_to_entry sub_assignment due_date. returns null if not present
  "required_replies_due_at": "2012-07-01T23:59:00-06:00",
  // the unlock date (learning object is unlocked after this date). returns null
  // if not present
  "unlock_at": "2012-07-01T23:59:00-06:00",
  // whether the learning object is only visible to overrides
  "only_visible_to_overrides": false,
  // whether the learning object is graded (and thus has a due date)
  "graded": true,
  // [exclusive to blueprint child content only] list of lock types
  "blueprint_date_locks": ["due_dates", "availability_dates"],
  // whether the learning object is visible to everyone
  "visible_to_everyone": true,
  // paginated list of AssignmentOverride objects
  "overrides": null,
  // list of Checkpoint objects, only present if a learning object has
  // subAssignments
  "checkpoints": null,
  // the tag identifying the type of checkpoint (only present for checkpoints)
  "tag": "reply_to_topic",
  // peer review sub assignment details, only present when
  // include_peer_review=true is specified, assignment has peer reviews enabled,
  // and peer_review_allocation_and_grading feature flag is enabled
  "peer_review_sub_assignment": null
}

Get a learning object's date information LearningObjectDatesController#show

GET /api/v1/courses/:course_id/modules/:context_module_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/modules/:context_module_id/date_details

GET /api/v1/courses/:course_id/assignments/:assignment_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/assignments/:assignment_id/date_details

GET /api/v1/courses/:course_id/quizzes/:quiz_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/date_details

GET /api/v1/courses/:course_id/discussion_topics/:discussion_topic_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:discussion_topic_id/date_details

GET /api/v1/courses/:course_id/pages/:url_or_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/pages/:url_or_id/date_details

GET /api/v1/courses/:course_id/files/:attachment_id/date_details

Scope: url:GET|/api/v1/courses/:course_id/files/:attachment_id/date_details

Get a learning object’s date-related information, including due date, availability dates, override status, and a paginated list of all assignment overrides for the item.

Request Parameters:

Parameter Type Description
include[] Array

Array of strings indicating what additional data to include in the response. Valid values:

  • “peer_review”: includes peer review sub assignment information and overrides in the response. Requires the peer_review_allocation_and_grading feature flag to be enabled.

  • “child_peer_review_override_dates”: each assignment override will include a peer_review_dates field containing the matched peer review override data (id, due_at, unlock_at, lock_at) for that override. The field will be present as null if no matching peer review override exists.

exclude[] Array

Array of strings indicating what data to exclude from the response. Valid values:

  • “peer_review_overrides”: when include[]=peer_review is also specified, the peer_review_sub_assignment object will not include the overrides array, reducing the response payload size. This is useful when using include[]=child_peer_review_override_dates since the peer review override data is already embedded in the parent assignment overrides.

  • “child_override_due_dates”: prevents the sub_assignment_due_dates field from being included in assignment override responses, even when discussion checkpoints are enabled. This reduces response payload size when checkpoint due date information is not needed.

Returns a LearningObjectDates object

Update a learning object's date information LearningObjectDatesController#update

PUT /api/v1/courses/:course_id/assignments/:assignment_id/date_details

Scope: url:PUT|/api/v1/courses/:course_id/assignments/:assignment_id/date_details

PUT /api/v1/courses/:course_id/quizzes/:quiz_id/date_details

Scope: url:PUT|/api/v1/courses/:course_id/quizzes/:quiz_id/date_details

PUT /api/v1/courses/:course_id/discussion_topics/:discussion_topic_id/date_details

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:discussion_topic_id/date_details

PUT /api/v1/courses/:course_id/pages/:url_or_id/date_details

Scope: url:PUT|/api/v1/courses/:course_id/pages/:url_or_id/date_details

PUT /api/v1/courses/:course_id/files/:attachment_id/date_details

Scope: url:PUT|/api/v1/courses/:course_id/files/:attachment_id/date_details

Updates date-related information for learning objects, including due date, availability dates, override status, and assignment overrides.

Returns 204 No Content response code if successful.

Request Parameters:

Parameter Type Description
due_at DateTime

The learning object’s due date. Not applicable for ungraded discussions, pages, and files.

unlock_at DateTime

The learning object’s unlock date. Must be before the due date if there is one.

lock_at DateTime

The learning object’s lock date. Must be after the due date if there is one.

only_visible_to_overrides boolean

Whether the learning object is only assigned to students who are targeted by an override.

assignment_overrides[] Array

List of overrides to apply to the learning object. Overrides that already exist should include an ID and will be updated if needed. New overrides will be created for overrides in the list without an ID. Overrides not included in the list will be deleted. Providing an empty list will delete all of the object’s overrides. Keys for each override object can include: ‘id’, ‘title’, ‘due_at’, ‘unlock_at’, ‘lock_at’, ‘student_ids’, and ‘course_section_id’, ‘course_id’, ‘noop_id’, and ‘unassign_item’.

Example Request:

curl https://<canvas>/api/v1/courses/:course_id/assignments/:assignment_id/date_details \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
        "due_at": "2012-07-01T23:59:00-06:00",
        "unlock_at": "2012-06-01T00:00:00-06:00",
        "lock_at": "2012-08-01T00:00:00-06:00",
        "only_visible_to_overrides": true,
        "assignment_overrides": [
          {
            "id": 212,
            "course_section_id": 3564
          },
          {
            "title": "an assignment override",
            "student_ids": [1, 2, 3]
          }
        ]
      }'