Planner Note API
API for creating, accessing and updating Planner Notes. PlannerNote are used to set reminders and notes to self about courses or general events.
A PlannerNote object looks like:
// A planner note
{
// The ID of the planner note
"id": 234,
// The title for a planner note
"title": "Bring books tomorrow",
// The description of the planner note
"description": "I need to bring books tomorrow for my course on biology",
// The id of the associated user creating the planner note
"user_id": 1578941,
// The current published state of the planner note
"workflow_state": "active",
// The course that the note is in relation too, if applicable
"course_id": 1578941,
// The datetime of when the planner note should show up on their planner
"todo_date": "2017-05-09T10:12:00Z"
}
List planner notes PlannerNotesController#index
GET /api/v1/planner_notes
Retrieve the paginated list of planner notes
Retrieve planner note for a user
Request Parameters:
| Parameter | Type | Description | |
|---|---|---|---|
| start_date | Date |
Only return notes with todo dates since the start_date (inclusive). No default. The value should be formatted as: yyyy-mm-dd. |
|
| end_date | Date |
Only return notes with todo dates before the end_date (inclusive). No default. The value should be formatted as: yyyy-mm-dd. If end_date and start_date are both specified and equivalent, then only notes with todo dates on that day are returned. |
|
| context_codes[] | string |
List of context codes of courses/users whose notes you want to see. If not specified, defaults to all contexts that the user belongs to. The format of this field is the context type, followed by an underscore, followed by the context id. For example: course_42, user_37 |
Example Response:
[
{
'id': 4,
'title': 'Bring bio book',
'description': 'bring bio book for friend tomorrow',
'user_id': 1238,
'course_id': 4567, // If the user assigns a note to a course
'todo_date': "2017-05-09T10:12:00Z",
'workflow_state': "active",
},
{
'id': 5,
'title': 'Bring english book',
'description': 'bring english book to class tomorrow',
'user_id': 1234,
'todo_date': "2017-05-09T10:12:00Z",
'workflow_state': "active",
},
]
Show a PlannerNote PlannerNotesController#show
GET /api/v1/planner_notes/:id
Retrieve a planner note for the current user
Returns a PlannerNoteUpdate a PlannerNote PlannerNotesController#update
PUT /api/v1/planner_notes/:id
Update a planner note for the current user
Returns a PlannerNoteCreate a planner note PlannerNotesController#create
POST /api/v1/planner_notes
Create a planner note for the current user
Example Request:
Delete a planner note PlannerNotesController#destroy
DELETE /api/v1/planner_notes/:id
Delete a planner note for the current user
Returns a PlannerNote