instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.52k stars 2.45k forks source link

API for pages todo_date #2076

Open wspr opened 2 years ago

wspr commented 2 years ago

Summary: The REST API documentation for wiki pages is missing documentation for attribute todo_date as well as methods to set it

Steps to reproduce:

  1. Create a page and assign it a todo date in the GUI.
  2. GET the page via the API; an excerpt of the result will look like:
    page_id = 1877176,
    published = true,
    title = "About ABC",
    todo_date = "2022-03-04T13:29:59Z",
    updated_at = "2022-07-17T01:58:18Z",
    1. Cross-check with API pages doc — no mention of todo_date
    2. Try to PUT the todo_date with same style of methods used to set an assignment due_date (say):
      HTTP PUT REQUEST: https://<canvas URL>/api/v1/courses/73748/pages/1877176
      JSON: {"wiki_page":{"published":true,"todo_date":"2022-07-25T18:00:00"}}

Expected behavior:

todo_date should be documented, and methods to change it should exist.

Actual behavior:

todo_date is undocumented and cannot be set using the API.

Additional notes:

Using the API to adjust deadlines/due dates for assignments/announcements/etc is very convenient; it would be great to be able to do the same with pages.

DoodleMochi commented 1 year ago

I agree. This has also been a huge issue for me.