All API Resources

Index of active global notification for the user AccountNotificationsController#user_index

GET /api/v1/accounts/:account_id/account_notifications

Scope: url:GET|/api/v1/accounts/:account_id/account_notifications

Returns a list of all global notifications in the account for the current user Any notifications that have been closed by the user will not be returned

Example Request:

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/2/users/self/account_notifications
Returns a list of AccountNotifications

Show a global notification AccountNotificationsController#show

GET /api/v1/accounts/:account_id/account_notifications/:id

Scope: url:GET|/api/v1/accounts/:account_id/account_notifications/:id

Returns a global notification for the current user A notification that has been closed by the user will not be returned

Example Request:

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/2/users/self/account_notifications/4
Returns a AccountNotification

Close notification for user AccountNotificationsController#user_close_notification

DELETE /api/v1/accounts/:account_id/account_notifications/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/account_notifications/:id

If the current user no long wants to see this notification it can be excused with this call

Example Request:

curl -X DELETE -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/2/users/self/account_notifications/4
Returns a AccountNotification

Create a global notification AccountNotificationsController#create

POST /api/v1/accounts/:account_id/account_notifications

Scope: url:POST|/api/v1/accounts/:account_id/account_notifications

Create and return a new global notification for an account.

Request Parameters:

Parameter Type Description
account_notification[subject] Required string

The subject of the notification.

account_notification[message] Required string

The message body of the notification.

account_notification[start_at] Required DateTime

The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z

account_notification[end_at] Required DateTime

The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z

account_notification[icon] string

The icon to display with the notification. Note: Defaults to warning.

Allowed values: warning, information, question, error, calendar

account_notification_roles[] string

The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:

account_notification_roles: ["StudentEnrollment", "TeacherEnrollment"]

Example Request:

curl -X POST -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/2/account_notifications \
-d 'account_notification[subject]=New notification' \
-d 'account_notification[start_at]=2014-01-01T00:00:00Z' \
-d 'account_notification[end_at]=2014-02-01T00:00:00Z' \
-d 'account_notification[message]=This is a global notification'

Example Response:

{
  "subject": "New notification",
  "start_at": "2014-01-01T00:00:00Z",
  "end_at": "2014-02-01T00:00:00Z",
  "message": "This is a global notification"
}

Update a global notification AccountNotificationsController#update

PUT /api/v1/accounts/:account_id/account_notifications/:id

Scope: url:PUT|/api/v1/accounts/:account_id/account_notifications/:id

Update global notification for an account.

Request Parameters:

Parameter Type Description
account_notification[subject] string

The subject of the notification.

account_notification[message] string

The message body of the notification.

account_notification[start_at] DateTime

The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z

account_notification[end_at] DateTime

The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z

account_notification[icon] string

The icon to display with the notification.

Allowed values: warning, information, question, error, calendar

account_notification_roles[] string

The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:

account_notification_roles: ["StudentEnrollment", "TeacherEnrollment"]

Example Request:

curl -X PUT -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/2/account_notifications/1 \
-d 'account_notification[subject]=New notification' \
-d 'account_notification[start_at]=2014-01-01T00:00:00Z' \
-d 'account_notification[end_at]=2014-02-01T00:00:00Z' \
-d 'account_notification[message]=This is a global notification'

Example Response:

{
  "subject": "New notification",
  "start_at": "2014-01-01T00:00:00Z",
  "end_at": "2014-02-01T00:00:00Z",
  "message": "This is a global notification"
}

List Available Reports AccountReportsController#available_reports

GET /api/v1/accounts/:account_id/reports

Scope: url:GET|/api/v1/accounts/:account_id/reports

Returns a paginated list of reports for the current context.

API response field:

  • name

    The name of the report.

  • parameters

    The parameters will vary for each report

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/accounts/<account_id>/reports/

Example Response:

[
  {
    "report":"student_assignment_outcome_map_csv",
    "title":"Student Competency",
    "parameters":null
  },
  {
    "report":"grade_export_csv",
    "title":"Grade Export",
    "parameters":{
      "term":{
        "description":"The canvas id of the term to get grades from",
        "required":true
      }
    }
  }
]

Start a Report AccountReportsController#create

POST /api/v1/accounts/:account_id/reports/:report

Scope: url:POST|/api/v1/accounts/:account_id/reports/:report

Generates a report instance for the account. Note that “report” in the request must match one of the available report names. To fetch a list of available report names and parameters for each report (including whether or not those parameters are required), see List Available Reports.

Request Parameters:

Parameter Type Description
parameters string

The parameters will vary for each report. To fetch a list of available parameters for each report, see List Available Reports. A few example parameters have been provided below. Note that the example parameters provided below may not be valid for every report.

parameters[course_id] integer

The id of the course to report on. Note: this parameter has been listed to serve as an example and may not be valid for every report.

parameters[users] boolean

If true, user data will be included. If false, user data will be omitted. Note: this parameter has been listed to serve as an example and may not be valid for every report.

Example Request:

curl -X POST \
     https://<canvas>/api/v1/accounts/1/reports/provisioning_csv \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: multipart/form-data' \
     -F 'parameters[users]=true' \
     -F 'parameters[courses]=true' \
     -F 'parameters[enrollments]=true'
Returns a Report

Index of Reports AccountReportsController#index

GET /api/v1/accounts/:account_id/reports/:report

Scope: url:GET|/api/v1/accounts/:account_id/reports/:report

Shows all reports that have been run for the account of a specific type.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>
Returns a list of Reports

Status of a Report AccountReportsController#show

GET /api/v1/accounts/:account_id/reports/:report/:id

Scope: url:GET|/api/v1/accounts/:account_id/reports/:report/:id

Returns the status of a report.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>/<report_id>
Returns a Report

Delete a Report AccountReportsController#destroy

DELETE /api/v1/accounts/:account_id/reports/:report/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/reports/:report/:id

Deletes a generated report instance.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     -X DELETE \
     https://<canvas>/api/v1/accounts/<account_id>/reports/<report_type>/<id>
Returns a Report

List accounts AccountsController#index

GET /api/v1/accounts

Scope: url:GET|/api/v1/accounts

A paginated list of accounts that the current user can view or manage. Typically, students and even teachers will get an empty list in response, only account admins can view the accounts that they are in.

Request Parameters:

Parameter Type Description
include[] string

Array of additional information to include.

“lti_guid”

the 'tool_consumer_instance_guid' that will be sent for this account on LTI launches

“registration_settings”

returns info about the privacy policy and terms of use

“services”

returns services and whether they are enabled (requires account management permissions)

Allowed values: lti_guid, registration_settings, services

Returns a list of Accounts

List accounts for course admins AccountsController#course_accounts

GET /api/v1/course_accounts

Scope: url:GET|/api/v1/course_accounts

A paginated list of accounts that the current user can view through their admin course enrollments. (Teacher, TA, or designer enrollments). Only returns “id”, “name”, “workflow_state”, “root_account_id” and “parent_account_id”

Returns a list of Accounts

Get a single account AccountsController#show

GET /api/v1/accounts/:id

Scope: url:GET|/api/v1/accounts/:id

Retrieve information on an individual account, given by id or sis sis_account_id.

Returns a Account

Permissions AccountsController#permissions

GET /api/v1/accounts/:account_id/permissions

Scope: url:GET|/api/v1/accounts/:account_id/permissions

Returns permission information for the calling user and the given account. You may use `self` as the account id to check permissions against the domain root account. The caller must have an account role or admin (teacher/TA/designer) enrollment in a course in the account. See also the Course counterpart.

Request Parameters:

Parameter Type Description
permissions[] string

List of permissions to check against the authenticated user. Permission names are documented in the Create a role endpoint.

Example Request:

curl https://<canvas>/api/v1/accounts/self/permissions \
  -H 'Authorization: Bearer <token>' \
  -d 'permissions[]=manage_account_memberships' \
  -d 'permissions[]=become_user'

Example Response:

{'manage_account_memberships': 'false', 'become_user': 'true'}

Get the sub-accounts of an account AccountsController#sub_accounts

GET /api/v1/accounts/:account_id/sub_accounts

Scope: url:GET|/api/v1/accounts/:account_id/sub_accounts

List accounts that are sub-accounts of the given account.

Request Parameters:

Parameter Type Description
recursive boolean

If true, the entire account tree underneath this account will be returned (though still paginated). If false, only direct sub-accounts of this account will be returned. Defaults to false.

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/sub_accounts \
     -H 'Authorization: Bearer <token>'
Returns a list of Accounts

Returns the terms of service for that account AccountsController#terms_of_service

GET /api/v1/accounts/:account_id/terms_of_service

Scope: url:GET|/api/v1/accounts/:account_id/terms_of_service

List active courses in an account AccountsController#courses_api

GET /api/v1/accounts/:account_id/courses

Scope: url:GET|/api/v1/accounts/:account_id/courses

Retrieve a paginated list of courses in this account.

Request Parameters:

Parameter Type Description
with_enrollments boolean

If true, include only courses with at least one enrollment. If false, include only courses with no enrollments. If not present, do not filter on course enrollment status.

enrollment_type[] string

If set, only return courses that have at least one user enrolled in in the course with one of the specified enrollment types.

Allowed values: teacher, student, ta, observer, designer

published boolean

If true, include only published courses. If false, exclude published courses. If not present, do not filter on published status.

completed boolean

If true, include only completed courses (these may be in state 'completed', or their enrollment term may have ended). If false, exclude completed courses. If not present, do not filter on completed status.

blueprint boolean

If true, include only blueprint courses. If false, exclude them. If not present, do not filter on this basis.

blueprint_associated boolean

If true, include only courses that inherit content from a blueprint course. If false, exclude them. If not present, do not filter on this basis.

by_teachers[] integer

List of User IDs of teachers; if supplied, include only courses taught by one of the referenced users.

by_subaccounts[] integer

List of Account IDs; if supplied, include only courses associated with one of the referenced subaccounts.

hide_enrollmentless_courses boolean

If present, only return courses that have at least one enrollment. Equivalent to 'with_enrollments=true'; retained for compatibility.

state[] string

If set, only return courses that are in the given state(s). By default, all states but “deleted” are returned.

Allowed values: created, claimed, available, completed, deleted, all

enrollment_term_id integer

If set, only includes courses from the specified term.

search_term string

The partial course name, code, or full ID to match and return in the results list. Must be at least 3 characters.

include[] string
  • All explanations can be seen in the Course API index documentation

  • “sections”, “needs_grading_count” and “total_scores” are not valid options at the account level

Allowed values: syllabus_body, term, course_progress, storage_quota_used_mb, total_students, teachers, account_name

sort string

The column to sort results by.

Allowed values: course_name, sis_course_id, teacher, account_name

order string

The order to sort the given column by.

Allowed values: asc, desc

search_by string

The filter to search by. “course” searches for course names, course codes, and SIS IDs. “teacher” searches for teacher names

Allowed values: course, teacher

Returns a list of Courses

Update an account AccountsController#update

PUT /api/v1/accounts/:id

Scope: url:PUT|/api/v1/accounts/:id

Update an existing account.

Request Parameters:

Parameter Type Description
account[name] string

Updates the account name

account[sis_account_id] string

Updates the account sis_account_id Must have manage_sis permission and must not be a root_account.

account[default_time_zone] string

The default time zone of the account. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

account[default_storage_quota_mb] integer

The default course storage quota to be used, if not otherwise specified.

account[default_user_storage_quota_mb] integer

The default user storage quota to be used, if not otherwise specified.

account[default_group_storage_quota_mb] integer

The default group storage quota to be used, if not otherwise specified.

account[settings][restrict_student_past_view][value] boolean

Restrict students from viewing courses after end date

account[settings][restrict_student_past_view][locked] boolean

Lock this setting for sub-accounts and courses

account[settings][restrict_student_future_view][value] boolean

Restrict students from viewing courses before start date

account[settings][restrict_student_future_view][locked] boolean

Lock this setting for sub-accounts and courses

account[settings][lock_all_announcements][value] boolean

Disable comments on announcements

account[settings][lock_all_announcements][locked] boolean

Lock this setting for sub-accounts and courses

account[settings][restrict_student_future_listing][value] boolean

Restrict students from viewing future enrollments in course list

account[settings][restrict_student_future_listing][locked] boolean

Lock this setting for sub-accounts and courses

account[services] Hash

Give this a set of keys and boolean values to enable or disable services matching the keys

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id> \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'account[name]=New account name' \
  -d 'account[default_time_zone]=Mountain Time (US & Canada)' \
  -d 'account[default_storage_quota_mb]=450'
Returns a Account

Delete a user from the root account AccountsController#remove_user

DELETE /api/v1/accounts/:account_id/users/:user_id

Scope: url:DELETE|/api/v1/accounts/:account_id/users/:user_id

Delete a user record from a Canvas root account. If a user is associated with multiple root accounts (in a multi-tenant instance of Canvas), this action will NOT remove them from the other accounts.

WARNING: This API will allow a user to remove themselves from the account. If they do this, they won't be able to make API calls or log into Canvas at that account.

Example Request:

curl https://<canvas>/api/v1/accounts/3/users/5 \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -X DELETE
Returns a User

Create a new sub-account SubAccountsController#create

POST /api/v1/accounts/:account_id/sub_accounts

Scope: url:POST|/api/v1/accounts/:account_id/sub_accounts

Add a new sub-account to a given account.

Request Parameters:

Parameter Type Description
account[name] Required string

The name of the new sub-account.

account[sis_account_id] string

The account's identifier in the Student Information System.

account[default_storage_quota_mb] integer

The default course storage quota to be used, if not otherwise specified.

account[default_user_storage_quota_mb] integer

The default user storage quota to be used, if not otherwise specified.

account[default_group_storage_quota_mb] integer

The default group storage quota to be used, if not otherwise specified.

Returns a Account

Delete a sub-account SubAccountsController#destroy

DELETE /api/v1/accounts/:account_id/sub_accounts/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/sub_accounts/:id

Cannot delete an account with active courses or active sub_accounts. Cannot delete a root_account

Returns a Account

Make an account admin AdminsController#create

POST /api/v1/accounts/:account_id/admins

Scope: url:POST|/api/v1/accounts/:account_id/admins

Flag an existing user as an admin within the account.

Request Parameters:

Parameter Type Description
user_id Required integer

The id of the user to promote.

role string
DEPRECATED

The user's admin relationship with the account will be

created with the given role. Defaults to 'AccountAdmin'.

role_id integer

The user's admin relationship with the account will be created with the given role. Defaults to the built-in role for 'AccountAdmin'.

send_confirmation boolean

Send a notification email to the new admin if true. Default is true.

Returns a Admin

Remove account admin AdminsController#destroy

DELETE /api/v1/accounts/:account_id/admins/:user_id

Scope: url:DELETE|/api/v1/accounts/:account_id/admins/:user_id

Remove the rights associated with an account admin role from a user.

Request Parameters:

Parameter Type Description
role string
DEPRECATED

Account role to remove from the user. Defaults to

'AccountAdmin'. Any other account role must be specified explicitly.

role_id integer

The user's admin relationship with the account will be created with the given role. Defaults to the built-in role for 'AccountAdmin'.

Returns a Admin

List account admins AdminsController#index

GET /api/v1/accounts/:account_id/admins

Scope: url:GET|/api/v1/accounts/:account_id/admins

A paginated list of the admins in the account

Request Parameters:

Parameter Type Description
user_id[] [Integer]

Scope the results to those with user IDs equal to any of the IDs specified here.

Returns a list of Admins

List external feeds ExternalFeedsController#index

GET /api/v1/courses/:course_id/external_feeds

Scope: url:GET|/api/v1/courses/:course_id/external_feeds

GET /api/v1/groups/:group_id/external_feeds

Scope: url:GET|/api/v1/groups/:group_id/external_feeds

Returns the paginated list of External Feeds this course or group.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/external_feeds \
     -H 'Authorization: Bearer <token>'
Returns a list of ExternalFeeds

Create an external feed ExternalFeedsController#create

POST /api/v1/courses/:course_id/external_feeds

Scope: url:POST|/api/v1/courses/:course_id/external_feeds

POST /api/v1/groups/:group_id/external_feeds

Scope: url:POST|/api/v1/groups/:group_id/external_feeds

Create a new external feed for the course or group.

Request Parameters:

Parameter Type Description
url Required string

The url to the external rss or atom feed

header_match boolean

If given, only feed entries that contain this string in their title will be imported

verbosity string

Defaults to “full”

Allowed values: full, truncate, link_only

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/external_feeds \
    -F url='http://example.com/rss.xml' \
    -F header_match='news flash!' \
    -F verbosity='full' \
    -H 'Authorization: Bearer <token>'
Returns a ExternalFeed

Delete an external feed ExternalFeedsController#destroy

DELETE /api/v1/courses/:course_id/external_feeds/:external_feed_id

Scope: url:DELETE|/api/v1/courses/:course_id/external_feeds/:external_feed_id

DELETE /api/v1/groups/:group_id/external_feeds/:external_feed_id

Scope: url:DELETE|/api/v1/groups/:group_id/external_feeds/:external_feed_id

Deletes the external feed.

Example Request:

curl -X DELETE https://<canvas>/api/v1/courses/<course_id>/external_feeds/<feed_id> \
     -H 'Authorization: Bearer <token>'
Returns a ExternalFeed

List announcements AnnouncementsApiController#index

GET /api/v1/announcements

Scope: url:GET|/api/v1/announcements

Returns the paginated list of announcements for the given courses and date range. Note that a context_code field is added to the responses so you can tell which course each announcement belongs to.

Request Parameters:

Parameter Type Description
context_codes[] Required string

List of context_codes to retrieve announcements for (for example, course_123). Only courses are presently supported. The call will fail unless the caller has View Announcements permission in all listed courses.

start_date Date

Only return announcements posted since the start_date (inclusive). Defaults to 14 days ago. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date Date

Only return announcements posted before the end_date (inclusive). Defaults to 28 days from start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. Announcements scheduled for future posting will only be returned to course administrators.

active_only boolean

Only return active announcements that have been published. Applies only to requesting users that have permission to view unpublished items. Defaults to false for users with access to view unpublished items, otherwise true and unmodifiable.

include array

Optional list of resources to include with the response. May include a string of the name of the resource. Possible values are: “sections”, “sections_user_count” if “sections” is passed, includes the course sections that are associated with the topic, if the topic is specific to sertain sections of the course. If “sections_user_count” is passed, then:

(a) If sections were asked for *and* the topic is specific to certain
    course sections sections, includes the number of users in each
    section. (as part of the section json asked for above)
(b) Else, includes at the root level the total number of users in the
    topic's context (group or course) that the topic applies to.

Example Request:

curl https://<canvas>/api/v1/announcements?context_codes[]=course_1&context_codes[]=course_2 \
     -H 'Authorization: Bearer <token>'

Example Response:

[{
  "id": 1,
  "title": "Hear ye",
  "message": "Henceforth, all assignments must be...",
  "posted_at": "2017-01-31T22:00:00Z",
  "delayed_post_at": null,
  "context_code": "course_2",
  ...
}]
Returns a list of DiscussionTopics

List appointment groups AppointmentGroupsController#index

GET /api/v1/appointment_groups

Scope: url:GET|/api/v1/appointment_groups

Retrieve the paginated list of appointment groups that can be reserved or managed by the current user.

Request Parameters:

Parameter Type Description
scope string

Defaults to “reservable”

Allowed values: reservable, manageable

context_codes[] string

Array of context codes used to limit returned results.

include_past_appointments boolean

Defaults to false. If true, includes past appointment groups

include[] string

Array of additional information to include.

“appointments”

calendar event time slots for this appointment group

“child_events”

reservations of those time slots

“participant_count”

number of reservations

“reserved_times”

the event id, start time and end time of reservations the current user has made)

“all_context_codes”

all context codes associated with this appointment group

Allowed values: appointments, child_events, participant_count, reserved_times, all_context_codes

Create an appointment group AppointmentGroupsController#create

POST /api/v1/appointment_groups

Scope: url:POST|/api/v1/appointment_groups

Create and return a new appointment group. If new_appointments are specified, the response will return a new_appointments array (same format as appointments array, see “List appointment groups” action)

Request Parameters:

Parameter Type Description
appointment_group[context_codes][] Required string

Array of context codes (courses, e.g. course_1) this group should be linked to (1 or more). Users in the course(s) with appropriate permissions will be able to sign up for this appointment group.

appointment_group[sub_context_codes][] string

Array of sub context codes (course sections or a single group category) this group should be linked to. Used to limit the appointment group to particular sections. If a group category is specified, students will sign up in groups and the participant_type will be “Group” instead of “User”.

appointment_group[title] Required string

Short title for the appointment group.

appointment_group[description] string

Longer text description of the appointment group.

appointment_group[location_name] string

Location name of the appointment group.

appointment_group[location_address] string

Location address.

appointment_group[publish] boolean

Indicates whether this appointment group should be published (i.e. made available for signup). Once published, an appointment group cannot be unpublished. Defaults to false.

appointment_group[participants_per_appointment] integer

Maximum number of participants that may register for each time slot. Defaults to null (no limit).

appointment_group[min_appointments_per_participant] integer

Minimum number of time slots a user must register for. If not set, users do not need to sign up for any time slots.

appointment_group[max_appointments_per_participant] integer

Maximum number of time slots a user may register for.

appointment_group[new_appointments][X][] string

Nested array of start time/end time pairs indicating time slots for this appointment group. Refer to the example request.

appointment_group[participant_visibility] string
“private”

participants cannot see who has signed up for a particular time slot

“protected”

participants can see who has signed up. Defaults to “private”.

Allowed values: private, protected

Example Request:

curl 'https://<canvas>/api/v1/appointment_groups.json' \
     -X POST \
     -F 'appointment_group[context_codes][]=course_123' \
     -F 'appointment_group[sub_context_codes][]=course_section_234' \
     -F 'appointment_group[title]=Final Presentation' \
     -F 'appointment_group[participants_per_appointment]=1' \
     -F 'appointment_group[min_appointments_per_participant]=1' \
     -F 'appointment_group[max_appointments_per_participant]=1' \
     -F 'appointment_group[new_appointments][0][]=2012-07-19T21:00:00Z' \
     -F 'appointment_group[new_appointments][0][]=2012-07-19T22:00:00Z' \
     -F 'appointment_group[new_appointments][1][]=2012-07-19T22:00:00Z' \
     -F 'appointment_group[new_appointments][1][]=2012-07-19T23:00:00Z' \
     -H "Authorization: Bearer <token>"

Get a single appointment group AppointmentGroupsController#show

GET /api/v1/appointment_groups/:id

Scope: url:GET|/api/v1/appointment_groups/:id

Returns information for a single appointment group

Request Parameters:

Parameter Type Description
include[] string

Array of additional information to include. See include[] argument of “List appointment groups” action.

“child_events”

reservations of time slots time slots

“appointments”

will always be returned

“all_context_codes”

all context codes associated with this appointment group

Allowed values: child_events, appointments, all_context_codes

Update an appointment group AppointmentGroupsController#update

PUT /api/v1/appointment_groups/:id

Scope: url:PUT|/api/v1/appointment_groups/:id

Update and return an appointment group. If new_appointments are specified, the response will return a new_appointments array (same format as appointments array, see “List appointment groups” action).

Request Parameters:

Parameter Type Description
appointment_group[context_codes][] Required string

Array of context codes (courses, e.g. course_1) this group should be linked to (1 or more). Users in the course(s) with appropriate permissions will be able to sign up for this appointment group.

appointment_group[sub_context_codes][] string

Array of sub context codes (course sections or a single group category) this group should be linked to. Used to limit the appointment group to particular sections. If a group category is specified, students will sign up in groups and the participant_type will be “Group” instead of “User”.

appointment_group[title] string

Short title for the appointment group.

appointment_group[description] string

Longer text description of the appointment group.

appointment_group[location_name] string

Location name of the appointment group.

appointment_group[location_address] string

Location address.

appointment_group[publish] boolean

Indicates whether this appointment group should be published (i.e. made available for signup). Once published, an appointment group cannot be unpublished. Defaults to false.

appointment_group[participants_per_appointment] integer

Maximum number of participants that may register for each time slot. Defaults to null (no limit).

appointment_group[min_appointments_per_participant] integer

Minimum number of time slots a user must register for. If not set, users do not need to sign up for any time slots.

appointment_group[max_appointments_per_participant] integer

Maximum number of time slots a user may register for.

appointment_group[new_appointments][X][] string

Nested array of start time/end time pairs indicating time slots for this appointment group. Refer to the example request.

appointment_group[participant_visibility] string
“private”

participants cannot see who has signed up for a particular time slot

“protected”

participants can see who has signed up. Defaults to “private”.

Allowed values: private, protected

Example Request:

curl 'https://<canvas>/api/v1/appointment_groups/543.json' \
     -X PUT \
     -F 'appointment_group[publish]=1' \
     -H "Authorization: Bearer <token>"

Delete an appointment group AppointmentGroupsController#destroy

DELETE /api/v1/appointment_groups/:id

Scope: url:DELETE|/api/v1/appointment_groups/:id

Delete an appointment group (and associated time slots and reservations) and return the deleted group

Request Parameters:

Parameter Type Description
cancel_reason string

Reason for deleting/canceling the appointment group.

Example Request:

curl 'https://<canvas>/api/v1/appointment_groups/543.json' \
     -X DELETE \
     -F 'cancel_reason=El Tigre Chino got fired' \
     -H "Authorization: Bearer <token>"

List user participants AppointmentGroupsController#users

GET /api/v1/appointment_groups/:id/users

Scope: url:GET|/api/v1/appointment_groups/:id/users

A paginated list of users that are (or may be) participating in this appointment group. Refer to the Users API for the response fields. Returns no results for appointment groups with the “Group” participant_type.

Request Parameters:

Parameter Type Description
registration_status string

Limits results to the a given participation status, defaults to “all”

Allowed values: all, registered, registered

List student group participants AppointmentGroupsController#groups

GET /api/v1/appointment_groups/:id/groups

Scope: url:GET|/api/v1/appointment_groups/:id/groups

A paginated list of student groups that are (or may be) participating in this appointment group. Refer to the Groups API for the response fields. Returns no results for appointment groups with the “User” participant_type.

Request Parameters:

Parameter Type Description
registration_status string

Limits results to the a given participation status, defaults to “all”

Allowed values: all, registered, registered

Get next appointment AppointmentGroupsController#next_appointment

GET /api/v1/appointment_groups/next_appointment

Scope: url:GET|/api/v1/appointment_groups/next_appointment

Return the next appointment available to sign up for. The appointment is returned in a one-element array. If no future appointments are available, an empty array is returned.

Request Parameters:

Parameter Type Description
appointment_group_ids[] string

List of ids of appointment groups to search.

Returns a list of CalendarEvents

List assignment groups AssignmentGroupsController#index

GET /api/v1/courses/:course_id/assignment_groups

Scope: url:GET|/api/v1/courses/:course_id/assignment_groups

Returns the paginated list of assignment groups for the current context. The returned groups are sorted by their position field.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the group. “discussion_topic”, “all_dates” “assignment_visibility” & “submission” are only valid if “assignments” is also included. The “assignment_visibility” option additionally requires that the Differentiated Assignments course feature be turned on.

Allowed values: assignments, discussion_topic, all_dates, assignment_visibility, overrides, submission

exclude_assignment_submission_types[] string

If “assignments” are included, those with the specified submission types will be excluded from the assignment groups.

Allowed values: online_quiz, discussion_topic, wiki_page, external_tool

override_assignment_dates boolean

Apply assignment overrides for each assignment, defaults to true.

grading_period_id integer

The id of the grading period in which assignment groups are being requested (Requires grading periods to exist.)

scope_assignments_to_student boolean

If true, all assignments returned will apply to the current user in the specified grading period. If assignments apply to other students in the specified grading period, but not the current user, they will not be returned. (Requires the grading_period_id argument and grading periods to exist. In addition, the current user must be a student.)

Returns a list of AssignmentGroups

Get an Assignment Group AssignmentGroupsApiController#show

GET /api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Scope: url:GET|/api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Returns the assignment group with the given id.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the group. “discussion_topic” and “assignment_visibility” and “submission” are only valid if “assignments” is also included. The “assignment_visibility” option additionally requires that the Differentiated Assignments course feature be turned on.

Allowed values: assignments, discussion_topic, assignment_visibility, submission

override_assignment_dates boolean

Apply assignment overrides for each assignment, defaults to true.

grading_period_id integer

The id of the grading period in which assignment groups are being requested (Requires grading periods to exist on the account)

Returns a AssignmentGroup

Create an Assignment Group AssignmentGroupsApiController#create

POST /api/v1/courses/:course_id/assignment_groups

Scope: url:POST|/api/v1/courses/:course_id/assignment_groups

Create a new assignment group for this course.

Request Parameters:

Parameter Type Description
name string

The assignment group's name

position integer

The position of this assignment group in relation to the other assignment groups

group_weight number

The percent of the total grade that this assignment group represents

sis_source_id string

The sis source id of the Assignment Group

integration_data Object

The integration data of the Assignment Group

rules string

The grading rules that are applied within this assignment group See the Assignment Group object definition for format

Returns a AssignmentGroup

Edit an Assignment Group AssignmentGroupsApiController#update

PUT /api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Scope: url:PUT|/api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Modify an existing Assignment Group. Accepts the same parameters as Assignment Group creation

Returns a AssignmentGroup

Destroy an Assignment Group AssignmentGroupsApiController#destroy

DELETE /api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Scope: url:DELETE|/api/v1/courses/:course_id/assignment_groups/:assignment_group_id

Deletes the assignment group with the given id.

Request Parameters:

Parameter Type Description
move_assignments_to integer

The ID of an active Assignment Group to which the assignments that are currently assigned to the destroyed Assignment Group will be assigned. NOTE: If this argument is not provided, any assignments in this Assignment Group will be deleted.

Returns a AssignmentGroup

Delete an assignment AssignmentsController#destroy

DELETE /api/v1/courses/:course_id/assignments/:id

Scope: url:DELETE|/api/v1/courses/:course_id/assignments/:id

Delete the given assignment.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/assignments/<assignment_id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'
Returns a Assignment

List assignments AssignmentsApiController#index

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

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

Returns the paginated list of assignments for the current context.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the assignment. The “assignment_visibility” option requires that the Differentiated Assignments course feature be turned on. If “observed_users” is passed, submissions for observed users will also be included as an array.

Allowed values: submission, assignment_visibility, all_dates, overrides, observed_users

search_term string

The partial title of the assignments to match and return.

override_assignment_dates boolean

Apply assignment overrides for each assignment, defaults to true.

needs_grading_count_by_section boolean

Split up “needs_grading_count” by sections into the “needs_grading_count_by_section” key, defaults to false

bucket string

If included, only return certain assignments depending on due date and submission status.

Allowed values: past, overdue, undated, ungraded, unsubmitted, upcoming, future

assignment_ids[] string

if set, return only assignments specified

order_by string

Determines the order of the assignments. Defaults to “position”.

Allowed values: position, name

Returns a list of Assignments

List assignments for user AssignmentsApiController#user_index

GET /api/v1/users/:user_id/courses/:course_id/assignments

Scope: url:GET|/api/v1/users/:user_id/courses/:course_id/assignments

Returns the paginated list of assignments for the specified user if the current user has rights to view. See List assignments for valid arguments.

Get a single assignment AssignmentsApiController#show

GET /api/v1/courses/:course_id/assignments/:id

Scope: url:GET|/api/v1/courses/:course_id/assignments/:id

Returns the assignment with the given id.

"observed_users" is passed, submissions for observed users will also be included.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the assignment. The “assignment_visibility” option requires that the Differentiated Assignments course feature be turned on. If

Allowed values: submission, assignment_visibility, overrides, observed_users

override_assignment_dates boolean

Apply assignment overrides to the assignment, defaults to true.

needs_grading_count_by_section boolean

Split up “needs_grading_count” by sections into the “needs_grading_count_by_section” key, defaults to false

all_dates boolean

All dates associated with the assignment, if applicable

Returns a Assignment

Create an assignment AssignmentsApiController#create

POST /api/v1/courses/:course_id/assignments

Scope: url:POST|/api/v1/courses/:course_id/assignments

Create a new assignment for this course. The assignment is created in the active state.

Request Parameters:

Parameter Type Description
assignment[name] Required string

The assignment name.

assignment[position] integer

The position of this assignment in the group when displaying assignment lists.

assignment[submission_types][] string

List of supported submission types for the assignment. Unless the assignment is allowing online submissions, the array should only have one element.

If not allowing online submissions, your options are:

"online_quiz"
"none"
"on_paper"
"discussion_topic"
"external_tool"

If you are allowing online submissions, you can have one or many allowed submission types:

"online_upload"
"online_text_entry"
"online_url"
"media_recording" (Only valid when the Kaltura plugin is enabled)

Allowed values: online_quiz, none, on_paper, discussion_topic, external_tool, online_upload, online_text_entry, online_url, media_recording

assignment[allowed_extensions][] string

Allowed extensions if submission_types includes “online_upload”

Example:

allowed_extensions: ["docx","ppt"]
assignment[turnitin_enabled] boolean

Only applies when the Turnitin plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles Turnitin submissions for the assignment. Will be ignored if Turnitin is not available for the course.

assignment[vericite_enabled] boolean

Only applies when the VeriCite plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles VeriCite submissions for the assignment. Will be ignored if VeriCite is not available for the course.

assignment[turnitin_settings] string

Settings to send along to turnitin. See Assignment object definition for format.

assignment[integration_data] string

Data used for SIS integrations. Requires admin-level token with the “Manage SIS” permission. JSON string required.

assignment[integration_id] string

Unique ID from third party integrations

assignment[peer_reviews] boolean

If submission_types does not include external_tool,discussion_topic, online_quiz, or on_paper, determines whether or not peer reviews will be turned on for the assignment.

assignment[automatic_peer_reviews] boolean

Whether peer reviews will be assigned automatically by Canvas or if teachers must manually assign peer reviews. Does not apply if peer reviews are not enabled.

assignment[notify_of_update] boolean

If true, Canvas will send a notification to students in the class notifying them that the content has changed.

assignment[group_category_id] integer

If present, the assignment will become a group assignment assigned to the group.

assignment[grade_group_students_individually] integer

If this is a group assignment, teachers have the options to grade students individually. If false, Canvas will apply the assignment's score to each member of the group. If true, the teacher can manually assign scores to each member of the group.

assignment[external_tool_tag_attributes] string

Hash of external tool parameters if submission_types is [“external_tool”]. See Assignment object definition for format.

assignment[points_possible] number

The maximum points possible on the assignment.

assignment[grading_type] string

The strategy used for grading the assignment. The assignment defaults to “points” if this field is omitted.

Allowed values: pass_fail, percent, letter_grade, gpa_scale, points

assignment[due_at] DateTime

The day/time the assignment is due. Must be between the lock dates if there are lock dates. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[lock_at] DateTime

The day/time the assignment is locked after. Must be after the due date if there is a due date. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[unlock_at] DateTime

The day/time the assignment is unlocked. Must be before the due date if there is a due date. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[description] string

The assignment's description, supports HTML.

assignment[assignment_group_id] integer

The assignment group id to put the assignment in. Defaults to the top assignment group in the course.

assignment[muted] boolean

Whether this assignment is muted. A muted assignment does not send change notifications and hides grades from students. Defaults to false.

assignment[assignment_overrides][] AssignmentOverride

List of overrides for the assignment.

assignment[only_visible_to_overrides] boolean

Whether this assignment is only visible to overrides (Only useful if 'differentiated assignments' account setting is on)

assignment[published] boolean

Whether this assignment is published. (Only useful if 'draft state' account setting is on) Unpublished assignments are not visible to students.

assignment[grading_standard_id] integer

The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. This will update the grading_type for the course to 'letter_grade' unless it is already 'gpa_scale'.

assignment[omit_from_final_grade] boolean

Whether this assignment is counted towards a student's final grade.

assignment[quiz_lti] boolean

Whether this assignment should use the Quizzes 2 LTI tool. Sets the submission type to 'external_tool' and configures the external tool attributes to use the Quizzes 2 LTI tool configured for this course. Has no effect if no Quizzes 2 LTI tool is configured.

assignment[moderated_grading] boolean

Whether this assignment is moderated.

Returns a Assignment

Edit an assignment AssignmentsApiController#update

PUT /api/v1/courses/:course_id/assignments/:id

Scope: url:PUT|/api/v1/courses/:course_id/assignments/:id

Modify an existing assignment.

If the assignment [assignment_overrides] key is absent, any existing overrides are kept as is. If the assignment [assignment_overrides] key is present, existing overrides are updated or deleted (and new ones created, as necessary) to match the provided list.

Request Parameters:

Parameter Type Description
assignment[name] string

The assignment name.

assignment[position] integer

The position of this assignment in the group when displaying assignment lists.

assignment[submission_types][] string

List of supported submission types for the assignment. Unless the assignment is allowing online submissions, the array should only have one element.

If not allowing online submissions, your options are:

"online_quiz"
"none"
"on_paper"
"discussion_topic"
"external_tool"

If you are allowing online submissions, you can have one or many allowed submission types:

"online_upload"
"online_text_entry"
"online_url"
"media_recording" (Only valid when the Kaltura plugin is enabled)

Allowed values: online_quiz, none, on_paper, discussion_topic, external_tool, online_upload, online_text_entry, online_url, media_recording

assignment[allowed_extensions][] string

Allowed extensions if submission_types includes “online_upload”

Example:

allowed_extensions: ["docx","ppt"]
assignment[turnitin_enabled] boolean

Only applies when the Turnitin plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles Turnitin submissions for the assignment. Will be ignored if Turnitin is not available for the course.

assignment[vericite_enabled] boolean

Only applies when the VeriCite plugin is enabled for a course and the submission_types array includes “online_upload”. Toggles VeriCite submissions for the assignment. Will be ignored if VeriCite is not available for the course.

assignment[turnitin_settings] string

Settings to send along to turnitin. See Assignment object definition for format.

assignment[integration_data] string

Data used for SIS integrations. Requires admin-level token with the “Manage SIS” permission. JSON string required.

assignment[integration_id] string

Unique ID from third party integrations

assignment[peer_reviews] boolean

If submission_types does not include external_tool,discussion_topic, online_quiz, or on_paper, determines whether or not peer reviews will be turned on for the assignment.

assignment[automatic_peer_reviews] boolean

Whether peer reviews will be assigned automatically by Canvas or if teachers must manually assign peer reviews. Does not apply if peer reviews are not enabled.

assignment[notify_of_update] boolean

If true, Canvas will send a notification to students in the class notifying them that the content has changed.

assignment[group_category_id] integer

If present, the assignment will become a group assignment assigned to the group.

assignment[grade_group_students_individually] integer

If this is a group assignment, teachers have the options to grade students individually. If false, Canvas will apply the assignment's score to each member of the group. If true, the teacher can manually assign scores to each member of the group.

assignment[external_tool_tag_attributes] string

Hash of external tool parameters if submission_types is [“external_tool”]. See Assignment object definition for format.

assignment[points_possible] number

The maximum points possible on the assignment.

assignment[grading_type] string

The strategy used for grading the assignment. The assignment defaults to “points” if this field is omitted.

Allowed values: pass_fail, percent, letter_grade, gpa_scale, points

assignment[due_at] DateTime

The day/time the assignment is due. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[lock_at] DateTime

The day/time the assignment is locked after. Must be after the due date if there is a due date. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[unlock_at] DateTime

The day/time the assignment is unlocked. Must be before the due date if there is a due date. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z.

assignment[description] string

The assignment's description, supports HTML.

assignment[assignment_group_id] integer

The assignment group id to put the assignment in. Defaults to the top assignment group in the course.

assignment[muted] boolean

Whether this assignment is muted. A muted assignment does not send change notifications and hides grades from students. Defaults to false.

assignment[assignment_overrides][] AssignmentOverride

List of overrides for the assignment.

assignment[only_visible_to_overrides] boolean

Whether this assignment is only visible to overrides (Only useful if 'differentiated assignments' account setting is on)

assignment[published] boolean

Whether this assignment is published. (Only useful if 'draft state' account setting is on) Unpublished assignments are not visible to students.

assignment[grading_standard_id] integer

The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. This will update the grading_type for the course to 'letter_grade' unless it is already 'gpa_scale'.

assignment[omit_from_final_grade] boolean

Whether this assignment is counted towards a student's final grade.

assignment[moderated_grading] boolean

Whether this assignment is moderated.

Returns a Assignment

List assignment overrides AssignmentOverridesController#index

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

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

Returns the paginated list of overrides for this assignment that target sections/groups/students visible to the current user.

Returns a list of AssignmentOverrides

Get a single assignment override AssignmentOverridesController#show

GET /api/v1/courses/:course_id/assignments/:assignment_id/overrides/:id

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

Returns details of the the override with the given id.

Returns a AssignmentOverride

Redirect to the assignment override for a group AssignmentOverridesController#group_alias

GET /api/v1/groups/:group_id/assignments/:assignment_id/override

Scope: url:GET|/api/v1/groups/:group_id/assignments/:assignment_id/override

Responds with a redirect to the override for the given group, if any (404 otherwise).

Redirect to the assignment override for a section AssignmentOverridesController#section_alias

GET /api/v1/sections/:course_section_id/assignments/:assignment_id/override

Scope: url:GET|/api/v1/sections/:course_section_id/assignments/:assignment_id/override

Responds with a redirect to the override for the given section, if any (404 otherwise).

Create an assignment override AssignmentOverridesController#create

POST /api/v1/courses/:course_id/assignments/:assignment_id/overrides

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/overrides

One of student_ids, group_id, or course_section_id must be present. At most one should be present; if multiple are present only the most specific (student_ids first, then group_id, then course_section_id) is used and any others are ignored.

Request Parameters:

Parameter Type Description
assignment_override[student_ids][] integer

The IDs of the override's target students. If present, the IDs must each identify a user with an active student enrollment in the course that is not already targetted by a different adhoc override.

assignment_override[title] string

The title of the adhoc assignment override. Required if student_ids is present, ignored otherwise (the title is set to the name of the targetted group or section instead).

assignment_override[group_id] integer

The ID of the override's target group. If present, the following conditions must be met for the override to be successful:

  1. the assignment MUST be a group assignment (a group_category_id is assigned to it)

  2. the ID must identify an active group in the group set the assignment is in

  3. the ID must not be targetted by a different override

See Appendix: Group assignments for more info.

assignment_override[course_section_id] integer

The ID of the override's target section. If present, must identify an active section of the assignment's course not already targetted by a different override.

assignment_override[due_at] DateTime

The day/time the overridden assignment is due. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect due date. May be present but null to indicate the override removes any previous due date.

assignment_override[unlock_at] DateTime

The day/time the overridden assignment becomes unlocked. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect the unlock date. May be present but null to indicate the override removes any previous unlock date.

assignment_override[lock_at] DateTime

The day/time the overridden assignment becomes locked. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect the lock date. May be present but null to indicate the override removes any previous lock date.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/overrides.json' \
     -X POST \
     -F 'assignment_override[student_ids][]=8' \
     -F 'assignment_override[title]=Fred Flinstone' \
     -F 'assignment_override[due_at]=2012-10-08T21:00:00Z' \
     -H "Authorization: Bearer <token>"
Returns a AssignmentOverride

Update an assignment override AssignmentOverridesController#update

PUT /api/v1/courses/:course_id/assignments/:assignment_id/overrides/:id

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

All current overridden values must be supplied if they are to be retained; e.g. if due_at was overridden, but this PUT omits a value for due_at, due_at will no longer be overridden. If the override is adhoc and student_ids is not supplied, the target override set is unchanged. Target override sets cannot be changed for group or section overrides.

Request Parameters:

Parameter Type Description
assignment_override[student_ids][] integer

The IDs of the override's target students. If present, the IDs must each identify a user with an active student enrollment in the course that is not already targetted by a different adhoc override. Ignored unless the override being updated is adhoc.

assignment_override[title] string

The title of an adhoc assignment override. Ignored unless the override being updated is adhoc.

assignment_override[due_at] DateTime

The day/time the overridden assignment is due. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect due date. May be present but null to indicate the override removes any previous due date.

assignment_override[unlock_at] DateTime

The day/time the overridden assignment becomes unlocked. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect the unlock date. May be present but null to indicate the override removes any previous unlock date.

assignment_override[lock_at] DateTime

The day/time the overridden assignment becomes locked. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not affect the lock date. May be present but null to indicate the override removes any previous lock date.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/overrides/3.json' \
     -X PUT \
     -F 'assignment_override[title]=Fred Flinstone' \
     -F 'assignment_override[due_at]=2012-10-08T21:00:00Z' \
     -H "Authorization: Bearer <token>"
Returns a AssignmentOverride

Delete an assignment override AssignmentOverridesController#destroy

DELETE /api/v1/courses/:course_id/assignments/:assignment_id/overrides/:id

Scope: url:DELETE|/api/v1/courses/:course_id/assignments/:assignment_id/overrides/:id

Deletes an override and returns its former details.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/overrides/3.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"
Returns a AssignmentOverride

Batch retrieve overrides in a course AssignmentOverridesController#batch_retrieve

GET /api/v1/courses/:course_id/assignments/overrides

Scope: url:GET|/api/v1/courses/:course_id/assignments/overrides

Returns a list of specified overrides in this course, providing they target sections/groups/students visible to the current user. Returns null elements in the list for requests that were not found.

Request Parameters:

Parameter Type Description
assignment_overrides[][id] Required string

Ids of overrides to retrieve

assignment_overrides[][assignment_id] Required string

Ids of assignments for each override

Example Request:

curl 'https://<canvas>/api/v1/courses/12/assignments/overrides.json?assignment_overrides[][id]=109&assignment_overrides[][assignment_id]=122&assignment_overrides[][id]=99&assignment_overrides[][assignment_id]=111' \
     -H "Authorization: Bearer <token>"
Returns a list of AssignmentOverrides

Batch create overrides in a course AssignmentOverridesController#batch_create

POST /api/v1/courses/:course_id/assignments/overrides

Scope: url:POST|/api/v1/courses/:course_id/assignments/overrides

Creates the specified overrides for each assignment. Handles creation in a transaction, so all records are created or none are.

One of student_ids, group_id, or course_section_id must be present. At most one should be present; if multiple are present only the most specific (student_ids first, then group_id, then course_section_id) is used and any others are ignored.

Errors are reported in an errors attribute, an array of errors corresponding to inputs. Global errors will be reported as a single element errors array

Request Parameters:

Parameter Type Description
assignment_overrides[] Required AssignmentOverride

Attributes for the new assignment overrides. See Create an assignment override for available attributes

Example Request:

curl "https://<canvas>/api/v1/courses/12/assignments/overrides.json" \
     -X POST \
     -F "assignment_overrides[][assignment_id]=109" \
     -F 'assignment_overrides[][student_ids][]=8' \
     -F "assignment_overrides[][title]=foo" \
     -F "assignment_overrides[][assignment_id]=13" \
     -F "assignment_overrides[][course_section_id]=200" \
     -F "assignment_overrides[][due_at]=2012-10-08T21:00:00Z" \
     -H "Authorization: Bearer <token>"
Returns a list of AssignmentOverrides

Batch update overrides in a course AssignmentOverridesController#batch_update

PUT /api/v1/courses/:course_id/assignments/overrides

Scope: url:PUT|/api/v1/courses/:course_id/assignments/overrides

Updates a list of specified overrides for each assignment. Handles overrides in a transaction, so either all updates are applied or none. See Update an assignment override for available attributes.

All current overridden values must be supplied if they are to be retained; e.g. if due_at was overridden, but this PUT omits a value for due_at, due_at will no longer be overridden. If the override is adhoc and student_ids is not supplied, the target override set is unchanged. Target override sets cannot be changed for group or section overrides.

Errors are reported in an errors attribute, an array of errors corresponding to inputs. Global errors will be reported as a single element errors array

Request Parameters:

Parameter Type Description
assignment_overrides[] Required AssignmentOverride

Attributes for the updated overrides.

Example Request:

curl "https://<canvas>/api/v1/courses/12/assignments/overrides.json" \
     -X PUT \
     -F "assignment_overrides[][id]=122" \
     -F "assignment_overrides[][assignment_id]=109" \
     -F "assignment_overrides[][title]=foo" \
     -F "assignment_overrides[][id]=993" \
     -F "assignment_overrides[][assignment_id]=13" \
     -F "assignment_overrides[][due_at]=2012-10-08T21:00:00Z" \
     -H "Authorization: Bearer <token>"
Returns a list of AssignmentOverrides

List authentication providers AuthenticationProvidersController#index

GET /api/v1/accounts/:account_id/authentication_providers

Scope: url:GET|/api/v1/accounts/:account_id/authentication_providers

Returns a paginated list of authentication providers

Example Request:

curl 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers' \
     -H 'Authorization: Bearer <token>'
Returns a list of AuthenticationProviders

Add authentication provider AuthenticationProvidersController#create

POST /api/v1/accounts/:account_id/authentication_providers

Scope: url:POST|/api/v1/accounts/:account_id/authentication_providers

Add external authentication provider(s) for the account. Services may be CAS, Facebook, GitHub, Google, LDAP, LinkedIn, Microsoft, OpenID Connect, SAML, or Twitter.

Each authentication provider is specified as a set of parameters as described below. A provider specification must include an 'auth_type' parameter with a value of 'canvas', 'cas', 'clever', 'facebook', 'github', 'google', 'ldap', 'linkedin', 'microsoft', 'openid_connect', 'saml', or 'twitter'. The other recognized parameters depend on this auth_type; unrecognized parameters are discarded. Provider specifications not specifying a valid auth_type are ignored.

You can set the 'position' for any configuration. The config in the 1st position is considered the default. You can set 'jit_provisioning' for any configuration besides Canvas.

For Canvas, the additional recognized parameter is:

  • self_registration

    'all', 'none', or 'observer' - who is allowed to register as a new user

For CAS, the additional recognized parameters are:

  • auth_base

    The CAS server's URL.

  • log_in_url [Optional]

    An alternate SSO URL for logging into CAS. You probably should not set this.

For Clever, the additional recognized parameters are:

  • client_id [Required]

    The Clever application's Client ID. Not available if configured globally for Canvas.

  • client_secret [Required]

    The Clever application's Client Secret. Not available if configured globally for Canvas.

  • district_id [Optional]

    A district's Clever ID. Leave this blank to let Clever handle the details with its District Picker. This is required for Clever Instant Login to work in a multi-tenant environment.

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'id' (the default), 'sis_id', 'email', 'student_number', or 'teacher_number'. Note that some fields may not be populated for all users at Clever.

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'id', 'sis_id', 'email', 'student_number', and 'teacher_number'.

For Facebook, the additional recognized parameters are:

  • app_id [Required]

    The Facebook App ID. Not available if configured globally for Canvas.

  • app_secret [Required]

    The Facebook App Secret. Not available if configured globally for Canvas.

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'id' (the default), or 'email'

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'email', 'first_name', 'id', 'last_name', 'locale', and 'name'.

For GitHub, the additional recognized parameters are:

  • domain [Optional]

    The domain of a GitHub Enterprise installation. I.e. github.mycompany.com. If not set, it will default to the public github.com.

  • client_id [Required]

    The GitHub application's Client ID. Not available if configured globally for Canvas.

  • client_secret [Required]

    The GitHub application's Client Secret. Not available if configured globally for Canvas.

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'id' (the default), or 'login'

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'email', 'id', 'login', and 'name'.

For Google, the additional recognized parameters are:

  • client_id [Required]

    The Google application's Client ID. Not available if configured globally for Canvas.

  • client_secret [Required]

    The Google application's Client Secret. Not available if configured globally for Canvas.

  • hosted_domain [Optional]

    A Google Apps domain to restrict logins to. See developers.google.com/identity/protocols/OpenIDConnect?hl=en#hd-param

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'sub' (the default), or 'email'

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'email', 'family_name', 'given_name', 'locale', 'name', and 'sub'.

For LDAP, the additional recognized parameters are:

  • auth_host

    The LDAP server's URL.

  • auth_port [Optional, Integer]

    The LDAP server's TCP port. (default: 389)

  • auth_over_tls [Optional]

    Whether to use TLS. Can be 'simple_tls', or 'start_tls'. For backwards compatibility, booleans are also accepted, with true meaning simple_tls. If not provided, it will default to start_tls.

  • auth_base [Optional]

    A default treebase parameter for searches performed against the LDAP server.

  • auth_filter

    LDAP search filter. Use {{login}} as a placeholder for the username supplied by the user. For example: “(sAMAccountName={{login}})”.

  • identifier_format [Optional]

    The LDAP attribute to use to look up the Canvas login. Omit to use the username supplied by the user.

  • auth_username

    Username

  • auth_password

    Password

For LinkedIn, the additional recognized parameters are:

  • client_id [Required]

    The LinkedIn application's Client ID. Not available if configured globally for Canvas.

  • client_secret [Required]

    The LinkedIn application's Client Secret. Not available if configured globally for Canvas.

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'id' (the default), or 'emailAddress'

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'emailAddress', 'firstName', 'id', 'formattedName', and 'lastName'.

For Microsoft, the additional recognized parameters are:

  • application_id [Required]

    The application's ID.

  • application_secret [Required]

    The application's Client Secret (Password)

  • tenant [Optional]

    See azure.microsoft.com/en-us/documentation/articles/active-directory-v2-protocols/ Valid values are 'common', 'organizations', 'consumers', or an Azure Active Directory Tenant (as either a UUID or domain, such as contoso.onmicrosoft.com). Defaults to 'common'

  • login_attribute [Optional]

    See azure.microsoft.com/en-us/documentation/articles/active-directory-v2-tokens/#idtokens Valid values are 'sub', 'email', 'oid', or 'preferred_username'. Note that email may not always be populated in the user's profile at Microsoft. Oid will not be populated for personal Microsoft accounts. Defaults to 'sub'

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'email', 'name', 'preferred_username', 'oid', and 'sub'.

For OpenID Connect, the additional recognized parameters are:

  • client_id [Required]

    The application's Client ID.

  • client_secret [Required]

    The application's Client Secret.

  • authorize_url [Required]

    The URL for getting starting the OAuth 2.0 web flow

  • token_url [Required]

    The URL for exchanging the OAuth 2.0 authorization code for an Access Token and ID Token

  • scope [Optional]

    Space separated additional scopes to request for the token. Note that you need not specify the 'openid' scope, or any scopes that can be automatically inferred by the rules defined at openid.net/specs/openid-connect-core-1_0.html#ScopeClaims

  • end_session_endpoint [Optional]

    URL to send the end user to after logging out of Canvas. See openid.net/specs/openid-connect-session-1_0.html#RPLogout

  • userinfo_endpoint [Optional]

    URL to request additional claims from. If the initial ID Token received from the provider cannot be used to satisfy the login_attribute and all federated_attributes, this endpoint will be queried for additional information.

  • login_attribute [Optional]

    The attribute of the ID Token to look up the user's login in Canvas. Defaults to 'sub'.

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Any value is allowed for the provider attribute names, but standard claims are listed at openid.net/specs/openid-connect-core-1_0.html#StandardClaims

For SAML, the additional recognized parameters are:

  • metadata [Optional]

    An XML document to parse as SAML metadata, and automatically populate idp_entity_id, log_in_url, log_out_url, certificate_fingerprint, and identifier_format

  • metadata_uri [Optional]

    A URI to download the SAML metadata from, and automatically populate idp_entity_id, log_in_url, log_out_url, certificate_fingerprint, and identifier_format. This URI will also be saved, and the metadata periodically refreshed, automatically. If the metadata contains multiple entities, also supply idp_entity_id to distinguish which one you want (otherwise the only entity in the metadata will be inferred). If you provide the URI 'urn:mace:incommon' or 'ukfederation.org.uk', the InCommon or UK Access Management Federation metadata aggregate, respectively, will be used instead, and additional validation checks will happen (including validating that the metadata has been properly signed with the appropriate key).

  • idp_entity_id

    The SAML IdP's entity ID

  • log_in_url

    The SAML service's SSO target URL

  • log_out_url [Optional]

    The SAML service's SLO target URL

  • certificate_fingerprint

    The SAML service's certificate fingerprint.

  • identifier_format

    The SAML service's identifier format. Must be one of:

    • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress

    • urn:oasis:names:tc:SAML:2.0:nameid-format:entity

    • urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos

    • urn:oasis:names:tc:SAML:2.0:nameid-format:persistent

    • urn:oasis:names:tc:SAML:2.0:nameid-format:transient

    • urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified

    • urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName

    • urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName

  • requested_authn_context [Optional]

    The SAML AuthnContext

  • sig_alg [Optional]

    If set, AuthnRequest, LogoutRequest, and LogoutResponse messages are signed with the corresponding algorithm. Supported algorithms are:

    RSA-SHA1 and RSA-SHA256 are acceptable aliases.

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Any value is allowed for the provider attribute names.

For Twitter, the additional recognized parameters are:

  • consumer_key [Required]

    The Twitter Consumer Key. Not available if configured globally for Canvas.

  • consumer_secret [Required]

    The Twitter Consumer Secret. Not available if configured globally for Canvas.

  • login_attribute [Optional]

    The attribute to use to look up the user's login in Canvas. Either 'user_id' (the default), or 'screen_name'

  • parent_registration [Optional] - DEPRECATED 2017-11-03

    Accepts a boolean value, true designates the authentication service for use on parent registrations. Only one service can be selected at a time so if set to true all others will be set to false

  • federated_attributes [Optional]

    See FederatedAttributesConfig. Valid provider attributes are 'name', 'screen_name', 'time_zone', and 'user_id'.

Example Request:

# Create LDAP config
curl 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers' \
     -F 'auth_type=ldap' \
     -F 'auth_host=ldap.mydomain.edu' \
     -F 'auth_filter=(sAMAccountName={{login}})' \
     -F 'auth_username=username' \
     -F 'auth_password=bestpasswordever' \
     -F 'position=1' \
     -H 'Authorization: Bearer <token>'

# Create SAML config
curl 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers' \
     -F 'auth_type=saml' \
     -F 'idp_entity_id=<idp_entity_id>' \
     -F 'log_in_url=<login_url>' \
     -F 'log_out_url=<logout_url>' \
     -F 'certificate_fingerprint=<fingerprint>' \
     -H 'Authorization: Bearer <token>'

# Create CAS config
curl 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers' \
     -F 'auth_type=cas' \
     -F 'auth_base=cas.mydomain.edu' \
     -F 'log_in_url=<login_url>' \
     -H 'Authorization: Bearer <token>'
Returns a AuthenticationProvider

Update authentication provider AuthenticationProvidersController#update

PUT /api/v1/accounts/:account_id/authentication_providers/:id

Scope: url:PUT|/api/v1/accounts/:account_id/authentication_providers/:id

Update an authentication provider using the same options as the create endpoint. You can not update an existing provider to a new authentication type.

Example Request:

# update SAML config
curl -XPUT 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers/<id>' \
     -F 'idp_entity_id=<new_idp_entity_id>' \
     -F 'log_in_url=<new_url>' \
     -H 'Authorization: Bearer <token>'
Returns a AuthenticationProvider

Get authentication provider AuthenticationProvidersController#show

GET /api/v1/accounts/:account_id/authentication_providers/:id

Scope: url:GET|/api/v1/accounts/:account_id/authentication_providers/:id

Get the specified authentication provider

Example Request:

curl 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers/<id>' \
     -H 'Authorization: Bearer <token>'
Returns a AuthenticationProvider

Delete authentication provider AuthenticationProvidersController#destroy

DELETE /api/v1/accounts/:account_id/authentication_providers/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/authentication_providers/:id

Delete the config

Example Request:

curl -XDELETE 'https://<canvas>/api/v1/accounts/<account_id>/authentication_providers/<id>' \
     -H 'Authorization: Bearer <token>'

show account auth settings AuthenticationProvidersController#show_sso_settings

GET /api/v1/accounts/:account_id/sso_settings

Scope: url:GET|/api/v1/accounts/:account_id/sso_settings

The way to get the current state of each account level setting that's relevant to Single Sign On configuration

You can list the current state of each setting with “update_sso_settings”

Example Request:

curl -XGET 'https://<canvas>/api/v1/accounts/<account_id>/sso_settings' \
     -H 'Authorization: Bearer <token>'
Returns a SSOSettings

update account auth settings AuthenticationProvidersController#update_sso_settings

PUT /api/v1/accounts/:account_id/sso_settings

Scope: url:PUT|/api/v1/accounts/:account_id/sso_settings

For various cases of mixed SSO configurations, you may need to set some configuration at the account level to handle the particulars of your setup.

This endpoint accepts a PUT request to set several possible account settings. All setting are optional on each request, any that are not provided at all are simply retained as is. Any that provide the key but a null-ish value (blank string, null, undefined) will be UN-set.

You can list the current state of each setting with “show_sso_settings”

Example Request:

curl -XPUT 'https://<canvas>/api/v1/accounts/<account_id>/sso_settings' \
     -F 'sso_settings[auth_discovery_url]=<new_url>' \
     -F 'sso_settings[change_password_url]=<new_url>' \
     -F 'sso_settings[login_handle_name]=<new_handle>' \
     -H 'Authorization: Bearer <token>'
Returns a SSOSettings

Query by login. AuthenticationAuditApiController#for_login

GET /api/v1/audit/authentication/logins/:login_id

Scope: url:GET|/api/v1/audit/authentication/logins/:login_id

List authentication events for a given login.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events. Events are stored for one year.

end_time DateTime

The end of the time range from which you want events.

Query by account. AuthenticationAuditApiController#for_account

GET /api/v1/audit/authentication/accounts/:account_id

Scope: url:GET|/api/v1/audit/authentication/accounts/:account_id

List authentication events for a given account.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events. Events are stored for one year.

end_time DateTime

The end of the time range from which you want events.

Query by user. AuthenticationAuditApiController#for_user

GET /api/v1/audit/authentication/users/:user_id

Scope: url:GET|/api/v1/audit/authentication/users/:user_id

List authentication events for a given user.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events. Events are stored for one year.

end_time DateTime

The end of the time range from which you want events.

Get blueprint information MasterCourses::MasterTemplatesController#show

GET /api/v1/courses/:course_id/blueprint_templates/:template_id

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id

Using 'default' as the template_id should suffice for the current implmentation (as there should be only one template per course). However, using specific template ids may become necessary in the future

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a BlueprintTemplate

Get associated course information MasterCourses::MasterTemplatesController#associated_courses

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/associated_courses

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id/associated_courses

Returns a list of courses that are configured to receive updates from this blueprint

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/associated_courses \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a list of Courses

Update associated courses MasterCourses::MasterTemplatesController#update_associations

PUT /api/v1/courses/:course_id/blueprint_templates/:template_id/update_associations

Scope: url:PUT|/api/v1/courses/:course_id/blueprint_templates/:template_id/update_associations

Send a list of course ids to add or remove new associations for the template. Cannot add courses that do not belong to the blueprint course's account. Also cannot add other blueprint courses or courses that already have an association with another blueprint course.

Request Parameters:

Parameter Type Description
course_ids_to_add Array

Courses to add as associated courses

course_ids_to_remove Array

Courses to remove as associated courses

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/update_associations \
-X PUT \
-H 'Authorization: Bearer <token>' \
-d 'course_ids_to_add[]=1' \
-d 'course_ids_to_remove[]=2' \

Begin a migration to push to associated courses MasterCourses::MasterTemplatesController#queue_migration

POST /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations

Scope: url:POST|/api/v1/courses/:course_id/blueprint_templates/:template_id/migrations

Begins a migration to push recently updated content to all associated courses. Only one migration can be running at a time.

Request Parameters:

Parameter Type Description
comment string

An optional comment to be included in the sync history.

send_notification boolean

Send a notification to the calling user when the sync completes.

copy_settings boolean

Whether course settings should be copied over to associated courses. Defaults to true for newly associated courses.

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations \
-X POST \
-F 'comment=Fixed spelling in question 3 of midterm exam' \
-F 'send_notification=true' \
-H 'Authorization: Bearer <token>'
Returns a BlueprintMigration

Set or remove restrictions on a blueprint course object MasterCourses::MasterTemplatesController#restrict_item

PUT /api/v1/courses/:course_id/blueprint_templates/:template_id/restrict_item

Scope: url:PUT|/api/v1/courses/:course_id/blueprint_templates/:template_id/restrict_item

If a blueprint course object is restricted, editing will be limited for copies in associated courses.

Request Parameters:

Parameter Type Description
content_type string

The type of the object.

Allowed values: assignment, attachment, discussion_topic, external_tool, quiz, wiki_page

content_id integer

The ID of the object.

restricted boolean

Whether to apply restrictions.

restrictions BlueprintRestriction

(Optional) If the object is restricted, this specifies a set of restrictions. If not specified, the course-level restrictions will be used. See Course API update documentation

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/restrict_item \
-X PUT \
-H 'Authorization: Bearer <token>' \
-d 'content_type=assignment' \
-d 'content_id=2' \
-d 'restricted=true'

Get unsynced changes MasterCourses::MasterTemplatesController#unsynced_changes

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/unsynced_changes

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id/unsynced_changes

Retrieve a list of learning objects that have changed since the last blueprint sync operation.

Returns a list of ChangeRecords

List blueprint migrations MasterCourses::MasterTemplatesController#migrations_index

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id/migrations

Shows a paginated list of migrations for the template, starting with the most recent. This endpoint can be called on a blueprint course. See also the associated course side.

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations \
-H 'Authorization: Bearer <token>'
Returns a list of BlueprintMigrations

Show a blueprint migration MasterCourses::MasterTemplatesController#migrations_show

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations/:id

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id/migrations/:id

Shows the status of a migration. This endpoint can be called on a blueprint course. See also the associated course side.

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations/:id \
-H 'Authorization: Bearer <token>'
Returns a BlueprintMigration

Get migration details MasterCourses::MasterTemplatesController#migration_details

GET /api/v1/courses/:course_id/blueprint_templates/:template_id/migrations/:id/details

Scope: url:GET|/api/v1/courses/:course_id/blueprint_templates/:template_id/migrations/:id/details

Show the changes that were propagated in a blueprint migration. This endpoint can be called on a blueprint course. See also the associated course side.

Example Request:

curl https://<canvas>/api/v1/courses/1/blueprint_templates/default/migrations/2/details \
-H 'Authorization: Bearer <token>'
Returns a list of ChangeRecords

List blueprint imports MasterCourses::MasterTemplatesController#imports_index

GET /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations

Scope: url:GET|/api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations

Shows a paginated list of migrations imported into a course associated with a blueprint, starting with the most recent. See also the blueprint course side.

Use 'default' as the subscription_id to use the currently active blueprint subscription.

Example Request:

curl https://<canvas>/api/v1/courses/2/blueprint_subscriptions/default/migrations \
-H 'Authorization: Bearer <token>'
Returns a list of BlueprintMigrations

Show a blueprint import MasterCourses::MasterTemplatesController#imports_show

GET /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations/:id

Scope: url:GET|/api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations/:id

Shows the status of an import into a course associated with a blueprint. See also the blueprint course side.

Example Request:

curl https://<canvas>/api/v1/courses/2/blueprint_subscriptions/default/migrations/:id \
-H 'Authorization: Bearer <token>'
Returns a BlueprintMigration

Get import details MasterCourses::MasterTemplatesController#import_details

GET /api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations/:id/details

Scope: url:GET|/api/v1/courses/:course_id/blueprint_subscriptions/:subscription_id/migrations/:id/details

Show the changes that were propagated to a course associated with a blueprint. See also the blueprint course side.

Example Request:

curl https://<canvas>/api/v1/courses/2/blueprint_subscriptions/default/7/details \
-H 'Authorization: Bearer <token>'
Returns a list of ChangeRecords

List bookmarks Bookmarks::BookmarksController#index

GET /api/v1/users/self/bookmarks

Scope: url:GET|/api/v1/users/self/bookmarks

Returns the paginated list of bookmarks.

Example Request:

curl 'https://<canvas>/api/v1/users/self/bookmarks' \
     -H 'Authorization: Bearer <token>'
Returns a list of Bookmarks

Create bookmark Bookmarks::BookmarksController#create

POST /api/v1/users/self/bookmarks

Scope: url:POST|/api/v1/users/self/bookmarks

Creates a bookmark.

Request Parameters:

Parameter Type Description
name string

The name of the bookmark

url string

The url of the bookmark

position integer

The position of the bookmark. Defaults to the bottom.

data string

The data associated with the bookmark

Example Request:

curl 'https://<canvas>/api/v1/users/self/bookmarks' \
     -F 'name=Biology 101' \
     -F 'url=/courses/1' \
     -H 'Authorization: Bearer <token>'
Returns a Bookmark

Get bookmark Bookmarks::BookmarksController#show

GET /api/v1/users/self/bookmarks/:id

Scope: url:GET|/api/v1/users/self/bookmarks/:id

Returns the details for a bookmark.

Example Request:

curl 'https://<canvas>/api/v1/users/self/bookmarks/1' \
     -H 'Authorization: Bearer <token>'
Returns a Bookmark

Update bookmark Bookmarks::BookmarksController#update

PUT /api/v1/users/self/bookmarks/:id

Scope: url:PUT|/api/v1/users/self/bookmarks/:id

Updates a bookmark

Request Parameters:

Parameter Type Description
name string

The name of the bookmark

url string

The url of the bookmark

position integer

The position of the bookmark. Defaults to the bottom.

data string

The data associated with the bookmark

Example Request:

curl -X PUT 'https://<canvas>/api/v1/users/self/bookmarks/1' \
     -F 'name=Biology 101' \
     -F 'url=/courses/1' \
     -H 'Authorization: Bearer <token>'
Returns a Folder

Delete bookmark Bookmarks::BookmarksController#destroy

DELETE /api/v1/users/self/bookmarks/:id

Scope: url:DELETE|/api/v1/users/self/bookmarks/:id

Deletes a bookmark

Example Request:

curl -X DELETE 'https://<canvas>/api/v1/users/self/bookmarks/1' \
     -H 'Authorization: Bearer <token>'

Get the brand config variables that should be used for this domain BrandConfigsApiController#show

GET /api/v1/brand_variables

Scope: url:GET|/api/v1/brand_variables

Will redirect to a static json file that has all of the brand variables used by this account. Even though this is a redirect, do not store the redirected url since if the account makes any changes it will redirect to a new url. Needs no authentication.

Example Request:

curl 'https://<canvas>/api/v1/brand_variables'

List calendar events CalendarEventsApiController#index

GET /api/v1/calendar_events

Scope: url:GET|/api/v1/calendar_events

Retrieve the paginated list of calendar events or assignments for the current user

Request Parameters:

Parameter Type Description
type string

Defaults to “event”

Allowed values: event, assignment

start_date Date

Only return events since the start_date (inclusive). Defaults to today. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date Date

Only return events before the end_date (inclusive). Defaults to start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. If end_date is the same as start_date, then only events on that day are returned.

undated boolean

Defaults to false (dated events only). If true, only return undated events and ignore start_date and end_date.

all_events boolean

Defaults to false (uses start_date, end_date, and undated criteria). If true, all events are returned, ignoring start_date, end_date, and undated criteria.

context_codes[] string

List of context codes of courses/groups/users whose events you want to see. If not specified, defaults to the current user (i.e personal calendar, no course/group events). Limited to 10 context codes, additional ones are ignored. The format of this field is the context type, followed by an underscore, followed by the context id. For example: course_42

excludes[] Array

Array of attributes to exclude. Possible values are “description”, “child_events” and “assignment”

Returns a list of CalendarEvents

List calendar events for a user CalendarEventsApiController#user_index

GET /api/v1/users/:user_id/calendar_events

Scope: url:GET|/api/v1/users/:user_id/calendar_events

Retrieve the paginated list of calendar events or assignments for the specified user. To view calendar events for a user other than yourself, you must either be an observer of that user or an administrator.

Request Parameters:

Parameter Type Description
type string

Defaults to “event”

Allowed values: event, assignment

start_date Date

Only return events since the start_date (inclusive). Defaults to today. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date Date

Only return events before the end_date (inclusive). Defaults to start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. If end_date is the same as start_date, then only events on that day are returned.

undated boolean

Defaults to false (dated events only). If true, only return undated events and ignore start_date and end_date.

all_events boolean

Defaults to false (uses start_date, end_date, and undated criteria). If true, all events are returned, ignoring start_date, end_date, and undated criteria.

context_codes[] string

List of context codes of courses/groups/users whose events you want to see. If not specified, defaults to the current user (i.e personal calendar, no course/group events). Limited to 10 context codes, additional ones are ignored. The format of this field is the context type, followed by an underscore, followed by the context id. For example: course_42

excludes[] Array

Array of attributes to exclude. Possible values are “description”, “child_events” and “assignment”

Returns a list of CalendarEvents

Create a calendar event CalendarEventsApiController#create

POST /api/v1/calendar_events

Scope: url:POST|/api/v1/calendar_events

Create and return a new calendar event

Request Parameters:

Parameter Type Description
calendar_event[context_code] Required string

Context code of the course/group/user whose calendar this event should be added to.

calendar_event[title] string

Short title for the calendar event.

calendar_event[description] string

Longer HTML description of the event.

calendar_event[start_at] DateTime

Start date/time of the event.

calendar_event[end_at] DateTime

End date/time of the event.

calendar_event[location_name] string

Location name of the event.

calendar_event[location_address] string

Location address

calendar_event[time_zone_edited] string

Time zone of the user editing the event. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

calendar_event[all_day] boolean

When true event is considered to span the whole day and times are ignored.

calendar_event[child_event_data][X][start_at] DateTime

Section-level start time(s) if this is a course event. X can be any identifier, provided that it is consistent across the start_at, end_at and context_code

calendar_event[child_event_data][X][end_at] DateTime

Section-level end time(s) if this is a course event.

calendar_event[child_event_data][X][context_code] string

Context code(s) corresponding to the section-level start and end time(s).

calendar_event[duplicate][count] number

Number of times to copy/duplicate the event. Count cannot exceed 200.

calendar_event[duplicate][interval] number

Defaults to 1 if duplicate `count` is set. The interval between the duplicated events.

calendar_event[duplicate][frequency] string

Defaults to “weekly”. The frequency at which to duplicate the event

Allowed values: daily, weekly, monthly

calendar_event[duplicate][append_iterator] boolean

Defaults to false. If set to `true`, an increasing counter number will be appended to the event title when the event is duplicated. (e.g. Event 1, Event 2, Event 3, etc)

Example Request:

curl 'https://<canvas>/api/v1/calendar_events.json' \
     -X POST \
     -F 'calendar_event[context_code]=course_123' \
     -F 'calendar_event[title]=Paintball Fight!' \
     -F 'calendar_event[start_at]=2012-07-19T21:00:00Z' \
     -F 'calendar_event[end_at]=2012-07-19T22:00:00Z' \
     -H "Authorization: Bearer <token>"

Get a single calendar event or assignment CalendarEventsApiController#show

GET /api/v1/calendar_events/:id

Scope: url:GET|/api/v1/calendar_events/:id

Reserve a time slot CalendarEventsApiController#reserve

POST /api/v1/calendar_events/:id/reservations

Scope: url:POST|/api/v1/calendar_events/:id/reservations

POST /api/v1/calendar_events/:id/reservations/:participant_id

Scope: url:POST|/api/v1/calendar_events/:id/reservations/:participant_id

Reserves a particular time slot and return the new reservation

Request Parameters:

Parameter Type Description
participant_id string

User or group id for whom you are making the reservation (depends on the participant type). Defaults to the current user (or user's candidate group).

comments string

Comments to associate with this reservation

cancel_existing boolean

Defaults to false. If true, cancel any previous reservation(s) for this participant and appointment group.

Example Request:

curl 'https://<canvas>/api/v1/calendar_events/345/reservations.json' \
     -X POST \
     -F 'cancel_existing=true' \
     -H "Authorization: Bearer <token>"

Update a calendar event CalendarEventsApiController#update

PUT /api/v1/calendar_events/:id

Scope: url:PUT|/api/v1/calendar_events/:id

Update and return a calendar event

Request Parameters:

Parameter Type Description
calendar_event[context_code] string

Context code of the course/group/user to move this event to. Scheduler appointments and events with section-specific times cannot be moved between calendars.

calendar_event[title] string

Short title for the calendar event.

calendar_event[description] string

Longer HTML description of the event.

calendar_event[start_at] DateTime

Start date/time of the event.

calendar_event[end_at] DateTime

End date/time of the event.

calendar_event[location_name] string

Location name of the event.

calendar_event[location_address] string

Location address

calendar_event[time_zone_edited] string

Time zone of the user editing the event. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

calendar_event[all_day] boolean

When true event is considered to span the whole day and times are ignored.

calendar_event[child_event_data][X][start_at] DateTime

Section-level start time(s) if this is a course event. X can be any identifier, provided that it is consistent across the start_at, end_at and context_code

calendar_event[child_event_data][X][end_at] DateTime

Section-level end time(s) if this is a course event.

calendar_event[child_event_data][X][context_code] string

Context code(s) corresponding to the section-level start and end time(s).

Example Request:

curl 'https://<canvas>/api/v1/calendar_events/234.json' \
     -X PUT \
     -F 'calendar_event[title]=Epic Paintball Fight!' \
     -H "Authorization: Bearer <token>"

Delete a calendar event CalendarEventsApiController#destroy

DELETE /api/v1/calendar_events/:id

Scope: url:DELETE|/api/v1/calendar_events/:id

Delete an event from the calendar and return the deleted event

Request Parameters:

Parameter Type Description
cancel_reason string

Reason for deleting/canceling the event.

Example Request:

curl 'https://<canvas>/api/v1/calendar_events/234.json' \
     -X DELETE \
     -F 'cancel_reason=Greendale layed off the janitorial staff :(' \
     -H "Authorization: Bearer <token>"

Set a course timetable CalendarEventsApiController#set_course_timetable

POST /api/v1/courses/:course_id/calendar_events/timetable

Scope: url:POST|/api/v1/courses/:course_id/calendar_events/timetable

Creates and updates “timetable” events for a course. Can automaticaly generate a series of calendar events based on simple schedules (e.g. “Monday and Wednesday at 2:00pm” )

Existing timetable events for the course and course sections will be updated if they still are part of the timetable. Otherwise, they will be deleted.

Request Parameters:

Parameter Type Description
timetables[course_section_id][] Array

An array of timetable objects for the course section specified by course_section_id. If course_section_id is set to “all”, events will be created for the entire course.

timetables[course_section_id][][weekdays] string

A comma-separated list of abbreviated weekdays (Mon-Monday, Tue-Tuesday, Wed-Wednesday, Thu-Thursday, Fri-Friday, Sat-Saturday, Sun-Sunday)

timetables[course_section_id][][start_time] string

Time to start each event at (e.g. “9:00 am”)

timetables[course_section_id][][end_time] string

Time to end each event at (e.g. “9:00 am”)

timetables[course_section_id][][location_name] string

A location name to set for each event

Example Request:

curl 'https://<canvas>/api/v1/calendar_events/timetable' \
     -X POST \
     -F 'timetables[all][][weekdays]=Mon,Wed,Fri' \
     -F 'timetables[all][][start_time]=11:00 am' \
     -F 'timetables[all][][end_time]=11:50 am' \
     -F 'timetables[all][][location_name]=Room 237' \
     -H "Authorization: Bearer <token>"

Get course timetable CalendarEventsApiController#get_course_timetable

GET /api/v1/courses/:course_id/calendar_events/timetable

Scope: url:GET|/api/v1/courses/:course_id/calendar_events/timetable

Returns the last timetable set by the Set a course timetable endpoint

Create or update events directly for a course timetable CalendarEventsApiController#set_course_timetable_events

POST /api/v1/courses/:course_id/calendar_events/timetable_events

Scope: url:POST|/api/v1/courses/:course_id/calendar_events/timetable_events

Creates and updates “timetable” events for a course or course section. Similar to setting a course timetable, but instead of generating a list of events based on a timetable schedule, this endpoint expects a complete list of events.

Request Parameters:

Parameter Type Description
course_section_id string

Events will be created for the course section specified by course_section_id. If not present, events will be created for the entire course.

events[] Array

An array of event objects to use.

events[][start_at] DateTime

Start time for the event

events[][end_at] DateTime

End time for the event

events[][location_name] string

Location name for the event

events[][code] string

A unique identifier that can be used to update the event at a later time If one is not specified, an identifier will be generated based on the start and end times

List collaborations CollaborationsController#api_index

GET /api/v1/courses/:course_id/collaborations

Scope: url:GET|/api/v1/courses/:course_id/collaborations

GET /api/v1/groups/:group_id/collaborations

Scope: url:GET|/api/v1/groups/:group_id/collaborations

A paginated list of collaborations the current user has access to in the context of the course provided in the url. NOTE: this only returns ExternalToolCollaboration type collaborations.

curl https://<canvas>/api/v1/courses/1/collaborations/
Returns a list of Collaborations

List members of a collaboration. CollaborationsController#members

GET /api/v1/collaborations/:id/members

Scope: url:GET|/api/v1/collaborations/:id/members

A paginated list of the collaborators of a given collaboration

Request Parameters:

Parameter Type Description
include[] string
  • “collaborator_lti_id”: Optional information to include with each member. Represents an identifier to be used for the member in an LTI context.

  • “avatar_image_url”: Optional information to include with each member. The url for the avatar of a collaborator with type 'user'.

Allowed values: collaborator_lti_id, avatar_image_url

Example Request:

curl https://<canvas>/api/v1/courses/1/collaborations/1/members
Returns a list of Collaborators

List potential members CollaborationsController#potential_collaborators

GET /api/v1/courses/:course_id/potential_collaborators

Scope: url:GET|/api/v1/courses/:course_id/potential_collaborators

GET /api/v1/groups/:group_id/potential_collaborators

Scope: url:GET|/api/v1/groups/:group_id/potential_collaborators

A paginated list of the users who can potentially be added to a collaboration in the given context.

For courses, this consists of all enrolled users. For groups, it is comprised of the group members plus the admins of the course containing the group.

Returns a list of Users

List of CommMessages for a user CommMessagesApiController#index

GET /api/v1/comm_messages

Scope: url:GET|/api/v1/comm_messages

Retrieve a paginated list of messages sent to a user.

Request Parameters:

Parameter Type Description
user_id Required string

The user id for whom you want to retrieve CommMessages

start_time DateTime

The beginning of the time range you want to retrieve message from.

end_time DateTime

The end of the time range you want to retrieve messages for.

Returns a list of CommMessages

List user communication channels CommunicationChannelsController#index

GET /api/v1/users/:user_id/communication_channels

Scope: url:GET|/api/v1/users/:user_id/communication_channels

Returns a paginated list of communication channels for the specified user, sorted by position.

Example Request:

curl https://<canvas>/api/v1/users/12345/communication_channels \
     -H 'Authorization: Bearer <token>'
Returns a list of CommunicationChannels

Create a communication channel CommunicationChannelsController#create

POST /api/v1/users/:user_id/communication_channels

Scope: url:POST|/api/v1/users/:user_id/communication_channels

Creates a new communication channel for the specified user.

Request Parameters:

Parameter Type Description
communication_channel[address] Required string

An email address or SMS number. Not required for “push” type channels.

communication_channel[type] Required string

The type of communication channel.

In order to enable push notification support, the server must be properly configured (via sns.yml) to communicate with Amazon Simple Notification Services, and the developer key used to create the access token from this request must have an SNS ARN configured on it.

Allowed values: email, sms, push

communication_channel[token] string

A registration id, device token, or equivalent token given to an app when registering with a push notification provider. Only valid for “push” type channels.

skip_confirmation boolean

Only valid for site admins and account admins making requests; If true, the channel is automatically validated and no confirmation email or SMS is sent. Otherwise, the user must respond to a confirmation message to confirm the channel.

Example Request:

curl https://<canvas>/api/v1/users/1/communication_channels \
     -H 'Authorization: Bearer <token>' \
     -d 'communication_channel[address]=new@example.com' \
     -d 'communication_channel[type]=email' \
Returns a CommunicationChannel

Delete a communication channel CommunicationChannelsController#destroy

DELETE /api/v1/users/:user_id/communication_channels/:id

Scope: url:DELETE|/api/v1/users/:user_id/communication_channels/:id

DELETE /api/v1/users/:user_id/communication_channels/:type/:address

Scope: url:DELETE|/api/v1/users/:user_id/communication_channels/:type/:address

Delete an existing communication channel.

Example Request:

curl https://<canvas>/api/v1/users/5/communication_channels/3
     -H 'Authorization: Bearer <token>
     -X DELETE
Returns a CommunicationChannel

Delete a push notification endpoint CommunicationChannelsController#delete_push_token

DELETE /api/v1/users/self/communication_channels/push

Scope: url:DELETE|/api/v1/users/self/communication_channels/push

Example Request:

curl https://<canvas>/api/v1/users/self/communication_channels/push
     -H 'Authorization: Bearer <token>
     -X DELETE
     -d 'push_token=<push_token>'

List conferences ConferencesController#index

GET /api/v1/courses/:course_id/conferences

Scope: url:GET|/api/v1/courses/:course_id/conferences

GET /api/v1/groups/:group_id/conferences

Scope: url:GET|/api/v1/groups/:group_id/conferences

Retrieve the paginated list of conferences for this context

This API returns a JSON object containing the list of conferences, the key for the list of conferences is “conferences”

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/conferences' \
    -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/groups/<group_id>/conferences' \
    -H "Authorization: Bearer <token>"
Returns a list of Conferences

List content exports ContentExportsApiController#index

GET /api/v1/courses/:course_id/content_exports

Scope: url:GET|/api/v1/courses/:course_id/content_exports

GET /api/v1/groups/:group_id/content_exports

Scope: url:GET|/api/v1/groups/:group_id/content_exports

GET /api/v1/users/:user_id/content_exports

Scope: url:GET|/api/v1/users/:user_id/content_exports

A paginated list of the past and pending content export jobs for a course, group, or user. Exports are returned newest first.

Returns a list of ContentExports

Show content export ContentExportsApiController#show

GET /api/v1/courses/:course_id/content_exports/:id

Scope: url:GET|/api/v1/courses/:course_id/content_exports/:id

GET /api/v1/groups/:group_id/content_exports/:id

Scope: url:GET|/api/v1/groups/:group_id/content_exports/:id

GET /api/v1/users/:user_id/content_exports/:id

Scope: url:GET|/api/v1/users/:user_id/content_exports/:id

Get information about a single content export.

Returns a ContentExport

Export content ContentExportsApiController#create

POST /api/v1/courses/:course_id/content_exports

Scope: url:POST|/api/v1/courses/:course_id/content_exports

POST /api/v1/groups/:group_id/content_exports

Scope: url:POST|/api/v1/groups/:group_id/content_exports

POST /api/v1/users/:user_id/content_exports

Scope: url:POST|/api/v1/users/:user_id/content_exports

Begin a content export job for a course, group, or user.

You can use the Progress API to track the progress of the export. The migration's progress is linked to with the progress_url value.

When the export completes, use the Show content export endpoint to retrieve a download URL for the exported content.

Request Parameters:

Parameter Type Description
export_type Required string
“common_cartridge”

Export the contents of the course in the Common Cartridge (.imscc) format

“qti”

Export quizzes from a course in the QTI format

“zip”

Export files from a course, group, or user in a zip file

Allowed values: common_cartridge, qti, zip

skip_notifications boolean

Don't send the notifications about the export to the user. Default: false

select Hash

The select parameter allows exporting specific data. The keys are object types like 'files', 'folders', 'pages', etc. The value for each key is a list of object ids. An id can be an integer or a string.

Multiple object types can be selected in the same call. However, not all object types are valid for every export_type. Common Cartridge supports all object types. Zip and QTI only support the object types as described below.

“folders”

Also supported for zip export_type.

“files”

Also supported for zip export_type.

“quizzes”

Also supported for qti export_type.

Allowed values: folders, files, attachments, quizzes, assignments, announcements, calendar_events, discussion_topics, modules, module_items, pages, rubrics

Returns a ContentExport

List migration issues MigrationIssuesController#index

GET /api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues

Scope: url:GET|/api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues

GET /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues

Scope: url:GET|/api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues

GET /api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues

Scope: url:GET|/api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues

GET /api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues

Scope: url:GET|/api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues

Returns paginated migration issues

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues \
    -H 'Authorization: Bearer <token>'
Returns a list of MigrationIssues

Get a migration issue MigrationIssuesController#show

GET /api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:GET|/api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues/:id

GET /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:GET|/api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id

GET /api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:GET|/api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues/:id

GET /api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:GET|/api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues/:id

Returns data on an individual migration issue

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues/<id> \
    -H 'Authorization: Bearer <token>'
Returns a MigrationIssue

Update a migration issue MigrationIssuesController#update

PUT /api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:PUT|/api/v1/accounts/:account_id/content_migrations/:content_migration_id/migration_issues/:id

PUT /api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:PUT|/api/v1/courses/:course_id/content_migrations/:content_migration_id/migration_issues/:id

PUT /api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:PUT|/api/v1/groups/:group_id/content_migrations/:content_migration_id/migration_issues/:id

PUT /api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues/:id

Scope: url:PUT|/api/v1/users/:user_id/content_migrations/:content_migration_id/migration_issues/:id

Update the workflow_state of a migration issue

Request Parameters:

Parameter Type Description
workflow_state Required string

Set the workflow_state of the issue.

Allowed values: active, resolved

Example Request:

curl -X PUT https://<canvas>/api/v1/courses/<course_id>/content_migrations/<content_migration_id>/migration_issues/<id> \
     -H 'Authorization: Bearer <token>' \
     -F 'workflow_state=resolved'
Returns a MigrationIssue

List content migrations ContentMigrationsController#index

GET /api/v1/accounts/:account_id/content_migrations

Scope: url:GET|/api/v1/accounts/:account_id/content_migrations

GET /api/v1/courses/:course_id/content_migrations

Scope: url:GET|/api/v1/courses/:course_id/content_migrations

GET /api/v1/groups/:group_id/content_migrations

Scope: url:GET|/api/v1/groups/:group_id/content_migrations

GET /api/v1/users/:user_id/content_migrations

Scope: url:GET|/api/v1/users/:user_id/content_migrations

Returns paginated content migrations

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/content_migrations \
    -H 'Authorization: Bearer <token>'
Returns a list of ContentMigrations

Get a content migration ContentMigrationsController#show

GET /api/v1/accounts/:account_id/content_migrations/:id

Scope: url:GET|/api/v1/accounts/:account_id/content_migrations/:id

GET /api/v1/courses/:course_id/content_migrations/:id

Scope: url:GET|/api/v1/courses/:course_id/content_migrations/:id

GET /api/v1/groups/:group_id/content_migrations/:id

Scope: url:GET|/api/v1/groups/:group_id/content_migrations/:id

GET /api/v1/users/:user_id/content_migrations/:id

Scope: url:GET|/api/v1/users/:user_id/content_migrations/:id

Returns data on an individual content migration

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/content_migrations/<id> \
    -H 'Authorization: Bearer <token>'
Returns a ContentMigration

Create a content migration ContentMigrationsController#create

POST /api/v1/accounts/:account_id/content_migrations

Scope: url:POST|/api/v1/accounts/:account_id/content_migrations

POST /api/v1/courses/:course_id/content_migrations

Scope: url:POST|/api/v1/courses/:course_id/content_migrations

POST /api/v1/groups/:group_id/content_migrations

Scope: url:POST|/api/v1/groups/:group_id/content_migrations

POST /api/v1/users/:user_id/content_migrations

Scope: url:POST|/api/v1/users/:user_id/content_migrations

Create a content migration. If the migration requires a file to be uploaded the actual processing of the file will start once the file upload process is completed. File uploading works as described in the File Upload Documentation except that the values are set on a pre_attachment sub-hash.

For migrations that don't require a file to be uploaded, like course copy, the processing will begin as soon as the migration is created.

You can use the Progress API to track the progress of the migration. The migration's progress is linked to with the progress_url value.

The two general workflows are:

If no file upload is needed:

  1. POST to create

  2. Use the Progress specified in progress_url to monitor progress

For file uploading:

  1. POST to create with file info in pre_attachment

  2. Do file upload processing using the data in the pre_attachment data

  3. GET the ContentMigration

  4. Use the Progress specified in progress_url to monitor progress

(required if doing .zip file upload)

Request Parameters:

Parameter Type Description
migration_type Required string

The type of the migration. Use the Migrator endpoint to see all available migrators. Default allowed values: canvas_cartridge_importer, common_cartridge_importer, course_copy_importer, zip_file_importer, qti_converter, moodle_converter

pre_attachment[name] string

Required if uploading a file. This is the first step in uploading a file to the content migration. See the File Upload Documentation for details on the file upload workflow.

pre_attachment[*] string

Other file upload properties, See File Upload Documentation

settings[file_url] string

A URL to download the file from. Must not require authentication.

settings[source_course_id] string

The course to copy from for a course copy migration. (required if doing course copy)

settings[folder_id] string

The folder to unzip the .zip file into for a zip_file_import.

settings[overwrite_quizzes] boolean

Whether to overwrite quizzes with the same identifiers between content packages.

settings[question_bank_id] integer

The existing question bank ID to import questions into if not specified in the content package.

settings[question_bank_name] string

The question bank to import questions into if not specified in the content package, if both bank id and name are set, id will take precedence.

date_shift_options[shift_dates] boolean

Whether to shift dates in the copied course

date_shift_options[old_start_date] Date

The original start date of the source content/course

date_shift_options[old_end_date] Date

The original end date of the source content/course

date_shift_options[new_start_date] Date

The new start date for the content/course

date_shift_options[new_end_date] Date

The new end date for the source content/course

date_shift_options[day_substitutions][X] integer

Move anything scheduled for day 'X' to the specified day. (0-Sunday, 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-Friday, 6-Saturday)

date_shift_options[remove_dates] boolean

Whether to remove dates in the copied course. Cannot be used in conjunction with shift_dates.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/content_migrations' \
     -F 'migration_type=common_cartridge_importer' \
     -F 'settings[question_bank_name]=importquestions' \
     -F 'date_shift_options[old_start_date]=1999-01-01' \
     -F 'date_shift_options[new_start_date]=2013-09-01' \
     -F 'date_shift_options[old_end_date]=1999-04-15' \
     -F 'date_shift_options[new_end_date]=2013-12-15' \
     -F 'date_shift_options[day_substitutions][1]=2' \
     -F 'date_shift_options[day_substitutions][2]=3' \
     -F 'date_shift_options[shift_dates]=true' \
     -F 'pre_attachment[name]=mycourse.imscc' \
     -F 'pre_attachment[size]=12345' \
     -H 'Authorization: Bearer <token>'
Returns a ContentMigration

Update a content migration ContentMigrationsController#update

PUT /api/v1/accounts/:account_id/content_migrations/:id

Scope: url:PUT|/api/v1/accounts/:account_id/content_migrations/:id

PUT /api/v1/courses/:course_id/content_migrations/:id

Scope: url:PUT|/api/v1/courses/:course_id/content_migrations/:id

PUT /api/v1/groups/:group_id/content_migrations/:id

Scope: url:PUT|/api/v1/groups/:group_id/content_migrations/:id

PUT /api/v1/users/:user_id/content_migrations/:id

Scope: url:PUT|/api/v1/users/:user_id/content_migrations/:id

Update a content migration. Takes same arguments as create except that you can't change the migration type. However, changing most settings after the migration process has started will not do anything. Generally updating the content migration will be used when there is a file upload problem. If the first upload has a problem you can supply new pre_attachment values to start the process again.

Returns a ContentMigration

List Migration Systems ContentMigrationsController#available_migrators

GET /api/v1/accounts/:account_id/content_migrations/migrators

Scope: url:GET|/api/v1/accounts/:account_id/content_migrations/migrators

GET /api/v1/courses/:course_id/content_migrations/migrators

Scope: url:GET|/api/v1/courses/:course_id/content_migrations/migrators

GET /api/v1/groups/:group_id/content_migrations/migrators

Scope: url:GET|/api/v1/groups/:group_id/content_migrations/migrators

GET /api/v1/users/:user_id/content_migrations/migrators

Scope: url:GET|/api/v1/users/:user_id/content_migrations/migrators

Lists the currently available migration types. These values may change.

Returns a list of Migrators

List conversations ConversationsController#index

GET /api/v1/conversations

Scope: url:GET|/api/v1/conversations

Returns the paginated list of conversations for the current user, most recent ones first.

Request Parameters:

Parameter Type Description
scope string

When set, only return conversations of the specified type. For example, set to “unread” to return only conversations that haven't been read. The default behavior is to return all non-archived conversations (i.e. read and unread).

Allowed values: unread, starred, archived

filter[] string

When set, only return conversations for the specified courses, groups or users. The id should be prefixed with its type, e.g. “user_123” or “course_456”. Can be an array (by setting “filter[]”) or single value (by setting “filter”)

filter_mode string

When filter[] contains multiple filters, combine them with this mode, filtering conversations that at have at least all of the contexts (“and”) or at least one of the contexts (“or”)

Allowed values: and, or, default or

interleave_submissions boolean

(Obsolete) Submissions are no longer linked to conversations. This parameter is ignored.

include_all_conversation_ids boolean

Default is false. If true, the top-level element of the response will be an object rather than an array, and will have the keys “conversations” which will contain the paged conversation data, and “conversation_ids” which will contain the ids of all conversations under this scope/filter in the same order.

include[] string
“participant_avatars”

Optionally include an “avatar_url” key for each user participanting in the conversation

Allowed values: participant_avatars

API response field:

  • id

    The unique identifier for the conversation.

  • subject

    The subject of the conversation.

  • workflow_state

    The current state of the conversation (read, unread or archived)

  • last_message

    A <=100 character preview from the most recent message

  • last_message_at

    The timestamp of the latest message

  • message_count

    The number of messages in this conversation

  • subscribed

    Indicates whether the user is actively subscribed to the conversation

  • private

    Indicates whether this is a private conversation (i.e. audience of one)

  • starred

    Whether the conversation is starred

  • properties

    Additional conversation flags (last_author, attachments, media_objects). Each listed property means the flag is set to true (i.e. the current user is the most recent author, there are attachments, or there are media objects)

  • audience

    Array of user ids who are involved in the conversation, ordered by participation level, then alphabetical. Excludes current user, unless this is a monologue.

  • audience_contexts

    Most relevant shared contexts (courses and groups) between current user and other participants. If there is only one participant, it will also include that user's enrollment(s)/ membership type(s) in each course/group

  • avatar_url

    URL to appropriate icon for this conversation (custom, individual or group avatar, depending on audience)

  • participants

    Array of users (id, name, full_name) participating in the conversation. Includes current user. If `include[]=participant_avatars` was passed as an argument, each user in the array will also have an “avatar_url” field

  • visible

    Boolean, indicates whether the conversation is visible under the current scope and filter. This attribute is always true in the index API response, and is primarily useful in create/update responses so that you can know if the record should be displayed in the UI. The default scope is assumed, unless a scope or filter is passed to the create/update API call.

Example Response:

[
  {
    "id": 2,
    "subject": "conversations api example",
    "workflow_state": "unread",
    "last_message": "sure thing, here's the file",
    "last_message_at": "2011-09-02T12:00:00Z",
    "message_count": 2,
    "subscribed": true,
    "private": true,
    "starred": false,
    "properties": ["attachments"],
    "audience": [2],
    "audience_contexts": {"courses": {"1": ["StudentEnrollment"]}, "groups": {}},
    "avatar_url": "https://canvas.instructure.com/images/messages/avatar-group-50.png",
    "participants": [
      {"id": 1, "name": "Joe", "full_name": "Joe TA"},
      {"id": 2, "name": "Jane", "full_name": "Jane Teacher"}
    ],
    "visible": true,
    "context_name": "Canvas 101"
  }
]
Returns a list of Conversations

Create a conversation ConversationsController#create

POST /api/v1/conversations

Scope: url:POST|/api/v1/conversations

Create a new conversation with one or more recipients. If there is already an existing private conversation with the given recipients, it will be reused.

Request Parameters:

Parameter Type Description
recipients[] Required string

An array of recipient ids. These may be user ids or course/group ids prefixed with “course_” or “group_” respectively, e.g. recipients[]=1&recipients=2&recipients[]=course_3

subject string

The subject of the conversation. This is ignored when reusing a conversation. Maximum length is 255 characters.

body Required string

The message to be sent

group_conversation boolean

Defaults to false. If true, this will be a group conversation (i.e. all recipients may see all messages and replies). If false, individual private conversations will be started with each recipient. Must be set false if the number of recipients is over the set maximum (default is 100).

attachment_ids[] string

An array of attachments ids. These must be files that have been previously uploaded to the sender's “conversation attachments” folder.

media_comment_id string

Media comment id of an audio of video file to be associated with this message.

media_comment_type string

Type of the associated media file

Allowed values: audio, video

user_note boolean

Will add a faculty journal entry for each recipient as long as the user making the api call has permission, the recipient is a student and faculty journals are enabled in the account.

mode string

Determines whether the messages will be created/sent synchronously or asynchronously. Defaults to sync, and this option is ignored if this is a group conversation or there is just one recipient (i.e. it must be a bulk private message). When sent async, the response will be an empty array (batch status can be queried via the batches API)

Allowed values: sync, async

scope string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: unread, starred, archived

filter[] string

Used when generating “visible” in the API response. See the explanation under the index API action

filter_mode string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: and, or, default or

context_code string

The course or group that is the context for this conversation. Same format as courses or groups in the recipients argument.

Get running batches ConversationsController#batches

GET /api/v1/conversations/batches

Scope: url:GET|/api/v1/conversations/batches

Returns any currently running conversation batches for the current user. Conversation batches are created when a bulk private message is sent asynchronously (see the mode argument to the create API action).

Example Response:

[
  {
    "id": 1,
    "subject": "conversations api example",
    "workflow_state": "created",
    "completion": 0.1234,
    "tags": [],
    "message":
    {
      "id": 1,
      "created_at": "2011-09-02T10:00:00Z",
      "body": "quick reminder, no class tomorrow",
      "author_id": 1,
      "generated": false,
      "media_comment": null,
      "forwarded_messages": [],
      "attachments": []
    }
  }
]

Get a single conversation ConversationsController#show

GET /api/v1/conversations/:id

Scope: url:GET|/api/v1/conversations/:id

Returns information for a single conversation for the current user. Response includes all fields that are present in the list/index action as well as messages and extended participant information.

Request Parameters:

Parameter Type Description
interleave_submissions boolean

(Obsolete) Submissions are no longer linked to conversations. This parameter is ignored.

scope string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: unread, starred, archived

filter[] string

Used when generating “visible” in the API response. See the explanation under the index API action

filter_mode string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: and, or, default or

auto_mark_as_read boolean

Default true. If true, unread conversations will be automatically marked as read. This will default to false in a future API release, so clients should explicitly send true if that is the desired behavior.

API response field:

  • participants

    Array of relevant users. Includes current user. If there are forwarded messages in this conversation, the authors of those messages will also be included, even if they are not participating in this conversation. Fields include:

  • messages

    Array of messages, newest first. Fields include:

    id

    The unique identifier for the message

    created_at

    The timestamp of the message

    body

    The actual message body

    author_id

    The id of the user who sent the message (see audience, participants)

    generated

    If true, indicates this is a system-generated message (e.g. “Bob added Alice to the conversation”)

    media_comment

    Audio/video comment data for this message (if applicable). Fields include: display_name, content-type, media_id, media_type, url

    forwarded_messages

    If this message contains forwarded messages, they will be included here (same format as this list). Note that those messages may have forwarded messages of their own, etc.

    attachments

    Array of attachments for this message. Fields include: display_name, content-type, filename, url

  • submissions

    (Obsolete) Array of assignment submissions having comments relevant to this conversation. Submissions are no longer linked to conversations. This field will always be nil or empty.

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "unread",
  "last_message": "sure thing, here's the file",
  "last_message_at": "2011-09-02T12:00:00-06:00",
  "message_count": 2,
  "subscribed": true,
  "private": true,
  "starred": false,
  "properties": ["attachments"],
  "audience": [2],
  "audience_contexts": {"courses": {"1": []}, "groups": {}},
  "avatar_url": "https://canvas.instructure.com/images/messages/avatar-50.png",
  "participants": [
    {"id": 1, "name": "Joe", "full_name": "Joe TA"},
    {"id": 2, "name": "Jane", "full_name": "Jane Teacher"},
    {"id": 3, "name": "Bob", "full_name": "Bob Student"}
  ],
  "messages":
    [
      {
        "id": 3,
        "created_at": "2011-09-02T12:00:00Z",
        "body": "sure thing, here's the file",
        "author_id": 2,
        "generated": false,
        "media_comment": null,
        "forwarded_messages": [],
        "attachments": [{"id": 1, "display_name": "notes.doc", "uuid": "abcdefabcdefabcdefabcdefabcdef"}]
      },
      {
        "id": 2,
        "created_at": "2011-09-02T11:00:00Z",
        "body": "hey, bob didn't get the notes. do you have a copy i can give him?",
        "author_id": 2,
        "generated": false,
        "media_comment": null,
        "forwarded_messages":
          [
            {
              "id": 1,
              "created_at": "2011-09-02T10:00:00Z",
              "body": "can i get a copy of the notes? i was out",
              "author_id": 3,
              "generated": false,
              "media_comment": null,
              "forwarded_messages": [],
              "attachments": []
            }
          ],
        "attachments": []
      }
    ],
  "submissions": []
}

Edit a conversation ConversationsController#update

PUT /api/v1/conversations/:id

Scope: url:PUT|/api/v1/conversations/:id

Updates attributes for a single conversation.

Request Parameters:

Parameter Type Description
conversation[workflow_state] string

Change the state of this conversation

Allowed values: read, unread, archived

conversation[subscribed] boolean

Toggle the current user's subscription to the conversation (only valid for group conversations). If unsubscribed, the user will still have access to the latest messages, but the conversation won't be automatically flagged as unread, nor will it jump to the top of the inbox.

conversation[starred] boolean

Toggle the starred state of the current user's view of the conversation.

scope string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: unread, starred, archived

filter[] string

Used when generating “visible” in the API response. See the explanation under the index API action

filter_mode string

Used when generating “visible” in the API response. See the explanation under the index API action

Allowed values: and, or, default or

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "read",
  "last_message": "sure thing, here's the file",
  "last_message_at": "2011-09-02T12:00:00-06:00",
  "message_count": 2,
  "subscribed": true,
  "private": true,
  "starred": false,
  "properties": ["attachments"],
  "audience": [2],
  "audience_contexts": {"courses": {"1": []}, "groups": {}},
  "avatar_url": "https://canvas.instructure.com/images/messages/avatar-50.png",
  "participants": [{"id": 1, "name": "Joe", "full_name": "Joe TA"}]
}

Mark all as read ConversationsController#mark_all_as_read

POST /api/v1/conversations/mark_all_as_read

Scope: url:POST|/api/v1/conversations/mark_all_as_read

Mark all conversations as read.

Delete a conversation ConversationsController#destroy

DELETE /api/v1/conversations/:id

Scope: url:DELETE|/api/v1/conversations/:id

Delete this conversation and its messages. Note that this only deletes this user's view of the conversation.

Response includes same fields as UPDATE action

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "read",
  "last_message": null,
  "last_message_at": null,
  "message_count": 0,
  "subscribed": true,
  "private": true,
  "starred": false,
  "properties": []
}

Add recipients ConversationsController#add_recipients

POST /api/v1/conversations/:id/add_recipients

Scope: url:POST|/api/v1/conversations/:id/add_recipients

Add recipients to an existing group conversation. Response is similar to the GET/show action, except that only includes the latest message (e.g. “joe was added to the conversation by bob”)

Request Parameters:

Parameter Type Description
recipients[] Required string

An array of recipient ids. These may be user ids or course/group ids prefixed with “course_” or “group_” respectively, e.g. recipients[]=1&recipients=2&recipients[]=course_3

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "read",
  "last_message": "let's talk this over with jim",
  "last_message_at": "2011-09-02T12:00:00-06:00",
  "message_count": 2,
  "subscribed": true,
  "private": false,
  "starred": null,
  "properties": [],
  "audience": [2, 3, 4],
  "audience_contexts": {"courses": {"1": []}, "groups": {}},
  "avatar_url": "https://canvas.instructure.com/images/messages/avatar-group-50.png",
  "participants": [
    {"id": 1, "name": "Joe", "full_name": "Joe TA"},
    {"id": 2, "name": "Jane", "full_name": "Jane Teacher"},
    {"id": 3, "name": "Bob", "full_name": "Bob Student"},
    {"id": 4, "name": "Jim", "full_name": "Jim Admin"}
  ],
  "messages":
    [
      {
        "id": 4,
        "created_at": "2011-09-02T12:10:00Z",
        "body": "Jim was added to the conversation by Joe TA",
        "author_id": 1,
        "generated": true,
        "media_comment": null,
        "forwarded_messages": [],
        "attachments": []
      }
    ]
}

Add a message ConversationsController#add_message

POST /api/v1/conversations/:id/add_message

Scope: url:POST|/api/v1/conversations/:id/add_message

Add a message to an existing conversation. Response is similar to the GET/show action, except that only includes the latest message (i.e. what we just sent)

An array of user ids. Defaults to all of the current conversation recipients. To explicitly send a message to no other recipients, this array should consist of the logged-in user id.

An array of message ids from this conversation to send to recipients of the new message. Recipients who already had a copy of included messages will not be affected.

Request Parameters:

Parameter Type Description
body Required string

The message to be sent.

attachment_ids[] string

An array of attachments ids. These must be files that have been previously uploaded to the sender's “conversation attachments” folder.

media_comment_id string

Media comment id of an audio of video file to be associated with this message.

media_comment_type string

Type of the associated media file.

Allowed values: audio, video

recipients[] string

no description

included_messages[] string

no description

user_note boolean

Will add a faculty journal entry for each recipient as long as the user making the api call has permission, the recipient is a student and faculty journals are enabled in the account.

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "unread",
  "last_message": "let's talk this over with jim",
  "last_message_at": "2011-09-02T12:00:00-06:00",
  "message_count": 2,
  "subscribed": true,
  "private": false,
  "starred": null,
  "properties": [],
  "audience": [2, 3],
  "audience_contexts": {"courses": {"1": []}, "groups": {}},
  "avatar_url": "https://canvas.instructure.com/images/messages/avatar-group-50.png",
  "participants": [
    {"id": 1, "name": "Joe", "full_name": "Joe TA"},
    {"id": 2, "name": "Jane", "full_name": "Jane Teacher"},
    {"id": 3, "name": "Bob", "full_name": "Bob Student"}
  ],
  "messages":
    [
      {
        "id": 3,
        "created_at": "2011-09-02T12:00:00Z",
        "body": "let's talk this over with jim",
        "author_id": 2,
        "generated": false,
        "media_comment": null,
        "forwarded_messages": [],
        "attachments": []
      }
    ]
}

Delete a message ConversationsController#remove_messages

POST /api/v1/conversations/:id/remove_messages

Scope: url:POST|/api/v1/conversations/:id/remove_messages

Delete messages from this conversation. Note that this only affects this user's view of the conversation. If all messages are deleted, the conversation will be as well (equivalent to DELETE)

Request Parameters:

Parameter Type Description
remove[] Required string

Array of message ids to be deleted

Example Response:

{
  "id": 2,
  "subject": "conversations api example",
  "workflow_state": "read",
  "last_message": "sure thing, here's the file",
  "last_message_at": "2011-09-02T12:00:00-06:00",
  "message_count": 1,
  "subscribed": true,
  "private": true,
  "starred": null,
  "properties": ["attachments"]
}

Batch update conversations ConversationsController#batch_update

PUT /api/v1/conversations

Scope: url:PUT|/api/v1/conversations

Perform a change on a set of conversations. Operates asynchronously; use the progress endpoint to query the status of an operation.

Request Parameters:

Parameter Type Description
conversation_ids[] Required string

List of conversations to update. Limited to 500 conversations.

event Required string

The action to take on each conversation.

Allowed values: mark_as_read, mark_as_unread, star, unstar, archive, destroy

Example Request:

curl https://<canvas>/api/v1/conversations \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'event=mark_as_read' \
  -d 'conversation_ids[]=1' \
  -d 'conversation_ids[]=2'
Returns a Progress

Find recipients ConversationsController#find_recipients

GET /api/v1/conversations/find_recipients

Scope: url:GET|/api/v1/conversations/find_recipients

Deprecated, see the Find recipients endpoint in the Search API

Unread count ConversationsController#unread_count

GET /api/v1/conversations/unread_count

Scope: url:GET|/api/v1/conversations/unread_count

Get the number of unread conversations for the current user

Example Response:

{'unread_count': '7'}

Query by course. CourseAuditApiController#for_course

GET /api/v1/audit/course/courses/:course_id

Scope: url:GET|/api/v1/audit/course/courses/:course_id

List course change events for a given course.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events.

end_time DateTime

The end of the time range from which you want events.

Returns a list of CourseEvents

Set extensions for student quiz submissions Quizzes::CourseQuizExtensionsController#create

POST /api/v1/courses/:course_id/quiz_extensions

Scope: url:POST|/api/v1/courses/:course_id/quiz_extensions

Responses

  • 200 OK if the request was successful

  • 403 Forbidden if you are not allowed to extend quizzes for this course

Request Parameters:

Parameter Type Description
user_id Required integer

The ID of the user we want to add quiz extensions for.

extra_attempts integer

Number of times the student is allowed to re-take the quiz over the multiple-attempt limit. This is limited to 1000 attempts or less.

extra_time integer

The number of extra minutes to allow for all attempts. This will add to the existing time limit on the submission. This is limited to 10080 minutes (1 week)

manually_unlocked boolean

Allow the student to take the quiz even if it's locked for everyone else.

extend_from_now integer

The number of minutes to extend the quiz from the current time. This is mutually exclusive to extend_from_end_at. This is limited to 1440 minutes (24 hours)

extend_from_end_at integer

The number of minutes to extend the quiz beyond the quiz's current ending time. This is mutually exclusive to extend_from_now. This is limited to 1440 minutes (24 hours)

Example Request:

{
  "quiz_extensions": [{
    "user_id": 3,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": true
  },{
    "user_id": 2,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": false
  }]
}

{
  "quiz_extensions": [{
    "user_id": 3,
    "extend_from_now": 20
  }]
}

Example Response:

{
  "quiz_extensions": [QuizExtension]
}

List your courses CoursesController#index

GET /api/v1/courses

Scope: url:GET|/api/v1/courses

Returns the paginated list of active courses for the current user.

Request Parameters:

Parameter Type Description
enrollment_type string

When set, only return courses where the user is enrolled as this type. For example, set to “teacher” to return only courses where the user is enrolled as a Teacher. This argument is ignored if enrollment_role is given.

Allowed values: teacher, student, ta, observer, designer

enrollment_role string

Deprecated When set, only return courses where the user is enrolled with the specified course-level role. This can be a role created with the Add Role API or a base role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.

enrollment_role_id integer

When set, only return courses where the user is enrolled with the specified course-level role. This can be a role created with the Add Role API or a built_in role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.

enrollment_state string

When set, only return courses where the user has an enrollment with the given state. This will respect section/course/term date overrides.

Allowed values: active, invited_or_pending, completed

exclude_blueprint_courses boolean

When set, only return courses that are not configured as blueprint courses.

include[] string
  • “needs_grading_count”: Optional information to include with each Course. When needs_grading_count is given, and the current user has grading rights, the total number of submissions needing grading for all assignments is returned.

  • “syllabus_body”: Optional information to include with each Course. When syllabus_body is given the user-generated html for the course syllabus is returned.

  • “public_description”: Optional information to include with each Course. When public_description is given the user-generated text for the course public description is returned.

  • “total_scores”: Optional information to include with each Course. When total_scores is given, any student enrollments will also include the fields 'computed_current_score', 'computed_final_score', 'computed_current_grade', and 'computed_final_grade', as well as (if the user has permission) 'unposted_current_score', 'unposted_final_score', 'unposted_current_grade', and 'unposted_final_grade' (see Enrollment documentation for more information on these fields). This argument is ignored if the course is configured to hide final grades.

  • “current_grading_period_scores”: Optional information to include with each Course. When current_grading_period_scores is given and total_scores is given, any student enrollments will also include the fields 'has_grading_periods', 'totals_for_all_grading_periods_option', 'current_grading_period_title', 'current_grading_period_id', current_period_computed_current_score', 'current_period_computed_final_score', 'current_period_computed_current_grade', and 'current_period_computed_final_grade', as well as (if the user has permission) 'current_period_unposted_current_score', 'current_period_unposted_final_score', 'current_period_unposted_current_grade', and 'current_period_unposted_final_grade' (see Enrollment documentation for more information on these fields). In addition, when this argument is passed, the course will have a 'has_grading_periods' attribute on it. This argument is ignored if the course is configured to hide final grades or if the total_scores argument is not included.

  • “term”: Optional information to include with each Course. When term is given, the information for the enrollment term for each course is returned.

  • “account”: Optional information to include with each Course. When account is given, the account json for each course is returned.

  • “course_progress”: Optional information to include with each Course. When course_progress is given, each course will include a 'course_progress' object with the fields: 'requirement_count', an integer specifying the total number of requirements in the course, 'requirement_completed_count', an integer specifying the total number of requirements in this course that have been completed, and 'next_requirement_url', a string url to the next requirement item, and 'completed_at', the date the course was completed (null if incomplete). 'next_requirement_url' will be null if all requirements have been completed or the current module does not require sequential progress. “course_progress” will return an error message if the course is not module based or the user is not enrolled as a student in the course.

  • “sections”: Section enrollment information to include with each Course. Returns an array of hashes containing the section ID (id), section name (name), start and end dates (start_at, end_at), as well as the enrollment type (enrollment_role, e.g. 'StudentEnrollment').

  • “storage_quota_used_mb”: The amount of storage space used by the files in this course

  • “total_students”: Optional information to include with each Course. Returns an integer for the total amount of active and invited students.

  • “passback_status”: Include the grade passback_status

  • “favorites”: Optional information to include with each Course. Indicates if the user has marked the course as a favorite course.

  • “teachers”: Teacher information to include with each Course. Returns an array of hashes containing the UserDisplay information for each teacher in the course.

  • “observed_users”: Optional information to include with each Course. Will include data for observed users if the current user has an observer enrollment.

  • “tabs”: Optional information to include with each Course. Will include the list of tabs configured for each course. See the List available tabs API for more information.

  • “course_image”: Optional course image data for when there is a course image and the course image feature flag has been enabled

Allowed values: needs_grading_count, syllabus_body, public_description, total_scores, current_grading_period_scores, term, account, course_progress, sections, storage_quota_used_mb, total_students, passback_status, favorites, teachers, observed_users, course_image

state[] string

If set, only return courses that are in the given state(s). By default, “available” is returned for students and observers, and anything except “deleted”, for all other enrollment types

Allowed values: unpublished, available, completed, deleted

Returns a list of Courses

List courses for a user CoursesController#user_index

GET /api/v1/users/:user_id/courses

Scope: url:GET|/api/v1/users/:user_id/courses

Returns a paginated list of active courses for this user. To view the course list for a user other than yourself, you must be either an observer of that user or an administrator.

Request Parameters:

Parameter Type Description
include[] string
  • “needs_grading_count”: Optional information to include with each Course. When needs_grading_count is given, and the current user has grading rights, the total number of submissions needing grading for all assignments is returned.

  • “syllabus_body”: Optional information to include with each Course. When syllabus_body is given the user-generated html for the course syllabus is returned.

  • “public_description”: Optional information to include with each Course. When public_description is given the user-generated text for the course public description is returned.

  • “total_scores”: Optional information to include with each Course. When total_scores is given, any student enrollments will also include the fields 'computed_current_score', 'computed_final_score', 'computed_current_grade', and 'computed_final_grade' (see Enrollment documentation for more information on these fields). This argument is ignored if the course is configured to hide final grades.

  • “current_grading_period_scores”: Optional information to include with each Course. When current_grading_period_scores is given and total_scores is given, any student enrollments will also include the fields 'has_grading_periods', 'totals_for_all_grading_periods_option', 'current_grading_period_title', 'current_grading_period_id', current_period_computed_current_score', 'current_period_computed_final_score', 'current_period_computed_current_grade', and 'current_period_computed_final_grade', as well as (if the user has permission) 'current_period_unposted_current_score', 'current_period_unposted_final_score', 'current_period_unposted_current_grade', and 'current_period_unposted_final_grade' (see Enrollment documentation for more information on these fields). In addition, when this argument is passed, the course will have a 'has_grading_periods' attribute on it. This argument is ignored if the course is configured to hide final grades or if the total_scores argument is not included.

  • “term”: Optional information to include with each Course. When term is given, the information for the enrollment term for each course is returned.

  • “account”: Optional information to include with each Course. When account is given, the account json for each course is returned.

  • “course_progress”: Optional information to include with each Course. When course_progress is given, each course will include a 'course_progress' object with the fields: 'requirement_count', an integer specifying the total number of requirements in the course, 'requirement_completed_count', an integer specifying the total number of requirements in this course that have been completed, and 'next_requirement_url', a string url to the next requirement item, and 'completed_at', the date the course was completed (null if incomplete). 'next_requirement_url' will be null if all requirements have been completed or the current module does not require sequential progress. “course_progress” will return an error message if the course is not module based or the user is not enrolled as a student in the course.

  • “sections”: Section enrollment information to include with each Course. Returns an array of hashes containing the section ID (id), section name (name), start and end dates (start_at, end_at), as well as the enrollment type (enrollment_role, e.g. 'StudentEnrollment').

  • “storage_quota_used_mb”: The amount of storage space used by the files in this course

  • “total_students”: Optional information to include with each Course. Returns an integer for the total amount of active and invited students.

  • “passback_status”: Include the grade passback_status

  • “favorites”: Optional information to include with each Course. Indicates if the user has marked the course as a favorite course.

  • “teachers”: Teacher information to include with each Course. Returns an array of hashes containing the UserDisplay information for each teacher in the course.

  • “observed_users”: Optional information to include with each Course. Will include data for observed users if the current user has an observer enrollment.

  • “tabs”: Optional information to include with each Course. Will include the list of tabs configured for each course. See the List available tabs API for more information.

  • “course_image”: Optional course image data for when there is a course image and the course image feature flag has been enabled

Allowed values: needs_grading_count, syllabus_body, public_description, total_scores, current_grading_period_scores, term, account, course_progress, sections, storage_quota_used_mb, total_students, passback_status, favorites, teachers, observed_users, course_image

state[] string

If set, only return courses that are in the given state(s). By default, “available” is returned for students and observers, and anything except “deleted”, for all other enrollment types

Allowed values: unpublished, available, completed, deleted

enrollment_state string

When set, only return courses where the user has an enrollment with the given state. This will respect section/course/term date overrides.

Allowed values: active, invited_or_pending, completed

Returns a list of Courses

Create a new course CoursesController#create

POST /api/v1/accounts/:account_id/courses

Scope: url:POST|/api/v1/accounts/:account_id/courses

Create a new course

Request Parameters:

Parameter Type Description
course[name] string

The name of the course. If omitted, the course will be named “Unnamed Course.”

course[course_code] string

The course code for the course.

course[start_at] DateTime

Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z

course[end_at] DateTime

Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z

course[license] string

The name of the licensing. Should be one of the following abbreviations (a descriptive name is included in parenthesis for reference):

  • 'private' (Private Copyrighted)

  • 'cc_by_nc_nd' (CC Attribution Non-Commercial No Derivatives)

  • 'cc_by_nc_sa' (CC Attribution Non-Commercial Share Alike)

  • 'cc_by_nc' (CC Attribution Non-Commercial)

  • 'cc_by_nd' (CC Attribution No Derivatives)

  • 'cc_by_sa' (CC Attribution Share Alike)

  • 'cc_by' (CC Attribution)

  • 'public_domain' (Public Domain).

course[is_public] boolean

Set to true if course is public to both authenticated and unauthenticated users.

course[is_public_to_auth_users] boolean

Set to true if course is public only to authenticated users.

course[public_syllabus] boolean

Set to true to make the course syllabus public.

course[public_syllabus_to_auth] boolean

Set to true to make the course syllabus public for authenticated users.

course[public_description] string

A publicly visible description of the course.

course[allow_student_wiki_edits] boolean

If true, students will be able to modify the course wiki.

course[allow_wiki_comments] boolean

If true, course members will be able to comment on wiki pages.

course[allow_student_forum_attachments] boolean

If true, students can attach files to forum posts.

course[open_enrollment] boolean

Set to true if the course is open enrollment.

course[self_enrollment] boolean

Set to true if the course is self enrollment.

course[restrict_enrollments_to_course_dates] boolean

Set to true to restrict user enrollments to the start and end dates of the course.

course[term_id] integer

The unique ID of the term to create to course in.

course[sis_course_id] string

The unique SIS identifier.

course[integration_id] string

The unique Integration identifier.

course[hide_final_grades] boolean

If this option is set to true, the totals in student grades summary will be hidden.

course[apply_assignment_group_weights] boolean

Set to true to weight final grade based on assignment groups percentages.

course[time_zone] string

The time zone for the course. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

offer boolean

If this option is set to true, the course will be available to students immediately.

enroll_me boolean

Set to true to enroll the current user as the teacher.

course[default_view] string

The type of page that users will see when they first visit the course

  • 'feed' Recent Activity Dashboard

  • 'modules' Course Modules/Sections Page

  • 'assignments' Course Assignments List

  • 'syllabus' Course Syllabus Page

other types may be added in the future

Allowed values: feed, wiki, modules, syllabus, assignments

course[syllabus_body] string

The syllabus body for the course

course[grading_standard_id] integer

The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course.

course[course_format] string

Optional. Specifies the format of the course. (Should be 'on_campus', 'online', or 'blended')

enable_sis_reactivation boolean

When true, will first try to re-activate a deleted course with matching sis_course_id if possible.

Returns a Course

Upload a file CoursesController#create_file

POST /api/v1/courses/:course_id/files

Scope: url:POST|/api/v1/courses/:course_id/files

Upload a file to the course.

This API endpoint is the first step in uploading a file to a course. See the File Upload Documentation for details on the file upload workflow.

Only those with the “Manage Files” permission on a course can upload files to the course. By default, this is Teachers, TAs and Designers.

List students CoursesController#students

GET /api/v1/courses/:course_id/students

Scope: url:GET|/api/v1/courses/:course_id/students

Returns the paginated list of students enrolled in this course.

DEPRECATED: Please use the course users endpoint and pass “student” as the enrollment_type.

Returns a list of Users

List users in course CoursesController#users

GET /api/v1/courses/:course_id/users

Scope: url:GET|/api/v1/courses/:course_id/users

GET /api/v1/courses/:course_id/search_users

Scope: url:GET|/api/v1/courses/:course_id/search_users

Returns the paginated list of users in this course. And optionally the user's enrollments in the course.

Request Parameters:

Parameter Type Description
search_term string

The partial name or full ID of the users to match and return in the results list.

enrollment_type[] string

When set, only return users where the user is enrolled as this type. “student_view” implies include[]=test_student. This argument is ignored if enrollment_role is given.

Allowed values: teacher, student, student_view, ta, observer, designer

enrollment_role string

Deprecated When set, only return users enrolled with the specified course-level role. This can be a role created with the Add Role API or a base role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.

enrollment_role_id integer

When set, only return courses where the user is enrolled with the specified course-level role. This can be a role created with the Add Role API or a built_in role id with type 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', or 'DesignerEnrollment'.

include[] string
  • “email”: Optional user email.

  • “enrollments”:

Optionally include with each Course the user's current and invited enrollments. If the user is enrolled as a student, and the account has permission to manage or view all grades, each enrollment will include a 'grades' key with 'current_score', 'final_score', 'current_grade' and 'final_grade' values.

  • “locked”: Optionally include whether an enrollment is locked.

  • “avatar_url”: Optionally include avatar_url.

  • “bio”: Optionally include each user's bio.

  • “test_student”: Optionally include the course's Test Student,

if present. Default is to not include Test Student.

  • “custom_links”: Optionally include plugin-supplied custom links for each student,

such as analytics information

  • “current_grading_period_scores”: if enrollments is included as

well as this directive, the scores returned in the enrollment will be for the current grading period if there is one. A 'grading_period_id' value will also be included with the scores. if grading_period_id is nil there is no current grading period and the score is a total score.

Allowed values: email, enrollments, locked, avatar_url, test_student, bio, custom_links, current_grading_period_scores

user_id string

If this parameter is given and it corresponds to a user in the course, the page parameter will be ignored and the page containing the specified user will be returned instead.

user_ids[] integer

If included, the course users set will only include users with IDs specified by the param. Note: this will not work in conjunction with the “user_id” argument but multiple user_ids can be included.

enrollment_state[] string

When set, only return users where the enrollment workflow state is of one of the given types. “active” and “invited” enrollments are returned by default.

Allowed values: active, invited, rejected, completed, inactive

Returns a list of Users

List recently logged in students CoursesController#recent_students

GET /api/v1/courses/:course_id/recent_students

Scope: url:GET|/api/v1/courses/:course_id/recent_students

Returns the paginated list of users in this course, ordered by how recently they have logged in. The records include the 'last_login' field which contains a timestamp of the last time that user logged into canvas. The querying user must have the 'View usage reports' permission.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/<course_id>/recent_users
Returns a list of Users

Get single user CoursesController#user

GET /api/v1/courses/:course_id/users/:id

Scope: url:GET|/api/v1/courses/:course_id/users/:id

Return information on a single user.

Accepts the same include[] parameters as the :users: action, and returns a single user with the same fields as that action.

Returns a User

Preview processed html CoursesController#preview_html

POST /api/v1/courses/:course_id/preview_html

Scope: url:POST|/api/v1/courses/:course_id/preview_html

Preview html content processed for this course

Request Parameters:

Parameter Type Description
html string

The html content to process

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/preview_html \
     -F 'html=<p><badhtml></badhtml>processed html</p>' \
     -H 'Authorization: Bearer <token>'

Example Response:

{
  "html": "<p>processed html</p>"
}

Course activity stream CoursesController#activity_stream

GET /api/v1/courses/:course_id/activity_stream

Scope: url:GET|/api/v1/courses/:course_id/activity_stream

Returns the current user's course-specific activity stream, paginated.

For full documentation, see the API documentation for the user activity stream, in the user api.

Course activity stream summary CoursesController#activity_stream_summary

GET /api/v1/courses/:course_id/activity_stream/summary

Scope: url:GET|/api/v1/courses/:course_id/activity_stream/summary

Returns a summary of the current user's course-specific activity stream.

For full documentation, see the API documentation for the user activity stream summary, in the user api.

Course TODO items CoursesController#todo_items

GET /api/v1/courses/:course_id/todo

Scope: url:GET|/api/v1/courses/:course_id/todo

Returns the current user's course-specific todo items.

For full documentation, see the API documentation for the user todo items, in the user api.

Delete/Conclude a course CoursesController#destroy

DELETE /api/v1/courses/:id

Scope: url:DELETE|/api/v1/courses/:id

Delete or conclude an existing course

Request Parameters:

Parameter Type Description
event Required string

The action to take on the course.

Allowed values: delete, conclude

Example Response:

{ "delete": "true" }

Get course settings CoursesController#settings

GET /api/v1/courses/:course_id/settings

Scope: url:GET|/api/v1/courses/:course_id/settings

Returns some of a course's settings.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/settings \
  -X GET \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "allow_student_discussion_topics": true,
  "allow_student_forum_attachments": false,
  "allow_student_discussion_editing": true,
  "grading_standard_enabled": true,
  "grading_standard_id": 137,
  "allow_student_organized_groups": true,
  "hide_final_grades": false,
  "hide_distribution_graphs": false,
  "lock_all_announcements": true
}

Update course settings CoursesController#update_settings

PUT /api/v1/courses/:course_id/settings

Scope: url:PUT|/api/v1/courses/:course_id/settings

Can update the following course settings:

Request Parameters:

Parameter Type Description
allow_student_discussion_topics boolean

Let students create discussion topics

allow_student_forum_attachments boolean

Let students attach files to discussions

allow_student_discussion_editing boolean

Let students edit or delete their own discussion posts

allow_student_organized_groups boolean

Let students organize their own groups

hide_final_grades boolean

Hide totals in student grades summary

hide_distribution_graphs boolean

Hide grade distribution graphs from students

lock_all_announcements boolean

Disable comments on announcements

restrict_student_past_view boolean

Restrict students from viewing courses after end date

restrict_student_future_view boolean

Restrict students from viewing courses before start date

show_announcements_on_home_page boolean

Show the most recent announcements on the Course home page (if a Wiki, defaults to five announcements, configurable via home_page_announcement_limit)

home_page_announcement_limit integer

Limit the number of announcements on the home page if enabled via show_announcements_on_home_page

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/settings \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'allow_student_discussion_topics=false'

Get a single course CoursesController#show

GET /api/v1/courses/:id

Scope: url:GET|/api/v1/courses/:id

GET /api/v1/accounts/:account_id/courses/:id

Scope: url:GET|/api/v1/accounts/:account_id/courses/:id

Return information on a single course.

Accepts the same include[] parameters as the list action plus:

Request Parameters:

Parameter Type Description
include[] string
  • “all_courses”: Also search recently deleted courses.

  • “permissions”: Include permissions the current user has for the course.

  • “observed_users”: include observed users in the enrollments

  • “course_image”: Optional course image data for when there is a course image and the course image feature flag has been enabled

Allowed values: needs_grading_count, syllabus_body, public_description, total_scores, current_grading_period_scores, term, account, course_progress, sections, storage_quota_used_mb, total_students, passback_status, favorites, teachers, observed_users, all_courses, permissions, observed_users, course_image

Returns a Course

Update a course CoursesController#update

PUT /api/v1/courses/:id

Scope: url:PUT|/api/v1/courses/:id

Update an existing course.

Arguments are the same as Courses#create, with a few exceptions (enroll_me).

If a user has content management rights, but not full course editing rights, the only attribute editable through this endpoint will be “syllabus_body”

Request Parameters:

Parameter Type Description
course[account_id] integer

The unique ID of the account to move the course to.

course[name] string

The name of the course. If omitted, the course will be named “Unnamed Course.”

course[course_code] string

The course code for the course.

course[start_at] DateTime

Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z

course[end_at] DateTime

Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z

course[license] string

The name of the licensing. Should be one of the following abbreviations (a descriptive name is included in parenthesis for reference):

  • 'private' (Private Copyrighted)

  • 'cc_by_nc_nd' (CC Attribution Non-Commercial No Derivatives)

  • 'cc_by_nc_sa' (CC Attribution Non-Commercial Share Alike)

  • 'cc_by_nc' (CC Attribution Non-Commercial)

  • 'cc_by_nd' (CC Attribution No Derivatives)

  • 'cc_by_sa' (CC Attribution Share Alike)

  • 'cc_by' (CC Attribution)

  • 'public_domain' (Public Domain).

course[is_public] boolean

Set to true if course is public to both authenticated and unauthenticated users.

course[is_public_to_auth_users] boolean

Set to true if course is public only to authenticated users.

course[public_syllabus] boolean

Set to true to make the course syllabus public.

course[public_syllabus_to_auth] boolean

Set to true to make the course syllabus to public for authenticated users.

course[public_description] string

A publicly visible description of the course.

course[allow_student_wiki_edits] boolean

If true, students will be able to modify the course wiki.

course[allow_wiki_comments] boolean

If true, course members will be able to comment on wiki pages.

course[allow_student_forum_attachments] boolean

If true, students can attach files to forum posts.

course[open_enrollment] boolean

Set to true if the course is open enrollment.

course[self_enrollment] boolean

Set to true if the course is self enrollment.

course[restrict_enrollments_to_course_dates] boolean

Set to true to restrict user enrollments to the start and end dates of the course.

course[term_id] integer

The unique ID of the term to create to course in.

course[sis_course_id] string

The unique SIS identifier.

course[integration_id] string

The unique Integration identifier.

course[hide_final_grades] boolean

If this option is set to true, the totals in student grades summary will be hidden.

course[time_zone] string

The time zone for the course. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

course[apply_assignment_group_weights] boolean

Set to true to weight final grade based on assignment groups percentages.

course[storage_quota_mb] integer

Set the storage quota for the course, in megabytes. The caller must have the “Manage storage quotas” account permission.

offer boolean

If this option is set to true, the course will be available to students immediately.

course[event] string

The action to take on each course.

  • 'claim' makes a course no longer visible to students. This action is also called “unpublish” on the web site. A course cannot be unpublished if students have received graded submissions.

  • 'offer' makes a course visible to students. This action is also called “publish” on the web site.

  • 'conclude' prevents future enrollments and makes a course read-only for all participants. The course still appears in prior-enrollment lists.

  • 'delete' completely removes the course from the web site (including course menus and prior-enrollment lists). All enrollments are deleted. Course content may be physically deleted at a future date.

  • 'undelete' attempts to recover a course that has been deleted. (Recovery is not guaranteed; please conclude rather than delete a course if there is any possibility the course will be used again.) The recovered course will be unpublished. Deleted enrollments will not be recovered.

Allowed values: claim, offer, conclude, delete, undelete

course[default_view] string

The type of page that users will see when they first visit the course

  • 'feed' Recent Activity Dashboard

  • 'wiki' Wiki Front Page

  • 'modules' Course Modules/Sections Page

  • 'assignments' Course Assignments List

  • 'syllabus' Course Syllabus Page

other types may be added in the future

Allowed values: feed, wiki, modules, syllabus, assignments

course[syllabus_body] string

The syllabus body for the course

course[grading_standard_id] integer

The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course.

course[course_format] string

Optional. Specifies the format of the course. (Should be either 'on_campus' or 'online')

course[image_id] integer

This is a file ID corresponding to an image file in the course that will be used as the course image. This will clear the course's image_url setting if set. If you attempt to provide image_url and image_id in a request it will fail.

course[image_url] string

This is a URL to an image to be used as the course image. This will clear the course's image_id setting if set. If you attempt to provide image_url and image_id in a request it will fail.

course[remove_image] boolean

If this option is set to true, the course image url and course image ID are both set to nil

course[blueprint] boolean

Sets the course as a blueprint course. NOTE: The Blueprint Courses feature is in beta

course[blueprint_restrictions] BlueprintRestriction

Sets a default set to apply to blueprint course objects when restricted, unless use_blueprint_restrictions_by_object_type is enabled. See the Blueprint Restriction documentation

course[use_blueprint_restrictions_by_object_type] boolean

When enabled, the blueprint_restrictions parameter will be ignored in favor of the blueprint_restrictions_by_object_type parameter

course[blueprint_restrictions_by_object_type] multiple BlueprintRestrictions

Allows setting multiple Blueprint Restriction to apply to blueprint course objects of the matching type when restricted. The possible object types are “assignment”, “attachment”, “discussion_topic”, “quiz” and “wiki_page”. Example usage:

course[blueprint_restrictions_by_object_type][assignment][content]=1

Example Request:

curl https://<canvas>/api/v1/courses/<course_id> \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'course[name]=New course name' \
  -d 'course[start_at]=2012-05-05T00:00:00Z'

Example Response:

{
  "name": "New course name",
  "course_code": "COURSE-001",
  "start_at": "2012-05-05T00:00:00Z",
  "end_at": "2012-08-05T23:59:59Z",
  "sis_course_id": "12345"
}

Update courses CoursesController#batch_update

PUT /api/v1/accounts/:account_id/courses

Scope: url:PUT|/api/v1/accounts/:account_id/courses

Update multiple courses in an account. Operates asynchronously; use the progress endpoint to query the status of an operation.

The action to take on each course. Must be one of 'offer', 'conclude', 'delete', or 'undelete'.

* 'offer' makes a course visible to students. This action is also called "publish" on the web site.
* 'conclude' prevents future enrollments and makes a course read-only for all participants. The course still appears
  in prior-enrollment lists.
* 'delete' completely removes the course from the web site (including course menus and prior-enrollment lists).
  All enrollments are deleted. Course content may be physically deleted at a future date.
* 'undelete' attempts to recover a course that has been deleted. (Recovery is not guaranteed; please conclude
  rather than delete a course if there is any possibility the course will be used again.) The recovered course
  will be unpublished. Deleted enrollments will not be recovered.

Request Parameters:

Parameter Type Description
course_ids[] Required string

List of ids of courses to update. At most 500 courses may be updated in one call.

event Required string

no description

Allowed values: offer, conclude, delete, undelete

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/courses \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'event=offer' \
  -d 'course_ids[]=1' \
  -d 'course_ids[]=2'
Returns a Progress

Reset a course CoursesController#reset_content

POST /api/v1/courses/:course_id/reset_content

Scope: url:POST|/api/v1/courses/:course_id/reset_content

Deletes the current course, and creates a new equivalent course with no content, but all sections and users moved over.

Returns a Course

Get effective due dates CoursesController#effective_due_dates

GET /api/v1/courses/:course_id/effective_due_dates

Scope: url:GET|/api/v1/courses/:course_id/effective_due_dates

For each assignment in the course, returns each assigned student's ID and their corresponding due date along with some grading period data. Returns a collection with keys representing assignment IDs and values as a collection containing keys representing student IDs and values representing the student's effective due_at, the grading_period_id of which the due_at falls in, and whether or not the grading period is closed (in_closed_grading_period)

The list of assignment IDs for which effective student due dates are requested. If not provided, all assignments in the course will be used.

Request Parameters:

Parameter Type Description
assignment_ids[] string

no description

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/effective_due_dates
  -X GET \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "1": {
     "14": { "due_at": "2015-09-05", "grading_period_id": null, "in_closed_grading_period": false },
     "15": { due_at: null, "grading_period_id": 3, "in_closed_grading_period": true }
  },
  "2": {
     "14": { "due_at": "2015-08-05", "grading_period_id": 3, "in_closed_grading_period": true }
  }
}

Permissions CoursesController#permissions

GET /api/v1/courses/:course_id/permissions

Scope: url:GET|/api/v1/courses/:course_id/permissions

Returns permission information for the calling user in the given course. See also the Account counterpart.

Request Parameters:

Parameter Type Description
permissions[] string

List of permissions to check against the authenticated user. Permission names are documented in the Create a role endpoint.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/permissions \
  -H 'Authorization: Bearer <token>' \
  -d 'permissions[]=manage_grades'
  -d 'permissions[]=send_messages'

Example Response:

{'manage_grades': 'false', 'send_messages': 'true'}

Get course copy status ContentImportsController#copy_course_status

GET /api/v1/courses/:course_id/course_copy/:id

Scope: url:GET|/api/v1/courses/:course_id/course_copy/:id

DEPRECATED: Please use the Content Migrations API

Retrieve the status of a course copy

API response field:

  • id

    The unique identifier for the course copy.

  • created_at

    The time that the copy was initiated.

  • progress

    The progress of the copy as an integer. It is null before the copying starts, and 100 when finished.

  • workflow_state

    The current status of the course copy. Possible values: “created”, “started”, “completed”, “failed”

  • status_url

    The url for the course copy status API endpoint.

Example Response:

{'progress':100, 'workflow_state':'completed', 'id':257, 'created_at':'2011-11-17T16:50:06Z', 'status_url':'/api/v1/courses/9457/course_copy/257'}

Copy course content ContentImportsController#copy_course_content

POST /api/v1/courses/:course_id/course_copy

Scope: url:POST|/api/v1/courses/:course_id/course_copy

DEPRECATED: Please use the Content Migrations API

Copies content from one course into another. The default is to copy all course content. You can control specific types to copy by using either the 'except' option or the 'only' option.

The response is the same as the course copy status endpoint

Request Parameters:

Parameter Type Description
source_course string

ID or SIS-ID of the course to copy the content from

except[] string

A list of the course content types to exclude, all areas not listed will be copied.

Allowed values: course_settings, assignments, external_tools, files, topics, calendar_events, quizzes, wiki_pages, modules, outcomes

only[] string

A list of the course content types to copy, all areas not listed will not be copied.

Allowed values: course_settings, assignments, external_tools, files, topics, calendar_events, quizzes, wiki_pages, modules, outcomes

List custom gradebook columns CustomGradebookColumnsApiController#index

GET /api/v1/courses/:course_id/custom_gradebook_columns

Scope: url:GET|/api/v1/courses/:course_id/custom_gradebook_columns

A paginated list of all custom gradebook columns for a course

Request Parameters:

Parameter Type Description
include_hidden boolean

Include hidden parameters (defaults to false)

Returns a list of CustomColumns

Create a custom gradebook column CustomGradebookColumnsApiController#create

POST /api/v1/courses/:course_id/custom_gradebook_columns

Scope: url:POST|/api/v1/courses/:course_id/custom_gradebook_columns

Create a custom gradebook column

Request Parameters:

Parameter Type Description
column[title] Required string

no description

column[position] integer

The position of the column relative to other custom columns

column[hidden] boolean

Hidden columns are not displayed in the gradebook

column[teacher_notes] boolean

Set this if the column is created by a teacher. The gradebook only supports one teacher_notes column.

column[read_only] boolean

Set this to prevent the column from being editable in the gradebook ui

Returns a CustomColumn

Update a custom gradebook column CustomGradebookColumnsApiController#update

PUT /api/v1/courses/:course_id/custom_gradebook_columns/:id

Scope: url:PUT|/api/v1/courses/:course_id/custom_gradebook_columns/:id

Accepts the same parameters as custom gradebook column creation

Returns a CustomColumn

Delete a custom gradebook column CustomGradebookColumnsApiController#destroy

DELETE /api/v1/courses/:course_id/custom_gradebook_columns/:id

Scope: url:DELETE|/api/v1/courses/:course_id/custom_gradebook_columns/:id

Permanently deletes a custom column and its associated data

Returns a CustomColumn

Reorder custom columns CustomGradebookColumnsApiController#reorder

POST /api/v1/courses/:course_id/custom_gradebook_columns/reorder

Scope: url:POST|/api/v1/courses/:course_id/custom_gradebook_columns/reorder

Puts the given columns in the specified order

200 OK is returned if successful

Request Parameters:

Parameter Type Description
order[] Required integer

no description

List entries for a column CustomGradebookColumnDataApiController#index

GET /api/v1/courses/:course_id/custom_gradebook_columns/:id/data

Scope: url:GET|/api/v1/courses/:course_id/custom_gradebook_columns/:id/data

This does not list entries for students without associated data.

Request Parameters:

Parameter Type Description
include_hidden boolean

If true, hidden columns will be included in the result. If false or absent, only visible columns will be returned.

Returns a list of ColumnData

Update column data CustomGradebookColumnDataApiController#update

PUT /api/v1/courses/:course_id/custom_gradebook_columns/:id/data/:user_id

Scope: url:PUT|/api/v1/courses/:course_id/custom_gradebook_columns/:id/data/:user_id

Set the content of a custom column

Request Parameters:

Parameter Type Description
column_data[content] Required string

Column content. Setting this to blank will delete the datum object.

Returns a ColumnDatum

List discussion topics DiscussionTopicsController#index

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

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

GET /api/v1/groups/:group_id/discussion_topics

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics

Returns the paginated list of discussion topics for this course or group.

Request Parameters:

Parameter Type Description
include[] string

If “all_dates” is passed, all dates associated with graded discussions' assignments will be included. if “sections” is passed, includes the course sections that are associated with the topic, if the topic is specific to certain sections of the course. If “sections_user_count” is passed, then:

(a) If sections were asked for *and* the topic is specific to certain
    course sections, includes the number of users in each
    section. (as part of the section json asked for above)
(b) Else, includes at the root level the total number of users in the
    topic's context (group or course) that the topic applies to.

If “overrides” is passed, the overrides for the assignment will be included

Allowed values: all_dates, sections, sections_user_count, overrides

order_by string

Determines the order of the discussion topic list. Defaults to “position”.

Allowed values: position, recent_activity, title

scope string

Only return discussion topics in the given state(s). Defaults to including all topics. Filtering is done after pagination, so pages may be smaller than requested if topics are filtered. Can pass multiple states as comma separated string.

Allowed values: locked, unlocked, pinned, unpinned

only_announcements boolean

Return announcements instead of discussion topics. Defaults to false

filter_by string

The state of the discussion topic to return. Currently only supports unread state.

Allowed values: all, unread

search_term string

The partial title of the discussion topics to match and return.

exclude_context_module_locked_topics boolean

For students, exclude topics that are locked by module progression. Defaults to false.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/discussion_topics \
     -H 'Authorization: Bearer <token>'
Returns a list of DiscussionTopics

Create a new discussion topic DiscussionTopicsController#create

POST /api/v1/courses/:course_id/discussion_topics

Scope: url:POST|/api/v1/courses/:course_id/discussion_topics

POST /api/v1/groups/:group_id/discussion_topics

Scope: url:POST|/api/v1/groups/:group_id/discussion_topics

Create an new discussion topic for the course or group.

Request Parameters:

Parameter Type Description
title string

no description

message string

no description

discussion_type string

The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions.

Allowed values: side_comment, threaded

published boolean

Whether this topic is published (true) or draft state (false). Only teachers and TAs have the ability to create draft state topics.

delayed_post_at DateTime

If a timestamp is given, the topic will not be published until that time.

allow_rating boolean

Whether or not users can rate entries in this topic.

lock_at DateTime

If a timestamp is given, the topic will be scheduled to lock at the provided timestamp. If the timestamp is in the past, the topic will be locked.

podcast_enabled boolean

If true, the topic will have an associated podcast feed.

podcast_has_student_posts boolean

If true, the podcast will include posts from students as well. Implies podcast_enabled.

require_initial_post boolean

If true then a user may not respond to other replies until that user has made an initial reply. Defaults to false.

assignment Assignment

To create an assignment discussion, pass the assignment parameters as a sub-object. See the Create an Assignment API for the available parameters. The name parameter will be ignored, as it's taken from the discussion title. If you want to make a discussion that was an assignment NOT an assignment, pass set_assignment = false as part of the assignment object

is_announcement boolean

If true, this topic is an announcement. It will appear in the announcement's section rather than the discussions section. This requires announcment-posting permissions.

pinned boolean

If true, this topic will be listed in the “Pinned Discussion” section

position_after string

By default, discussions are sorted chronologically by creation date, you can pass the id of another topic to have this one show up after the other when they are listed.

group_category_id integer

If present, the topic will become a group discussion assigned to the group.

only_graders_can_rate boolean

If true, only graders will be allowed to rate entries.

sort_by_rating boolean

If true, entries will be sorted by rating.

attachment File

A multipart/form-data form-field-style attachment. Attachments larger than 1 kilobyte are subject to quota restrictions.

specific_sections string

A comma-separated list of sections ids to which the discussion topic should be made specific too. If it is not desired to make the discussion topic specific to sections, then this parameter may be omitted or set to “all”. Can only be present only on announcements and only those that are for a course (as opposed to a group).

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/discussion_topics \
    -F title='my topic' \
    -F message='initial message' \
    -F podcast_enabled=1 \
    -H 'Authorization: Bearer <token>'
    -F 'attachment=@<filename>' \

curl https://<canvas>/api/v1/courses/<course_id>/discussion_topics \
    -F title='my assignment topic' \
    -F message='initial message' \
    -F assignment[points_possible]=15 \
    -H 'Authorization: Bearer <token>'

Update a topic DiscussionTopicsController#update

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id

Update an existing discussion topic for the course or group.

Request Parameters:

Parameter Type Description
title string

no description

message string

no description

discussion_type string

The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions.

Allowed values: side_comment, threaded

published boolean

Whether this topic is published (true) or draft state (false). Only teachers and TAs have the ability to create draft state topics.

delayed_post_at DateTime

If a timestamp is given, the topic will not be published until that time.

lock_at DateTime

If a timestamp is given, the topic will be scheduled to lock at the provided timestamp. If the timestamp is in the past, the topic will be locked.

podcast_enabled boolean

If true, the topic will have an associated podcast feed.

podcast_has_student_posts boolean

If true, the podcast will include posts from students as well. Implies podcast_enabled.

require_initial_post boolean

If true then a user may not respond to other replies until that user has made an initial reply. Defaults to false.

assignment Assignment

To create an assignment discussion, pass the assignment parameters as a sub-object. See the Create an Assignment API for the available parameters. The name parameter will be ignored, as it's taken from the discussion title. If you want to make a discussion that was an assignment NOT an assignment, pass set_assignment = false as part of the assignment object

is_announcement boolean

If true, this topic is an announcement. It will appear in the announcement's section rather than the discussions section. This requires announcment-posting permissions.

pinned boolean

If true, this topic will be listed in the “Pinned Discussion” section

position_after string

By default, discussions are sorted chronologically by creation date, you can pass the id of another topic to have this one show up after the other when they are listed.

group_category_id integer

If present, the topic will become a group discussion assigned to the group.

allow_rating boolean

If true, users will be allowed to rate entries.

only_graders_can_rate boolean

If true, only graders will be allowed to rate entries.

sort_by_rating boolean

If true, entries will be sorted by rating.

specific_sections string

A comma-separated list of sections ids to which the discussion topic should be made specific too. If it is not desired to make the discussion topic specific to sections, then this parameter may be omitted or set to “all”. Can only be present only on announcements and only those that are for a course (as opposed to a group).

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id> \
    -F title='This will be positioned after Topic #1234' \
    -F position_after=1234 \
    -H 'Authorization: Bearer <token>'

Delete a topic DiscussionTopicsController#destroy

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id

Deletes the discussion topic. This will also delete the assignment, if it's an assignment discussion.

Example Request:

curl -X DELETE https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id> \
     -H 'Authorization: Bearer <token>'

Reorder pinned topics DiscussionTopicsController#reorder

POST /api/v1/courses/:course_id/discussion_topics/reorder

Scope: url:POST|/api/v1/courses/:course_id/discussion_topics/reorder

POST /api/v1/groups/:group_id/discussion_topics/reorder

Scope: url:POST|/api/v1/groups/:group_id/discussion_topics/reorder

Puts the pinned discussion topics in the specified order. All pinned topics should be included.

Request Parameters:

Parameter Type Description
order[] Required integer

The ids of the pinned discussion topics in the desired order. (For example, “order=104,102,103”.)

Update an entry DiscussionEntriesController#update

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:id

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:id

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:id

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:id

Update an existing discussion entry.

The entry must have been created by the current user, or the current user must have admin rights to the discussion. If the edit is not allowed, a 401 will be returned.

Request Parameters:

Parameter Type Description
message string

The updated body of the entry.

Example Request:

curl -X PUT 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>' \
     -F 'message=<message>' \
     -H "Authorization: Bearer <token>"

Delete an entry DiscussionEntriesController#destroy

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:id

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:id

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:id

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:id

Delete a discussion entry.

The entry must have been created by the current user, or the current user must have admin rights to the discussion. If the delete is not allowed, a 401 will be returned.

The discussion will be marked deleted, and the user_id and message will be cleared out.

Example Request:

curl -X DELETE 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>' \
     -H "Authorization: Bearer <token>"

Get a single topic DiscussionTopicsApiController#show

GET /api/v1/courses/:course_id/discussion_topics/:topic_id

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id

GET /api/v1/groups/:group_id/discussion_topics/:topic_id

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics/:topic_id

Returns data on an individual discussion topic. See the List action for the response formatting.

Request Parameters:

Parameter Type Description
include[] string

If “all_dates” is passed, all dates associated with graded discussions' assignments will be included. if “sections” is passed, includes the course sections that are associated with the topic, if the topic is specific to certain sections of the course. If “sections_user_count” is passed, then:

(a) If sections were asked for *and* the topic is specific to certain
    course sections, includes the number of users in each
    section. (as part of the section json asked for above)
(b) Else, includes at the root level the total number of users in the
    topic's context (group or course) that the topic applies to.

If “overrides” is passed, the overrides for the assignment will be included

Allowed values: all_dates, sections, sections_user_count, overrides

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id> \
    -H 'Authorization: Bearer <token>'

Get the full topic DiscussionTopicsApiController#view

GET /api/v1/courses/:course_id/discussion_topics/:topic_id/view

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/view

GET /api/v1/groups/:group_id/discussion_topics/:topic_id/view

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics/:topic_id/view

Return a cached structure of the discussion topic, containing all entries, their authors, and their message bodies.

May require (depending on the topic) that the user has posted in the topic. If it is required, and the user has not posted, will respond with a 403 Forbidden status and the body 'require_initial_post'.

In some rare situations, this cached structure may not be available yet. In that case, the server will respond with a 503 error, and the caller should try again soon.

The response is an object containing the following keys:

  • “participants”: A list of summary information on users who have posted to the discussion. Each value is an object containing their id, display_name, and avatar_url.

  • “unread_entries”: A list of entry ids that are unread by the current user. this implies that any entry not in this list is read.

  • “entry_ratings”: A map of entry ids to ratings by the current user. Entries not in this list have no rating. Only populated if rating is enabled.

  • “forced_entries”: A list of entry ids that have forced_read_state set to true. This flag is meant to indicate the entry's read_state has been manually set to 'unread' by the user, so the entry should not be automatically marked as read.

  • “view”: A threaded view of all the entries in the discussion, containing the id, user_id, and message.

  • “new_entries”: Because this view is eventually consistent, it's possible that newly created or updated entries won't yet be reflected in the view. If the application wants to also get a flat list of all entries not yet reflected in the view, pass include_new_entries=1 to the request and this array of entries will be returned. These entries are returned in a flat array, in ascending created_at order.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/view' \
     -H "Authorization: Bearer <token>"

Example Response:

{
  "unread_entries": [1,3,4],
  "entry_ratings": {3: 1},
  "forced_entries": [1],
  "participants": [
    { "id": 10, "display_name": "user 1", "avatar_image_url": "https://...", "html_url": "https://..." },
    { "id": 11, "display_name": "user 2", "avatar_image_url": "https://...", "html_url": "https://..." }
  ],
  "view": [
    { "id": 1, "user_id": 10, "parent_id": null, "message": "...html text...", "replies": [
      { "id": 3, "user_id": 11, "parent_id": 1, "message": "...html....", "replies": [...] }
    ]},
    { "id": 2, "user_id": 11, "parent_id": null, "message": "...html..." },
    { "id": 4, "user_id": 10, "parent_id": null, "message": "...html..." }
  ]
}

Post an entry DiscussionTopicsApiController#add_entry

POST /api/v1/courses/:course_id/discussion_topics/:topic_id/entries

Scope: url:POST|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries

POST /api/v1/groups/:group_id/discussion_topics/:topic_id/entries

Scope: url:POST|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries

Create a new entry in a discussion topic. Returns a json representation of the created entry (see documentation for 'entries' method) on success.

Request Parameters:

Parameter Type Description
message string

The body of the entry.

attachment string

a multipart/form-data form-field-style attachment. Attachments larger than 1 kilobyte are subject to quota restrictions.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries.json' \
     -F 'message=<message>' \
     -F 'attachment=@<filename>' \
     -H "Authorization: Bearer <token>"

List topic entries DiscussionTopicsApiController#entries

GET /api/v1/courses/:course_id/discussion_topics/:topic_id/entries

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries

GET /api/v1/groups/:group_id/discussion_topics/:topic_id/entries

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries

Retrieve the (paginated) top-level entries in a discussion topic.

May require (depending on the topic) that the user has posted in the topic. If it is required, and the user has not posted, will respond with a 403 Forbidden status and the body 'require_initial_post'.

Will include the 10 most recent replies, if any, for each entry returned.

If the topic is a root topic with children corresponding to groups of a group assignment, entries from those subtopics for which the user belongs to the corresponding group will be returned.

Ordering of returned entries is newest-first by posting timestamp (reply activity is ignored).

API response field:

  • id

    The unique identifier for the entry.

  • user_id

    The unique identifier for the author of the entry.

  • editor_id

    The unique user id of the person to last edit the entry, if different than user_id.

  • user_name

    The name of the author of the entry.

  • message

    The content of the entry.

  • read_state

    The read state of the entry, “read” or “unread”.

  • forced_read_state

    Whether the read_state was forced (was set manually)

  • created_at

    The creation time of the entry, in ISO8601 format.

  • updated_at

    The updated time of the entry, in ISO8601 format.

  • attachment

    JSON representation of the attachment for the entry, if any. Present only if there is an attachment.

  • attachments

    Deprecated. Same as attachment, but returned as a one-element array. Present only if there is an attachment.

  • recent_replies

    The 10 most recent replies for the entry, newest first. Present only if there is at least one reply.

  • has_more_replies

    True if there are more than 10 replies for the entry (i.e., not all were included in this response). Present only if there is at least one reply.

Example Response:

[ {
    "id": 1019,
    "user_id": 7086,
    "user_name": "nobody@example.com",
    "message": "Newer entry",
    "read_state": "read",
    "forced_read_state": false,
    "created_at": "2011-11-03T21:33:29Z",
    "attachment": {
      "content-type": "unknown/unknown",
      "url": "http://www.example.com/files/681/download?verifier=JDG10Ruitv8o6LjGXWlxgOb5Sl3ElzVYm9cBKUT3",
      "filename": "content.txt",
      "display_name": "content.txt" } },
  {
    "id": 1016,
    "user_id": 7086,
    "user_name": "nobody@example.com",
    "message": "first top-level entry",
    "read_state": "unread",
    "forced_read_state": false,
    "created_at": "2011-11-03T21:32:29Z",
    "recent_replies": [
      {
        "id": 1017,
        "user_id": 7086,
        "user_name": "nobody@example.com",
        "message": "Reply message",
        "created_at": "2011-11-03T21:32:29Z"
      } ],
    "has_more_replies": false } ]

Post a reply DiscussionTopicsApiController#add_reply

POST /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/replies

Scope: url:POST|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/replies

POST /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/replies

Scope: url:POST|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/replies

Add a reply to an entry in a discussion topic. Returns a json representation of the created reply (see documentation for 'replies' method) on success.

May require (depending on the topic) that the user has posted in the topic. If it is required, and the user has not posted, will respond with a 403 Forbidden status and the body 'require_initial_post'.

Request Parameters:

Parameter Type Description
message string

The body of the entry.

attachment string

a multipart/form-data form-field-style attachment. Attachments larger than 1 kilobyte are subject to quota restrictions.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>/replies.json' \
     -F 'message=<message>' \
     -F 'attachment=@<filename>' \
     -H "Authorization: Bearer <token>"

List entry replies DiscussionTopicsApiController#replies

GET /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/replies

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/replies

GET /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/replies

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/replies

Retrieve the (paginated) replies to a top-level entry in a discussion topic.

May require (depending on the topic) that the user has posted in the topic. If it is required, and the user has not posted, will respond with a 403 Forbidden status and the body 'require_initial_post'.

Ordering of returned entries is newest-first by creation timestamp.

API response field:

  • id

    The unique identifier for the reply.

  • user_id

    The unique identifier for the author of the reply.

  • editor_id

    The unique user id of the person to last edit the entry, if different than user_id.

  • user_name

    The name of the author of the reply.

  • message

    The content of the reply.

  • read_state

    The read state of the entry, “read” or “unread”.

  • forced_read_state

    Whether the read_state was forced (was set manually)

  • created_at

    The creation time of the reply, in ISO8601 format.

Example Response:

[ {
    "id": 1015,
    "user_id": 7084,
    "user_name": "nobody@example.com",
    "message": "Newer message",
    "read_state": "read",
    "forced_read_state": false,
    "created_at": "2011-11-03T21:27:44Z" },
  {
    "id": 1014,
    "user_id": 7084,
    "user_name": "nobody@example.com",
    "message": "Older message",
    "read_state": "unread",
    "forced_read_state": false,
    "created_at": "2011-11-03T21:26:44Z" } ]

List entries DiscussionTopicsApiController#entry_list

GET /api/v1/courses/:course_id/discussion_topics/:topic_id/entry_list

Scope: url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/entry_list

GET /api/v1/groups/:group_id/discussion_topics/:topic_id/entry_list

Scope: url:GET|/api/v1/groups/:group_id/discussion_topics/:topic_id/entry_list

Retrieve a paginated list of discussion entries, given a list of ids.

May require (depending on the topic) that the user has posted in the topic. If it is required, and the user has not posted, will respond with a 403 Forbidden status and the body 'require_initial_post'.

Request Parameters:

Parameter Type Description
ids[] string

A list of entry ids to retrieve. Entries will be returned in id order, smallest id first.

API response field:

  • id

    The unique identifier for the reply.

  • user_id

    The unique identifier for the author of the reply.

  • user_name

    The name of the author of the reply.

  • message

    The content of the reply.

  • read_state

    The read state of the entry, “read” or “unread”.

  • forced_read_state

    Whether the read_state was forced (was set manually)

  • created_at

    The creation time of the reply, in ISO8601 format.

  • deleted

    If the entry has been deleted, returns true. The user_id, user_name, and message will not be returned for deleted entries.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entry_list?ids[]=1&ids[]=2&ids[]=3' \
     -H "Authorization: Bearer <token>"

Example Response:

[
  { ... entry 1 ... },
  { ... entry 2 ... },
  { ... entry 3 ... },
]

Mark topic as read DiscussionTopicsApiController#mark_topic_read

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id/read

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id/read

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id/read

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id/read

Mark the initial text of the discussion topic as read.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/read.json' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0"

Mark topic as unread DiscussionTopicsApiController#mark_topic_unread

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id/read

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id/read

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id/read

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id/read

Mark the initial text of the discussion topic as unread.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/read.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"

Mark all entries as read DiscussionTopicsApiController#mark_all_read

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id/read_all

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id/read_all

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id/read_all

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id/read_all

Mark the discussion topic and all its entries as read.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
forced_read_state boolean

A boolean value to set all of the entries' forced_read_state. No change is made if this argument is not specified.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/read_all.json' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0"

Mark all entries as unread DiscussionTopicsApiController#mark_all_unread

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id/read_all

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id/read_all

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id/read_all

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id/read_all

Mark the discussion topic and all its entries as unread.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
forced_read_state boolean

A boolean value to set all of the entries' forced_read_state. No change is made if this argument is not specified.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/read_all.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"

Mark entry as read DiscussionTopicsApiController#mark_entry_read

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/read

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/read

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/read

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/read

Mark a discussion entry as read.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
forced_read_state boolean

A boolean value to set the entry's forced_read_state. No change is made if this argument is not specified.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>/read.json' \
     -X PUT \
     -H "Authorization: Bearer <token>"\
     -H "Content-Length: 0"

Mark entry as unread DiscussionTopicsApiController#mark_entry_unread

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/read

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/read

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/read

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/read

Mark a discussion entry as unread.

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
forced_read_state boolean

A boolean value to set the entry's forced_read_state. No change is made if this argument is not specified.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>/read.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"

Rate entry DiscussionTopicsApiController#rate_entry

POST /api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/rating

Scope: url:POST|/api/v1/courses/:course_id/discussion_topics/:topic_id/entries/:entry_id/rating

POST /api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/rating

Scope: url:POST|/api/v1/groups/:group_id/discussion_topics/:topic_id/entries/:entry_id/rating

Rate a discussion entry.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
rating integer

A rating to set on this entry. Only 0 and 1 are accepted.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/entries/<entry_id>/rating.json' \
     -X POST \
     -H "Authorization: Bearer <token>"

Subscribe to a topic DiscussionTopicsApiController#subscribe_topic

PUT /api/v1/courses/:course_id/discussion_topics/:topic_id/subscribed

Scope: url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id/subscribed

PUT /api/v1/groups/:group_id/discussion_topics/:topic_id/subscribed

Scope: url:PUT|/api/v1/groups/:group_id/discussion_topics/:topic_id/subscribed

Subscribe to a topic to receive notifications about new entries

On success, the response will be 204 No Content with an empty body

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/subscribed.json' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0"

Unsubscribe from a topic DiscussionTopicsApiController#unsubscribe_topic

DELETE /api/v1/courses/:course_id/discussion_topics/:topic_id/subscribed

Scope: url:DELETE|/api/v1/courses/:course_id/discussion_topics/:topic_id/subscribed

DELETE /api/v1/groups/:group_id/discussion_topics/:topic_id/subscribed

Scope: url:DELETE|/api/v1/groups/:group_id/discussion_topics/:topic_id/subscribed

Unsubscribe from a topic to stop receiving notifications about new entries

On success, the response will be 204 No Content with an empty body

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/discussion_topics/<topic_id>/subscribed.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"

Create enrollment term TermsController#create

POST /api/v1/accounts/:account_id/terms

Scope: url:POST|/api/v1/accounts/:account_id/terms

Create a new enrollment term for the specified account.

Request Parameters:

Parameter Type Description
enrollment_term[name] string

The name of the term.

enrollment_term[start_at] DateTime

The day/time the term starts. Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z.

enrollment_term[end_at] DateTime

The day/time the term ends. Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z.

enrollment_term[sis_term_id] string

The unique SIS identifier for the term.

enrollment_term[overrides][enrollment_type][start_at] DateTime

The day/time the term starts, overridden for the given enrollment type. enrollment_type can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment

enrollment_term[overrides][enrollment_type][end_at] DateTime

The day/time the term ends, overridden for the given enrollment type. enrollment_type can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment

Returns a EnrollmentTerm

Update enrollment term TermsController#update

PUT /api/v1/accounts/:account_id/terms/:id

Scope: url:PUT|/api/v1/accounts/:account_id/terms/:id

Update an existing enrollment term for the specified account.

Request Parameters:

Parameter Type Description
enrollment_term[name] string

The name of the term.

enrollment_term[start_at] DateTime

The day/time the term starts. Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z.

enrollment_term[end_at] DateTime

The day/time the term ends. Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z.

enrollment_term[sis_term_id] string

The unique SIS identifier for the term.

enrollment_term[overrides][enrollment_type][start_at] DateTime

The day/time the term starts, overridden for the given enrollment type. enrollment_type can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment

enrollment_term[overrides][enrollment_type][end_at] DateTime

The day/time the term ends, overridden for the given enrollment type. enrollment_type can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment

Returns a EnrollmentTerm

Delete enrollment term TermsController#destroy

DELETE /api/v1/accounts/:account_id/terms/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/terms/:id

Delete the specified enrollment term.

Returns a EnrollmentTerm

List enrollment terms TermsApiController#index

GET /api/v1/accounts/:account_id/terms

Scope: url:GET|/api/v1/accounts/:account_id/terms

A paginated list of all of the terms in the account.

Request Parameters:

Parameter Type Description
workflow_state[] string

If set, only returns terms that are in the given state. Defaults to 'active'.

Allowed values: active, deleted, all

include[] string

Array of additional information to include.

“overrides”

term start/end dates overridden for different enrollment types

Allowed values: overrides

Example Request:

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/accounts/1/terms?include[]=overrides

Example Response:

{
  "enrollment_terms": [
    {
      "id": 1,
      "name": "Fall 20X6"
      "start_at": "2026-08-31T20:00:00Z",
      "end_at": "2026-12-20T20:00:00Z",
      "created_at": "2025-01-02T03:43:11Z",
      "workflow_state": "active",
      "grading_period_group_id": 1,
      "sis_term_id": null,
      "overrides": {
        "StudentEnrollment": {
          "start_at": "2026-09-03T20:00:00Z",
          "end_at": "2026-12-19T20:00:00Z"
        },
        "TeacherEnrollment": {
          "start_at": null,
          "end_at": "2026-12-30T20:00:00Z"
        }
      }
    }
  ]
}
Returns a list of EnrollmentTerms

List enrollments EnrollmentsApiController#index

GET /api/v1/courses/:course_id/enrollments

Scope: url:GET|/api/v1/courses/:course_id/enrollments

GET /api/v1/sections/:section_id/enrollments

Scope: url:GET|/api/v1/sections/:section_id/enrollments

GET /api/v1/users/:user_id/enrollments

Scope: url:GET|/api/v1/users/:user_id/enrollments

Depending on the URL given, return a paginated list of either (1) all of the enrollments in a course, (2) all of the enrollments in a section or (3) all of a user's enrollments. This includes student, teacher, TA, and observer enrollments.

If a user has multiple enrollments in a context (e.g. as a teacher and a student or in multiple course sections), each enrollment will be listed separately.

note: Currently, only a root level admin user can return other users' enrollments. A user can, however, return his/her own enrollments.

Request Parameters:

Parameter Type Description
type[] string

A list of enrollment types to return. Accepted values are 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'DesignerEnrollment', and 'ObserverEnrollment.' If omitted, all enrollment types are returned. This argument is ignored if `role` is given.

role[] string

A list of enrollment roles to return. Accepted values include course-level roles created by the Add Role API as well as the base enrollment types accepted by the `type` argument above.

state[] string

Filter by enrollment state. If omitted, 'active' and 'invited' enrollments are returned. When querying a user's enrollments (either via user_id argument or via user enrollments endpoint), the following additional synthetic states are supported: “current_and_invited”|“current_and_future”|“current_and_concluded”

Allowed values: active, invited, creation_pending, deleted, rejected, completed, inactive

include[] string

Array of additional information to include on the enrollment or user records. “avatar_url” and “group_ids” will be returned on the user record.

Allowed values: avatar_url, group_ids, locked, observed_users, can_be_removed

user_id string

Filter by user_id (only valid for course or section enrollment queries). If set to the current user's id, this is a way to determine if the user has any enrollments in the course or section, independent of whether the user has permission to view other people on the roster.

grading_period_id integer

Return grades for the given grading_period. If this parameter is not specified, the returned grades will be for the whole course.

enrollment_term_id integer

Returns only enrollments for the specified enrollment term. This parameter only applies to the user enrollments path. May pass the ID from the enrollment terms api or the SIS id prepended with 'sis_term_id:'.

sis_account_id[] string

Returns only enrollments for the specified SIS account ID(s). Does not look into sub_accounts. May pass in array or string.

sis_course_id[] string

Returns only enrollments matching the specified SIS course ID(s). May pass in array or string.

sis_section_id[] string

Returns only section enrollments matching the specified SIS section ID(s). May pass in array or string.

sis_user_id[] string

Returns only enrollments for the specified SIS user ID(s). May pass in array or string.

Returns a list of Enrollments

Enrollment by ID EnrollmentsApiController#show

GET /api/v1/accounts/:account_id/enrollments/:id

Scope: url:GET|/api/v1/accounts/:account_id/enrollments/:id

Get an Enrollment object by Enrollment ID

Request Parameters:

Parameter Type Description
id Required integer

The ID of the enrollment object

Returns a Enrollment

Enroll a user EnrollmentsApiController#create

POST /api/v1/courses/:course_id/enrollments

Scope: url:POST|/api/v1/courses/:course_id/enrollments

POST /api/v1/sections/:section_id/enrollments

Scope: url:POST|/api/v1/sections/:section_id/enrollments

Create a new user enrollment for a course or section.

Request Parameters:

Parameter Type Description
enrollment[user_id] Required string

The ID of the user to be enrolled in the course.

enrollment[type] Required string

Enroll the user as a student, teacher, TA, observer, or designer. If no value is given, the type will be inferred by enrollment if supplied, otherwise 'StudentEnrollment' will be used.

Allowed values: StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment

enrollment[role] Deprecated

Assigns a custom course-level role to the user.

enrollment[role_id] integer

Assigns a custom course-level role to the user.

enrollment[enrollment_state] string

If set to 'active,' student will be immediately enrolled in the course. Otherwise they will be required to accept a course invitation. Default is 'invited.'.

If set to 'inactive', student will be listed in the course roster for teachers, but will not be able to participate in the course until their enrollment is activated.

Allowed values: active, invited, inactive

enrollment[course_section_id] integer

The ID of the course section to enroll the student in. If the section-specific URL is used, this argument is redundant and will be ignored.

enrollment[limit_privileges_to_course_section] boolean

If set, the enrollment will only allow the user to see and interact with users enrolled in the section given by course_section_id.

  • For teachers and TAs, this includes grading privileges.

  • Section-limited students will not see any users (including teachers and TAs) not enrolled in their sections.

  • Users may have other enrollments that grant privileges to multiple sections in the same course.

enrollment[notify] boolean

If true, a notification will be sent to the enrolled user. Notifications are not sent by default.

enrollment[self_enrollment_code] string

If the current user is not allowed to manage enrollments in this course, but the course allows self-enrollment, the user can self- enroll as a student in the default section by passing in a valid code. When self-enrolling, the user_id must be 'self'. The enrollment_state will be set to 'active' and all other arguments will be ignored.

enrollment[self_enrolled] boolean

If true, marks the enrollment as a self-enrollment, which gives students the ability to drop the course if desired. Defaults to false.

enrollment[associated_user_id] integer

For an observer enrollment, the ID of a student to observe. The caller must have manage_students permission in the course. This is a one-off operation; to automatically observe all a student's enrollments (for example, as a parent), please use the User Observees API.

Example Request:

curl https://<canvas>/api/v1/courses/:course_id/enrollments \
  -X POST \
  -F 'enrollment[user_id]=1' \
  -F 'enrollment[type]=StudentEnrollment' \
  -F 'enrollment[enrollment_state]=active' \
  -F 'enrollment[course_section_id]=1' \
  -F 'enrollment[limit_privileges_to_course_section]=true' \
  -F 'enrollment[notify]=false'

curl https://<canvas>/api/v1/courses/:course_id/enrollments \
  -X POST \
  -F 'enrollment[user_id]=2' \
  -F 'enrollment[type]=StudentEnrollment'
Returns a Enrollment

Conclude, deactivate, or delete an enrollment EnrollmentsApiController#destroy

DELETE /api/v1/courses/:course_id/enrollments/:id

Scope: url:DELETE|/api/v1/courses/:course_id/enrollments/:id

Conclude, deactivate, or delete an enrollment. If the task argument isn't given, the enrollment will be concluded.

Request Parameters:

Parameter Type Description
task string

The action to take on the enrollment. When inactive, a user will still appear in the course roster to admins, but be unable to participate. (“inactivate” and “deactivate” are equivalent tasks)

Allowed values: conclude, delete, inactivate, deactivate

Example Request:

curl https://<canvas>/api/v1/courses/:course_id/enrollments/:enrollment_id \
  -X DELETE \
  -F 'task=conclude'
Returns a Enrollment

Accept Course Invitation EnrollmentsApiController#accept

POST /api/v1/courses/:course_id/enrollments/:id/accept

Scope: url:POST|/api/v1/courses/:course_id/enrollments/:id/accept

accepts a pending course invitation for the current user

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/enrollments/:id/accept \
  -X POST \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "success": true
}

Reject Course Invitation EnrollmentsApiController#reject

POST /api/v1/courses/:course_id/enrollments/:id/reject

Scope: url:POST|/api/v1/courses/:course_id/enrollments/:id/reject

rejects a pending course invitation for the current user

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/enrollments/:id/reject \
  -X POST \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "success": true
}

Re-activate an enrollment EnrollmentsApiController#reactivate

PUT /api/v1/courses/:course_id/enrollments/:id/reactivate

Scope: url:PUT|/api/v1/courses/:course_id/enrollments/:id/reactivate

Activates an inactive enrollment

Example Request:

curl https://<canvas>/api/v1/courses/:course_id/enrollments/:enrollment_id/reactivate \
  -X PUT
Returns a Enrollment

Adds last attended date to student enrollment in course EnrollmentsApiController#last_attended

PUT /api/v1/courses/:course_id/users/:user_id/last_attended

Scope: url:PUT|/api/v1/courses/:course_id/users/:user_id/last_attended

Create Error Report ErrorsController#create

POST /api/v1/error_reports

Scope: url:POST|/api/v1/error_reports

Create a new error report documenting an experienced problem

Performs the same action as when a user uses the “help -> report a problem” dialog.

Request Parameters:

Parameter Type Description
error[subject] Required string

The summary of the problem

error[url] string

URL from which the report was issued

error[email] string

Email address for the reporting user

error[comments] string

The long version of the story from the user one what they experienced

error[http_env] SerializedHash

A collection of metadata about the users' environment. If not provided, canvas will collect it based on information found in the request. (Doesn't have to be HTTPENV info, could be anything JSON object that can be serialized as a hash, a mobile app might include relevant metadata for itself)

Example Request:

# Create error report
curl 'https://<canvas>/api/v1/error_reports' \
      -X POST \
      -F 'error[subject]="things are broken"' \
      -F 'error[url]=http://<canvas>/courses/1' \
      -F 'error[description]="All my thoughts on what I saw"' \
      -H 'Authorization: Bearer <token>'

List external tools ExternalToolsController#index

GET /api/v1/courses/:course_id/external_tools

Scope: url:GET|/api/v1/courses/:course_id/external_tools

GET /api/v1/accounts/:account_id/external_tools

Scope: url:GET|/api/v1/accounts/:account_id/external_tools

GET /api/v1/groups/:group_id/external_tools

Scope: url:GET|/api/v1/groups/:group_id/external_tools

Returns the paginated list of external tools for the current context. See the get request docs for a single tool for a list of properties on an external tool.

Request Parameters:

Parameter Type Description
search_term string

The partial name of the tools to match and return.

selectable boolean

If true, then only tools that are meant to be selectable are returned

include_parents boolean

If true, then include tools installed in all accounts above the current context

Example Response:

[
 {
   "id": 1,
   "domain": "domain.example.com",
   "url": "http://www.example.com/ims/lti",
   "consumer_key": "key",
   "name": "LTI Tool",
   "description": "This is for cool things",
   "created_at": "2037-07-21T13:29:31Z",
   "updated_at": "2037-07-28T19:38:31Z",
   "privacy_level": "anonymous",
   "custom_fields": {"key": "value"},
   "account_navigation": {
        "canvas_icon_class": "icon-lti",
        "icon_url": "...",
        "text": "...",
        "url": "...",
        "label": "...",
        "selection_width": 50,
        "selection_height":50
   },
   "assignment_selection": null,
   "course_home_sub_navigation": null,
   "course_navigation": {
        "canvas_icon_class": "icon-lti",
        "icon_url": "...",
        "text": "...",
        "url": "...",
        "default": "disabled",
        "enabled": "true",
        "visibility": "public",
        "windowTarget": "_blank"
   },
   "editor_button": {
        "canvas_icon_class": "icon-lti",
        "icon_url": "...",
        "message_type": "ContentItemSelectionRequest",
        "text": "...",
        "url": "...",
        "label": "...",
        "selection_width": 50,
        "selection_height": 50
   },
   "homework_submission": null,
   "link_selection": null,
   "migration_selection": null,
   "resource_selection": null,
   "tool_configuration": null,
   "user_navigation": null,
   "selection_width": 500,
   "selection_height": 500,
   "icon_url": "...",
   "not_selectable": false
 },
 { ...  }
]

Get a sessionless launch url for an external tool. ExternalToolsController#generate_sessionless_launch

GET /api/v1/courses/:course_id/external_tools/sessionless_launch

Scope: url:GET|/api/v1/courses/:course_id/external_tools/sessionless_launch

GET /api/v1/accounts/:account_id/external_tools/sessionless_launch

Scope: url:GET|/api/v1/accounts/:account_id/external_tools/sessionless_launch

Returns a sessionless launch url for an external tool.

NOTE: Either the id or url must be provided unless launch_type is assessment or module_item.

Request Parameters:

Parameter Type Description
id string

The external id of the tool to launch.

url string

The LTI launch url for the external tool.

assignment_id string

The assignment id for an assignment launch. Required if launch_type is set to “assessment”.

module_item_id string

The assignment id for a module item launch. Required if launch_type is set to “module_item”.

launch_type string

The type of launch to perform on the external tool. Placement names (eg. “course_navigation”) can also be specified to use the custom launch url for that placement; if done, the tool id must be provided.

Allowed values: assessment, module_item

API response field:

  • id

    The id for the external tool to be launched.

  • name

    The name of the external tool to be launched.

  • url

    The url to load to launch the external tool for the user.

Example Request:

Finds the tool by id and returns a sessionless launch url
curl 'https://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'id=<external_tool_id>'

Finds the tool by launch url and returns a sessionless launch url
curl 'https://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'url=<lti launch url>'

Finds the tool associated with a specific assignment and returns a sessionless launch url
curl 'https://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'launch_type=assessment' \
     -F 'assignment_id=<assignment_id>'

Finds the tool associated with a specific module item and returns a sessionless launch url
curl 'https://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'launch_type=module_item' \
     -F 'module_item_id=<module_item_id>'

Finds the tool by id and returns a sessionless launch url for a specific placement
curl 'https://<canvas>/api/v1/courses/<course_id>/external_tools/sessionless_launch' \
     -H "Authorization: Bearer <token>" \
     -F 'id=<external_tool_id>' \
     -F 'launch_type=<placement_name>'

Get a single external tool ExternalToolsController#show

GET /api/v1/courses/:course_id/external_tools/:external_tool_id

Scope: url:GET|/api/v1/courses/:course_id/external_tools/:external_tool_id

GET /api/v1/accounts/:account_id/external_tools/:external_tool_id

Scope: url:GET|/api/v1/accounts/:account_id/external_tools/:external_tool_id

Returns the specified external tool.

API response field:

  • id

    The unique identifier for the tool

  • domain

    The domain to match links against

  • url

    The url to match links against

  • consumer_key

    The consumer key used by the tool (The associated shared secret is not returned)

  • name

    The name of the tool

  • description

    A description of the tool

  • created_at

    Timestamp of creation

  • updated_at

    Timestamp of last update

  • privacy_level

    What information to send to the external tool, “anonymous”, “name_only”, “public”

  • custom_fields

    Custom fields that will be sent to the tool consumer

  • account_navigation

    The configuration for account navigation links (see create API for values)

  • assignment_selection

    The configuration for assignment selection links (see create API for values)

  • course_home_sub_navigation

    The configuration for course home navigation links (see create API for values)

  • course_navigation

    The configuration for course navigation links (see create API for values)

  • editor_button

    The configuration for a WYSIWYG editor button (see create API for values)

  • homework_submission

    The configuration for homework submission selection (see create API for values)

  • link_selection

    The configuration for link selection (see create API for values)

  • migration_selection

    The configuration for migration selection (see create API for values)

  • resource_selection

    The configuration for a resource selector in modules (see create API for values)

  • tool_configuration

    The configuration for a tool configuration link (see create API for values)

  • user_navigation

    The configuration for user navigation links (see create API for values)

  • selection_width

    The pixel width of the iFrame that the tool will be rendered in

  • selection_height

    The pixel height of the iFrame that the tool will be rendered in

  • icon_url

    The url for the tool icon

  • not_selectable

    whether the tool is not selectable from assignment and modules

Example Response:

{
  "id": 1,
  "domain": "domain.example.com",
  "url": "http://www.example.com/ims/lti",
  "consumer_key": "key",
  "name": "LTI Tool",
  "description": "This is for cool things",
  "created_at": "2037-07-21T13:29:31Z",
  "updated_at": "2037-07-28T19:38:31Z",
  "privacy_level": "anonymous",
  "custom_fields": {"key": "value"},
  "account_navigation": {
       "canvas_icon_class": "icon-lti",
       "icon_url": "...",
       "text": "...",
       "url": "...",
       "label": "...",
       "selection_width": 50,
       "selection_height":50
  },
  "assignment_selection": null,
  "course_home_sub_navigation": null,
  "course_navigation": {
       "canvas_icon_class": "icon-lti",
       "icon_url": "...",
       "text": "...",
       "url": "...",
       "default": "disabled",
       "enabled": "true",
       "visibility": "public",
       "windowTarget": "_blank"
  },
  "editor_button": {
       "canvas_icon_class": "icon-lti",
       "icon_url": "...",
       "message_type": "ContentItemSelectionRequest",
       "text": "...",
       "url": "...",
       "label": "...",
       "selection_width": 50,
       "selection_height": 50
  },
  "homework_submission": null,
  "link_selection": null,
  "migration_selection": null,
  "resource_selection": null,
  "tool_configuration": null,
  "user_navigation": {
       "canvas_icon_class": "icon-lti",
       "icon_url": "...",
       "text": "...",
       "url": "...",
       "default": "disabled",
       "enabled": "true",
       "visibility": "public",
       "windowTarget": "_blank"
  },
  "selection_width": 500,
  "selection_height": 500,
  "icon_url": "...",
  "not_selectable": false
}

Create an external tool ExternalToolsController#create

POST /api/v1/courses/:course_id/external_tools

Scope: url:POST|/api/v1/courses/:course_id/external_tools

POST /api/v1/accounts/:account_id/external_tools

Scope: url:POST|/api/v1/accounts/:account_id/external_tools

Create an external tool in the specified course/account. The created tool will be returned, see the “show” endpoint for an example.

Request Parameters:

Parameter Type Description
name Required string

The name of the tool

privacy_level Required string

What information to send to the external tool.

Allowed values: anonymous, name_only, public

consumer_key Required string

The consumer key for the external tool

shared_secret Required string

The shared secret with the external tool

description string

A description of the tool

url string

The url to match links against. Either “url” or “domain” should be set, not both.

domain string

The domain to match links against. Either “url” or “domain” should be set, not both.

icon_url string

The url of the icon to show for this tool

text string

The default text to show for this tool

custom_fields[field_name] string

Custom fields that will be sent to the tool consumer; can be used multiple times

account_navigation[url] string

The url of the external tool for account navigation

account_navigation[enabled] boolean

Set this to enable this feature

account_navigation[text] string

The text that will show on the left-tab in the account navigation

account_navigation[selection_width] string

The width of the dialog the tool is launched in

account_navigation[selection_height] string

The height of the dialog the tool is launched in

account_navigation[display_type] string

The layout type to use when launching the tool. Must be “full_width”, “borderless”, or “default”

user_navigation[url] string

The url of the external tool for user navigation

user_navigation[enabled] boolean

Set this to enable this feature

user_navigation[text] string

The text that will show on the left-tab in the user navigation

user_navigation[visibility] string

Who will see the navigation tab. “admins” for admins, “public” or “members” for everyone

Allowed values: admins, members, public

course_home_sub_navigation[url] string

The url of the external tool for right-side course home navigation menu

course_home_sub_navigation[enabled] boolean

Set this to enable this feature

course_home_sub_navigation[text] string

The text that will show on the right-side course home navigation menu

course_home_sub_navigation[icon_url] string

The url of the icon to show in the right-side course home navigation menu

course_navigation[enabled] boolean

Set this to enable this feature

course_navigation[text] string

The text that will show on the left-tab in the course navigation

course_navigation[visibility] string

Who will see the navigation tab. “admins” for course admins, “members” for students, null for everyone

Allowed values: admins, members

course_navigation[windowTarget] string

Determines how the navigation tab will be opened. “_blank” Launches the external tool in a new window or tab. “_self” (Default) Launches the external tool in an iframe inside of Canvas.

Allowed values: _blank, _self

course_navigation[default] boolean

Whether the navigation option will show in the course by default or whether the teacher will have to explicitly enable it

course_navigation[display_type] string

The layout type to use when launching the tool. Must be “full_width”, “borderless”, or “default”

editor_button[url] string

The url of the external tool

editor_button[enabled] boolean

Set this to enable this feature

editor_button[icon_url] string

The url of the icon to show in the WYSIWYG editor

editor_button[selection_width] string

The width of the dialog the tool is launched in

editor_button[selection_height] string

The height of the dialog the tool is launched in

editor_button[message_type] string

Set this to ContentItemSelectionRequest to tell the tool to use content-item; otherwise, omit

homework_submission[url] string

The url of the external tool

homework_submission[enabled] boolean

Set this to enable this feature

homework_submission[text] string

The text that will show on the homework submission tab

homework_submission[message_type] string

Set this to ContentItemSelectionRequest to tell the tool to use content-item; otherwise, omit

link_selection[url] string

The url of the external tool

link_selection[enabled] boolean

Set this to enable this feature

link_selection[text] string

The text that will show for the link selection text

link_selection[message_type] string

Set this to ContentItemSelectionRequest to tell the tool to use content-item; otherwise, omit

migration_selection[url] string

The url of the external tool

migration_selection[enabled] boolean

Set this to enable this feature

migration_selection[message_type] string

Set this to ContentItemSelectionRequest to tell the tool to use content-item; otherwise, omit

tool_configuration[url] string

The url of the external tool

tool_configuration[enabled] boolean

Set this to enable this feature

tool_configuration[message_type] string

Set this to ContentItemSelectionRequest to tell the tool to use content-item; otherwise, omit

tool_configuration[prefer_sis_email] boolean

Set this to default the lis_person_contact_email_primary to prefer provisioned sis_email; otherwise, omit

resource_selection[url] string

The url of the external tool

resource_selection[enabled] boolean

Set this to enable this feature

resource_selection[icon_url] string

The url of the icon to show in the module external tool list

resource_selection[selection_width] string

The width of the dialog the tool is launched in

resource_selection[selection_height] string

The height of the dialog the tool is launched in

config_type string

Configuration can be passed in as CC xml instead of using query parameters. If this value is “by_url” or “by_xml” then an xml configuration will be expected in either the “config_xml” or “config_url” parameter. Note that the name parameter overrides the tool name provided in the xml

config_xml string

XML tool configuration, as specified in the CC xml specification. This is required if “config_type” is set to “by_xml”

config_url string

URL where the server can retrieve an XML tool configuration, as specified in the CC xml specification. This is required if “config_type” is set to “by_url”

not_selectable boolean

Default: false, if set to true the tool won't show up in the external tool selection UI in modules and assignments

oauth_compliant boolean

Default: false, if set to true LTI query params will not be copied to the post body.

Example Request:

This would create a tool on this course with two custom fields and a course navigation tab
curl -X POST 'https://<canvas>/api/v1/courses/<course_id>/external_tools' \
     -H "Authorization: Bearer <token>" \
     -F 'name=LTI Example' \
     -F 'consumer_key=asdfg' \
     -F 'shared_secret=lkjh' \
     -F 'url=https://example.com/ims/lti' \
     -F 'privacy_level=name_only' \
     -F 'custom_fields[key1]=value1' \
     -F 'custom_fields[key2]=value2' \
     -F 'course_navigation[text]=Course Materials' \
     -F 'course_navigation[default]=false'
     -F 'course_navigation[enabled]=true'

This would create a tool on the account with navigation for the user profile page
curl -X POST 'https://<canvas>/api/v1/accounts/<account_id>/external_tools' \
     -H "Authorization: Bearer <token>" \
     -F 'name=LTI Example' \
     -F 'consumer_key=asdfg' \
     -F 'shared_secret=lkjh' \
     -F 'url=https://example.com/ims/lti' \
     -F 'privacy_level=name_only' \
     -F 'user_navigation[url]=https://example.com/ims/lti/user_endpoint' \
     -F 'user_navigation[text]=Something Cool'
     -F 'user_navigation[enabled]=true'

This would create a tool on the account with configuration pulled from an external URL
curl -X POST 'https://<canvas>/api/v1/accounts/<account_id>/external_tools' \
     -H "Authorization: Bearer <token>" \
     -F 'name=LTI Example' \
     -F 'consumer_key=asdfg' \
     -F 'shared_secret=lkjh' \
     -F 'config_type=by_url' \
     -F 'config_url=https://example.com/ims/lti/tool_config.xml'

Edit an external tool ExternalToolsController#update

PUT /api/v1/courses/:course_id/external_tools/:external_tool_id

Scope: url:PUT|/api/v1/courses/:course_id/external_tools/:external_tool_id

PUT /api/v1/accounts/:account_id/external_tools/:external_tool_id

Scope: url:PUT|/api/v1/accounts/:account_id/external_tools/:external_tool_id

Update the specified external tool. Uses same parameters as create

Example Request:

This would update the specified keys on this external tool
curl -X PUT 'https://<canvas>/api/v1/courses/<course_id>/external_tools/<external_tool_id>' \
     -H "Authorization: Bearer <token>" \
     -F 'name=Public Example' \
     -F 'privacy_level=public'

Delete an external tool ExternalToolsController#destroy

DELETE /api/v1/courses/:course_id/external_tools/:external_tool_id

Scope: url:DELETE|/api/v1/courses/:course_id/external_tools/:external_tool_id

DELETE /api/v1/accounts/:account_id/external_tools/:external_tool_id

Scope: url:DELETE|/api/v1/accounts/:account_id/external_tools/:external_tool_id

Remove the specified external tool

Example Request:

This would delete the specified external tool
curl -X DELETE 'https://<canvas>/api/v1/courses/<course_id>/external_tools/<external_tool_id>' \
     -H "Authorization: Bearer <token>"

List favorite courses FavoritesController#list_favorite_courses

GET /api/v1/users/self/favorites/courses

Scope: url:GET|/api/v1/users/self/favorites/courses

Retrieve the paginated list of favorite courses for the current user. If the user has not chosen any favorites, then a selection of currently enrolled courses will be returned.

See the List courses API for details on accepted include[] parameters.

Request Parameters:

Parameter Type Description
exclude_blueprint_courses boolean

When set, only return courses that are not configured as blueprint courses.

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/courses \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a list of Courses

List favorite groups FavoritesController#list_favorite_groups

GET /api/v1/users/self/favorites/groups

Scope: url:GET|/api/v1/users/self/favorites/groups

Retrieve the paginated list of favorite groups for the current user. If the user has not chosen any favorites, then a selection of groups that the user is a member of will be returned.

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/groups \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a list of Groups

Add course to favorites FavoritesController#add_favorite_course

POST /api/v1/users/self/favorites/courses/:id

Scope: url:POST|/api/v1/users/self/favorites/courses/:id

Add a course to the current user's favorites. If the course is already in the user's favorites, nothing happens.

Request Parameters:

Parameter Type Description
id Required string

The ID or SIS ID of the course to add. The current user must be registered in the course.

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/courses/1170 \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Length: 0'
Returns a Favorite

Add group to favorites FavoritesController#add_favorite_groups

POST /api/v1/users/self/favorites/groups/:id

Scope: url:POST|/api/v1/users/self/favorites/groups/:id

Add a group to the current user's favorites. If the group is already in the user's favorites, nothing happens.

Request Parameters:

Parameter Type Description
id Required string

The ID or SIS ID of the group to add. The current user must be a member of the group.

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/group/1170 \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Length: 0'
Returns a Favorite

Remove course from favorites FavoritesController#remove_favorite_course

DELETE /api/v1/users/self/favorites/courses/:id

Scope: url:DELETE|/api/v1/users/self/favorites/courses/:id

Remove a course from the current user's favorites.

Request Parameters:

Parameter Type Description
id Required string

the ID or SIS ID of the course to remove

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/courses/1170 \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a Favorite

Remove group from favorites FavoritesController#remove_favorite_groups

DELETE /api/v1/users/self/favorites/groups/:id

Scope: url:DELETE|/api/v1/users/self/favorites/groups/:id

Remove a group from the current user's favorites.

Request Parameters:

Parameter Type Description
id Required string

the ID or SIS ID of the group to remove

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/groups/1170 \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
Returns a Favorite

Reset course favorites FavoritesController#reset_course_favorites

DELETE /api/v1/users/self/favorites/courses

Scope: url:DELETE|/api/v1/users/self/favorites/courses

Reset the current user's course favorites to the default automatically generated list of enrolled courses

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/courses \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'

Reset group favorites FavoritesController#reset_groups_favorites

DELETE /api/v1/users/self/favorites/groups

Scope: url:DELETE|/api/v1/users/self/favorites/groups

Reset the current user's group favorites to the default automatically generated list of enrolled group

Example Request:

curl https://<canvas>/api/v1/users/self/favorites/group \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'

List features FeatureFlagsController#index

GET /api/v1/courses/:course_id/features

Scope: url:GET|/api/v1/courses/:course_id/features

GET /api/v1/accounts/:account_id/features

Scope: url:GET|/api/v1/accounts/:account_id/features

GET /api/v1/users/:user_id/features

Scope: url:GET|/api/v1/users/:user_id/features

A paginated list of all features that apply to a given Account, Course, or User.

Example Request:

curl 'http://<canvas>/api/v1/courses/1/features' \
  -H "Authorization: Bearer "
Returns a list of Features

List enabled features FeatureFlagsController#enabled_features

GET /api/v1/courses/:course_id/features/enabled

Scope: url:GET|/api/v1/courses/:course_id/features/enabled

GET /api/v1/accounts/:account_id/features/enabled

Scope: url:GET|/api/v1/accounts/:account_id/features/enabled

GET /api/v1/users/:user_id/features/enabled

Scope: url:GET|/api/v1/users/:user_id/features/enabled

A paginated list of all features that are enabled on a given Account, Course, or User. Only the feature names are returned.

Example Request:

curl 'http://<canvas>/api/v1/courses/1/features/enabled' \
  -H "Authorization: Bearer "

Example Response:

["fancy_wickets", "automatic_essay_grading", "telepathic_navigation"]

Get feature flag FeatureFlagsController#show

GET /api/v1/courses/:course_id/features/flags/:feature

Scope: url:GET|/api/v1/courses/:course_id/features/flags/:feature

GET /api/v1/accounts/:account_id/features/flags/:feature

Scope: url:GET|/api/v1/accounts/:account_id/features/flags/:feature

GET /api/v1/users/:user_id/features/flags/:feature

Scope: url:GET|/api/v1/users/:user_id/features/flags/:feature

Get the feature flag that applies to a given Account, Course, or User. The flag may be defined on the object, or it may be inherited from a parent account. You can look at the context_id and context_type of the returned object to determine which is the case. If these fields are missing, then the object is the global Canvas default.

Example Request:

curl 'http://<canvas>/api/v1/courses/1/features/flags/fancy_wickets' \
  -H "Authorization: Bearer "
Returns a FeatureFlag

Set feature flag FeatureFlagsController#update

PUT /api/v1/courses/:course_id/features/flags/:feature

Scope: url:PUT|/api/v1/courses/:course_id/features/flags/:feature

PUT /api/v1/accounts/:account_id/features/flags/:feature

Scope: url:PUT|/api/v1/accounts/:account_id/features/flags/:feature

PUT /api/v1/users/:user_id/features/flags/:feature

Scope: url:PUT|/api/v1/users/:user_id/features/flags/:feature

Set a feature flag for a given Account, Course, or User. This call will fail if a parent account sets a feature flag for the same feature in any state other than “allowed”.

Request Parameters:

Parameter Type Description
state string
“off”

The feature is not available for the course, user, or account and sub-accounts.

“allowed”

(valid only on accounts) The feature is off in the account, but may be enabled in sub-accounts and courses by setting a feature flag on the sub-account or course.

“on”

The feature is turned on unconditionally for the user, course, or account and sub-accounts.

Allowed values: off, allowed, on

Example Request:

curl -X PUT 'http://<canvas>/api/v1/courses/1/features/flags/fancy_wickets' \
  -H "Authorization: Bearer " \
  -F "state=on"
Returns a FeatureFlag

Remove feature flag FeatureFlagsController#delete

DELETE /api/v1/courses/:course_id/features/flags/:feature

Scope: url:DELETE|/api/v1/courses/:course_id/features/flags/:feature

DELETE /api/v1/accounts/:account_id/features/flags/:feature

Scope: url:DELETE|/api/v1/accounts/:account_id/features/flags/:feature

DELETE /api/v1/users/:user_id/features/flags/:feature

Scope: url:DELETE|/api/v1/users/:user_id/features/flags/:feature

Remove feature flag for a given Account, Course, or User. (Note that the flag must be defined on the Account, Course, or User directly.) The object will then inherit the feature flags from a higher account, if any exist. If this flag was 'on' or 'off', then lower-level account flags that were masked by this one will apply again.

Example Request:

curl -X DELETE 'http://<canvas>/api/v1/courses/1/features/flags/fancy_wickets' \
  -H "Authorization: Bearer "
Returns a FeatureFlag

Get quota information FilesController#api_quota

GET /api/v1/courses/:course_id/files/quota

Scope: url:GET|/api/v1/courses/:course_id/files/quota

GET /api/v1/groups/:group_id/files/quota

Scope: url:GET|/api/v1/groups/:group_id/files/quota

GET /api/v1/users/:user_id/files/quota

Scope: url:GET|/api/v1/users/:user_id/files/quota

Returns the total and used storage quota for the course, group, or user.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/files/quota' \
      -H 'Authorization: Bearer <token>'

Example Response:

{ "quota": 524288000, "quota_used": 402653184 }

List files FilesController#api_index

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

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

GET /api/v1/users/:user_id/files

Scope: url:GET|/api/v1/users/:user_id/files

GET /api/v1/groups/:group_id/files

Scope: url:GET|/api/v1/groups/:group_id/files

GET /api/v1/folders/:id/files

Scope: url:GET|/api/v1/folders/:id/files

Returns the paginated list of files for the folder or course.

Request Parameters:

Parameter Type Description
content_types[] string

Filter results by content-type. You can specify type/subtype pairs (e.g., 'image/jpeg'), or simply types (e.g., 'image', which will match 'image/gif', 'image/jpeg', etc.).

search_term string

The partial name of the files to match and return.

include[] string

Array of additional information to include.

“user”

the user who uploaded the file or last edited its content

“usage_rights”

copyright and license information for the file (see UsageRights)

Allowed values: user

only[] Array

Array of information to restrict to. Overrides include[]

“names”

only returns file name information

sort string

Sort results by this field. Defaults to 'name'. Note that `sort=user` implies `include[]=user`.

Allowed values: name, size, created_at, updated_at, content_type, user

order string

The sorting order. Defaults to 'asc'.

Allowed values: asc, desc

Example Request:

curl 'https://<canvas>/api/v1/folders/<folder_id>/files?content_types[]=image&content_types[]=text/plain \
      -H 'Authorization: Bearer <token>'
Returns a list of Files

Get public inline preview url FilesController#public_url

GET /api/v1/files/:id/public_url

Scope: url:GET|/api/v1/files/:id/public_url

Determine the URL that should be used for inline preview of the file.

Request Parameters:

Parameter Type Description
submission_id integer

The id of the submission the file is associated with. Provide this argument to gain access to a file that has been submitted to an assignment (Canvas will verify that the file belongs to the submission and the calling user has rights to view the submission).

Example Request:

curl 'https://<canvas>/api/v1/files/1/public_url' \
      -H 'Authorization: Bearer <token>'

Example Response:

{ "public_url": "https://example-bucket.s3.amazonaws.com/example-namespace/attachments/1/example-filename?AWSAccessKeyId=example-key&Expires=1400000000&Signature=example-signature" }

Get file FilesController#api_show

GET /api/v1/files/:id

Scope: url:GET|/api/v1/files/:id

GET /api/v1/courses/:course_id/files/:id

Scope: url:GET|/api/v1/courses/:course_id/files/:id

GET /api/v1/groups/:group_id/files/:id

Scope: url:GET|/api/v1/groups/:group_id/files/:id

GET /api/v1/users/:user_id/files/:id

Scope: url:GET|/api/v1/users/:user_id/files/:id

Returns the standard attachment json object

Request Parameters:

Parameter Type Description
include[] string

Array of additional information to include.

“user”

the user who uploaded the file or last edited its content

“usage_rights”

copyright and license information for the file (see UsageRights)

Allowed values: user

Example Request:

curl 'https://<canvas>/api/v1/files/<file_id>' \
      -H 'Authorization: Bearer <token>'

curl 'https://<canvas>/api/v1/courses/<course_id>/files/<file_id>' \
      -H 'Authorization: Bearer <token>'
Returns a File

Update file FilesController#api_update

PUT /api/v1/files/:id

Scope: url:PUT|/api/v1/files/:id

Update some settings on the specified file

Request Parameters:

Parameter Type Description
name string

The new display name of the file

parent_folder_id string

The id of the folder to move this file into. The new folder must be in the same context as the original parent folder. If the file is in a context without folders this does not apply.

on_duplicate string

If the file is moved to a folder containing a file with the same name, or renamed to a name matching an existing file, the API call will fail unless this parameter is supplied.

“overwrite”

Replace the existing file with the same name

“rename”

Add a qualifier to make the new filename unique

Allowed values: overwrite, rename

lock_at DateTime

The datetime to lock the file at

unlock_at DateTime

The datetime to unlock the file at

locked boolean

Flag the file as locked

hidden boolean

Flag the file as hidden

Example Request:

curl -X PUT 'https://<canvas>/api/v1/files/<file_id>' \
     -F 'name=<new_name>' \
     -F 'locked=true' \
     -H 'Authorization: Bearer <token>'
Returns a File

Delete file FilesController#destroy

DELETE /api/v1/files/:id

Scope: url:DELETE|/api/v1/files/:id

Remove the specified file

Request Parameters:

Parameter Type Description
replace boolean

This action is irreversible. If replace is set to true the file contents will be replaced with a generic “file has been removed” file. This also destroys any previews that have been generated for the file. Must have manage files and become other users permissions

Example Request:

curl -X DELETE 'https://<canvas>/api/v1/files/<file_id>' \
     -H 'Authorization: Bearer <token>'
Returns a File

List folders FoldersController#api_index

GET /api/v1/folders/:id/folders

Scope: url:GET|/api/v1/folders/:id/folders

Returns the paginated list of folders in the folder.

Example Request:

curl 'https://<canvas>/api/v1/folders/<folder_id>/folders' \
     -H 'Authorization: Bearer <token>'
Returns a list of Folders

List all folders FoldersController#list_all_folders

GET /api/v1/courses/:course_id/folders

Scope: url:GET|/api/v1/courses/:course_id/folders

GET /api/v1/users/:user_id/folders

Scope: url:GET|/api/v1/users/:user_id/folders

GET /api/v1/groups/:group_id/folders

Scope: url:GET|/api/v1/groups/:group_id/folders

Returns the paginated list of all folders for the given context. This will be returned as a flat list containing all subfolders as well.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/folders' \
     -H 'Authorization: Bearer <token>'
Returns a list of Folders

Resolve path FoldersController#resolve_path

GET /api/v1/courses/:course_id/folders/by_path/*full_path

Scope: url:GET|/api/v1/courses/:course_id/folders/by_path/*full_path

GET /api/v1/courses/:course_id/folders/by_path

Scope: url:GET|/api/v1/courses/:course_id/folders/by_path

GET /api/v1/users/:user_id/folders/by_path/*full_path

Scope: url:GET|/api/v1/users/:user_id/folders/by_path/*full_path

GET /api/v1/users/:user_id/folders/by_path

Scope: url:GET|/api/v1/users/:user_id/folders/by_path

GET /api/v1/groups/:group_id/folders/by_path/*full_path

Scope: url:GET|/api/v1/groups/:group_id/folders/by_path/*full_path

GET /api/v1/groups/:group_id/folders/by_path

Scope: url:GET|/api/v1/groups/:group_id/folders/by_path

Given the full path to a folder, returns a list of all Folders in the path hierarchy, starting at the root folder, and ending at the requested folder. The given path is relative to the context's root folder and does not include the root folder's name (e.g., “course files”). If an empty path is given, the context's root folder alone is returned. Otherwise, if no folder exists with the given full path, a Not Found error is returned.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/folders/by_path/foo/bar/baz' \
     -H 'Authorization: Bearer <token>'
Returns a list of Folders

Get folder FoldersController#show

GET /api/v1/courses/:course_id/folders/:id

Scope: url:GET|/api/v1/courses/:course_id/folders/:id

GET /api/v1/users/:user_id/folders/:id

Scope: url:GET|/api/v1/users/:user_id/folders/:id

GET /api/v1/groups/:group_id/folders/:id

Scope: url:GET|/api/v1/groups/:group_id/folders/:id

GET /api/v1/folders/:id

Scope: url:GET|/api/v1/folders/:id

Returns the details for a folder

You can get the root folder from a context by using 'root' as the :id. For example, you could get the root folder for a course like:

Example Request:

curl 'https://<canvas>/api/v1/courses/1337/folders/root' \
     -H 'Authorization: Bearer <token>'

curl 'https://<canvas>/api/v1/folders/<folder_id>' \
     -H 'Authorization: Bearer <token>'
Returns a Folder

Update folder FoldersController#update

PUT /api/v1/folders/:id

Scope: url:PUT|/api/v1/folders/:id

Updates a folder

Request Parameters:

Parameter Type Description
name string

The new name of the folder

parent_folder_id string

The id of the folder to move this folder into. The new folder must be in the same context as the original parent folder.

lock_at DateTime

The datetime to lock the folder at

unlock_at DateTime

The datetime to unlock the folder at

locked boolean

Flag the folder as locked

hidden boolean

Flag the folder as hidden

position integer

Set an explicit sort position for the folder

Example Request:

curl -XPUT 'https://<canvas>/api/v1/folders/<folder_id>' \
     -F 'name=<new_name>' \
     -F 'locked=true' \
     -H 'Authorization: Bearer <token>'
Returns a Folder

Create folder FoldersController#create

POST /api/v1/courses/:course_id/folders

Scope: url:POST|/api/v1/courses/:course_id/folders

POST /api/v1/users/:user_id/folders

Scope: url:POST|/api/v1/users/:user_id/folders

POST /api/v1/groups/:group_id/folders

Scope: url:POST|/api/v1/groups/:group_id/folders

POST /api/v1/folders/:folder_id/folders

Scope: url:POST|/api/v1/folders/:folder_id/folders

Creates a folder in the specified context

Request Parameters:

Parameter Type Description
name Required string

The name of the folder

parent_folder_id string

The id of the folder to store the file in. If this and parent_folder_path are sent an error will be returned. If neither is given, a default folder will be used.

parent_folder_path string

The path of the folder to store the new folder in. The path separator is the forward slash `/`, never a back slash. The parent folder will be created if it does not already exist. This parameter only applies to new folders in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used.

lock_at DateTime

The datetime to lock the folder at

unlock_at DateTime

The datetime to unlock the folder at

locked boolean

Flag the folder as locked

hidden boolean

Flag the folder as hidden

position integer

Set an explicit sort position for the folder

Example Request:

curl 'https://<canvas>/api/v1/folders/<folder_id>/folders' \
     -F 'name=<new_name>' \
     -F 'locked=true' \
     -H 'Authorization: Bearer <token>'

curl 'https://<canvas>/api/v1/courses/<course_id>/folders' \
     -F 'name=<new_name>' \
     -F 'locked=true' \
     -H 'Authorization: Bearer <token>'
Returns a Folder

Delete folder FoldersController#api_destroy

DELETE /api/v1/folders/:id

Scope: url:DELETE|/api/v1/folders/:id

Remove the specified folder. You can only delete empty folders unless you set the 'force' flag

Request Parameters:

Parameter Type Description
force boolean

Set to 'true' to allow deleting a non-empty folder

Example Request:

curl -X DELETE 'https://<canvas>/api/v1/folders/<folder_id>' \
     -H 'Authorization: Bearer <token>'

Upload a file FoldersController#create_file

POST /api/v1/folders/:folder_id/files

Scope: url:POST|/api/v1/folders/:folder_id/files

Upload a file to a folder.

This API endpoint is the first step in uploading a file. See the File Upload Documentation for details on the file upload workflow.

Only those with the “Manage Files” permission on a course or group can upload files to a folder in that course or group.

Copy a file FoldersController#copy_file

POST /api/v1/folders/:dest_folder_id/copy_file

Scope: url:POST|/api/v1/folders/:dest_folder_id/copy_file

Copy a file from elsewhere in Canvas into a folder.

Copying a file across contexts (between courses and users) is permitted, but the source and destination must belong to the same institution.

Request Parameters:

Parameter Type Description
source_file_id Required string

The id of the source file

on_duplicate string

What to do if a file with the same name already exists at the destination. If such a file exists and this parameter is not given, the call will fail.

“overwrite”

Replace an existing file with the same name

“rename”

Add a qualifier to make the new filename unique

Allowed values: overwrite, rename

Example Request:

curl 'https://<canvas>/api/v1/folders/123/copy_file' \
     -H 'Authorization: Bearer <token>'
     -F 'source_file_id=456'
Returns a File

Copy a folder FoldersController#copy_folder

POST /api/v1/folders/:dest_folder_id/copy_folder

Scope: url:POST|/api/v1/folders/:dest_folder_id/copy_folder

Copy a folder (and its contents) from elsewhere in Canvas into a folder.

Copying a folder across contexts (between courses and users) is permitted, but the source and destination must belong to the same institution. If the source and destination folders are in the same context, the source folder may not contain the destination folder. A folder will be renamed at its destination if another folder with the same name already exists.

Request Parameters:

Parameter Type Description
source_folder_id Required string

The id of the source folder

Example Request:

curl 'https://<canvas>/api/v1/folders/123/copy_folder' \
     -H 'Authorization: Bearer <token>'
     -F 'source_file_id=789'
Returns a Folder

Set usage rights UsageRightsController#set_usage_rights

PUT /api/v1/courses/:course_id/usage_rights

Scope: url:PUT|/api/v1/courses/:course_id/usage_rights

PUT /api/v1/groups/:group_id/usage_rights

Scope: url:PUT|/api/v1/groups/:group_id/usage_rights

PUT /api/v1/users/:user_id/usage_rights

Scope: url:PUT|/api/v1/users/:user_id/usage_rights

Sets copyright and license information for one or more files

Request Parameters:

Parameter Type Description
file_ids[] Required string

List of ids of files to set usage rights for.

folder_ids[] string

List of ids of folders to search for files to set usage rights for. Note that new files uploaded to these folders do not automatically inherit these rights.

publish boolean

Whether the file(s) or folder(s) should be published on save, provided that usage rights have been specified (set to `true` to publish on save).

usage_rights[use_justification] Required string

The intellectual property justification for using the files in Canvas

Allowed values: own_copyright, used_by_permission, fair_use, public_domain, creative_commons

usage_rights[legal_copyright] string

The legal copyright line for the files

usage_rights[license] string

The license that applies to the files. See the List licenses endpoint for the supported license types.

Returns a UsageRights

Remove usage rights UsageRightsController#remove_usage_rights

DELETE /api/v1/courses/:course_id/usage_rights

Scope: url:DELETE|/api/v1/courses/:course_id/usage_rights

DELETE /api/v1/groups/:group_id/usage_rights

Scope: url:DELETE|/api/v1/groups/:group_id/usage_rights

DELETE /api/v1/users/:user_id/usage_rights

Scope: url:DELETE|/api/v1/users/:user_id/usage_rights

Removes copyright and license information associated with one or more files

Request Parameters:

Parameter Type Description
file_ids[] Required string

List of ids of files to remove associated usage rights from.

folder_ids[] string

List of ids of folders. Usage rights will be removed from all files in these folders.

List licenses UsageRightsController#licenses

GET /api/v1/courses/:course_id/content_licenses

Scope: url:GET|/api/v1/courses/:course_id/content_licenses

GET /api/v1/groups/:group_id/content_licenses

Scope: url:GET|/api/v1/groups/:group_id/content_licenses

GET /api/v1/users/:user_id/content_licenses

Scope: url:GET|/api/v1/users/:user_id/content_licenses

A paginated list of licenses that can be applied

Returns a list of Licenses

Query by assignment. GradeChangeAuditApiController#for_assignment

GET /api/v1/audit/grade_change/assignments/:assignment_id

Scope: url:GET|/api/v1/audit/grade_change/assignments/:assignment_id

List grade change events for a given assignment.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events.

end_time DateTime

The end of the time range from which you want events.

Returns a list of GradeChangeEvents

Query by course. GradeChangeAuditApiController#for_course

GET /api/v1/audit/grade_change/courses/:course_id

Scope: url:GET|/api/v1/audit/grade_change/courses/:course_id

List grade change events for a given course.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events.

end_time DateTime

The end of the time range from which you want events.

Returns a list of GradeChangeEvents

Query by student. GradeChangeAuditApiController#for_student

GET /api/v1/audit/grade_change/students/:student_id

Scope: url:GET|/api/v1/audit/grade_change/students/:student_id

List grade change events for a given student.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events.

end_time DateTime

The end of the time range from which you want events.

Returns a list of GradeChangeEvents

Query by grader. GradeChangeAuditApiController#for_grader

GET /api/v1/audit/grade_change/graders/:grader_id

Scope: url:GET|/api/v1/audit/grade_change/graders/:grader_id

List grade change events for a given grader.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want events.

end_time DateTime

The end of the time range from which you want events.

Returns a list of GradeChangeEvents

Days in gradebook history for this course GradebookHistoryApiController#days

GET /api/v1/courses/:course_id/gradebook_history/days

Scope: url:GET|/api/v1/courses/:course_id/gradebook_history/days

Returns a map of dates to grader/assignment groups

Request Parameters:

Parameter Type Description
course_id Required integer

The id of the contextual course for this API call

Returns a list of Days

Details for a given date in gradebook history for this course GradebookHistoryApiController#day_details

GET /api/v1/courses/:course_id/gradebook_history/:date

Scope: url:GET|/api/v1/courses/:course_id/gradebook_history/:date

Returns the graders who worked on this day, along with the assignments they worked on. More details can be obtained by selecting a grader and assignment and calling the 'submissions' api endpoint for a given date.

Request Parameters:

Parameter Type Description
course_id Required integer

The id of the contextual course for this API call

date Required string

The date for which you would like to see detailed information

Returns a list of Graders

Lists submissions GradebookHistoryApiController#submissions

GET /api/v1/courses/:course_id/gradebook_history/:date/graders/:grader_id/assignments/:assignment_id/submissions

Scope: url:GET|/api/v1/courses/:course_id/gradebook_history/:date/graders/:grader_id/assignments/:assignment_id/submissions

Gives a nested list of submission versions

Request Parameters:

Parameter Type Description
course_id Required integer

The id of the contextual course for this API call

date Required string

The date for which you would like to see submissions

grader_id Required integer

The ID of the grader for which you want to see submissions

assignment_id Required integer

The ID of the assignment for which you want to see submissions

Returns a list of SubmissionHistories

List uncollated submission versions GradebookHistoryApiController#feed

GET /api/v1/courses/:course_id/gradebook_history/feed

Scope: url:GET|/api/v1/courses/:course_id/gradebook_history/feed

Gives a paginated, uncollated list of submission versions for all matching submissions in the context. This SubmissionVersion objects will not include the new_grade or previous_grade keys, only the grade; same for graded_at and grader.

Request Parameters:

Parameter Type Description
course_id Required integer

The id of the contextual course for this API call

assignment_id integer

The ID of the assignment for which you want to see submissions. If absent, versions of submissions from any assignment in the course are included.

user_id integer

The ID of the user for which you want to see submissions. If absent, versions of submissions from any user in the course are included.

ascending boolean

Returns submission versions in ascending date order (oldest first). If absent, returns submission versions in descending date order (newest first).

Returns a list of SubmissionVersions

List grading periods GradingPeriodsController#index

GET /api/v1/accounts/:account_id/grading_periods

Scope: url:GET|/api/v1/accounts/:account_id/grading_periods

GET /api/v1/courses/:course_id/grading_periods

Scope: url:GET|/api/v1/courses/:course_id/grading_periods

Returns the paginated list of grading periods for the current course.

Example Response:

{
  "grading_periods": [GradingPeriod]
}

Get a single grading period GradingPeriodsController#show

GET /api/v1/courses/:course_id/grading_periods/:id

Scope: url:GET|/api/v1/courses/:course_id/grading_periods/:id

Returns the grading period with the given id

Example Response:

{
  "grading_periods": [GradingPeriod]
}

Update a single grading period GradingPeriodsController#update

PUT /api/v1/courses/:course_id/grading_periods/:id

Scope: url:PUT|/api/v1/courses/:course_id/grading_periods/:id

Update an existing grading period.

Request Parameters:

Parameter Type Description
grading_periods[][start_date] Required Date

The date the grading period starts.

grading_periods[][end_date] Required Date

no description

grading_periods[][weight] number

A weight value that contributes to the overall weight of a grading period set which is used to calculate how much assignments in this period contribute to the total grade

Example Response:

{
  "grading_periods": [GradingPeriod]
}

Delete a grading period GradingPeriodsController#destroy

DELETE /api/v1/courses/:course_id/grading_periods/:id

Scope: url:DELETE|/api/v1/courses/:course_id/grading_periods/:id

DELETE /api/v1/accounts/:account_id/grading_periods/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/grading_periods/:id

204 No Content response code is returned if the deletion was successful.

Create a new grading standard GradingStandardsApiController#create

POST /api/v1/accounts/:account_id/grading_standards

Scope: url:POST|/api/v1/accounts/:account_id/grading_standards

POST /api/v1/courses/:course_id/grading_standards

Scope: url:POST|/api/v1/courses/:course_id/grading_standards

Create a new grading standard

If grading_scheme_entry arguments are omitted, then a default grading scheme will be set. The default scheme is as follows:

"A" : 94,
"A-" : 90,
"B+" : 87,
"B" : 84,
"B-" : 80,
"C+" : 77,
"C" : 74,
"C-" : 70,
"D+" : 67,
"D" : 64,
"D-" : 61,
"F" : 0,

Request Parameters:

Parameter Type Description
title Required string

The title for the Grading Standard.

grading_scheme_entry[][name] Required string

The name for an entry value within a GradingStandard that describes the range of the value e.g. A-

grading_scheme_entry[][value] Required integer

The value for the name of the entry within a GradingStandard. The entry represents the lower bound of the range for the entry. This range includes the value up to the next entry in the GradingStandard, or 100 if there is no upper bound. The lowest value will have a lower bound range of 0. e.g. 93

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/grading_standards \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -d 'title=New standard name' \
  -d 'grading_scheme_entry[][name]=A'
  -d 'grading_scheme_entry[][value]=90'
  -d 'grading_scheme_entry[][name]=B'
  -d 'grading_scheme_entry[][value]=80'

Example Response:

{
  "title": "New standard name",
  "id": 1,
  "context_id": 1,
  "context_type": "Course",
  "grading_scheme": [
    {"name": "A", "value": 0.9},
    {"name": "B", "value": 0.8}
  ]
}
Returns a GradingStandard

List the grading standards available in a context. GradingStandardsApiController#context_index

GET /api/v1/courses/:course_id/grading_standards

Scope: url:GET|/api/v1/courses/:course_id/grading_standards

GET /api/v1/accounts/:account_id/grading_standards

Scope: url:GET|/api/v1/accounts/:account_id/grading_standards

Returns the paginated list of grading standards for the given context that are visible to the user.

Example Request:

curl https://<canvas>/api/v1/courses/1/grading_standards \
  -H 'Authorization: Bearer <token>'
Returns a list of GradingStandards

Get a single grading standard in a context. GradingStandardsApiController#context_show

GET /api/v1/courses/:course_id/grading_standards/:grading_standard_id

Scope: url:GET|/api/v1/courses/:course_id/grading_standards/:grading_standard_id

GET /api/v1/accounts/:account_id/grading_standards/:grading_standard_id

Scope: url:GET|/api/v1/accounts/:account_id/grading_standards/:grading_standard_id

Returns a grading standard for the given context that is visible to the user.

Example Request:

curl https://<canvas>/api/v1/courses/1/grading_standards/5 \
  -H 'Authorization: Bearer <token>'
Returns a GradingStandard

List group categories for a context GroupCategoriesController#index

GET /api/v1/accounts/:account_id/group_categories

Scope: url:GET|/api/v1/accounts/:account_id/group_categories

GET /api/v1/courses/:course_id/group_categories

Scope: url:GET|/api/v1/courses/:course_id/group_categories

Returns a paginated list of group categories in a context

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/group_categories \
     -H 'Authorization: Bearer <token>'
Returns a list of GroupCategories

Get a single group category GroupCategoriesController#show

GET /api/v1/group_categories/:group_category_id

Scope: url:GET|/api/v1/group_categories/:group_category_id

Returns the data for a single group category, or a 401 if the caller doesn't have the rights to see it.

Example Request:

curl https://<canvas>/api/v1/group_categories/<group_category_id> \
     -H 'Authorization: Bearer <token>'
Returns a GroupCategory

Create a Group Category GroupCategoriesController#create

POST /api/v1/accounts/:account_id/group_categories

Scope: url:POST|/api/v1/accounts/:account_id/group_categories

POST /api/v1/courses/:course_id/group_categories

Scope: url:POST|/api/v1/courses/:course_id/group_categories

Create a new group category

Request Parameters:

Parameter Type Description
name Required string

Name of the group category

self_signup string

Allow students to sign up for a group themselves (Course Only). valid values are:

“enabled”

allows students to self sign up for any group in course

“restricted”

allows students to self sign up only for groups in the same section null disallows self sign up

Allowed values: enabled, restricted

auto_leader string

Assigns group leaders automatically when generating and allocating students to groups Valid values are:

“first”

the first student to be allocated to a group is the leader

“random”

a random student from all members is chosen as the leader

Allowed values: first, random

group_limit integer

Limit the maximum number of users in each group (Course Only). Requires self signup.

sis_group_category_id string

The unique SIS identifier.

create_group_count integer

Create this number of groups (Course Only).

split_group_count string

(Deprecated) Create this number of groups, and evenly distribute students among them. not allowed with “enable_self_signup”. because the group assignment happens synchronously, it's recommended that you instead use the assign_unassigned_members endpoint. (Course Only)

Example Request:

curl htps://<canvas>/api/v1/courses/<course_id>/group_categories \
    -F 'name=Project Groups' \
    -H 'Authorization: Bearer <token>'
Returns a GroupCategory

Update a Group Category GroupCategoriesController#update

PUT /api/v1/group_categories/:group_category_id

Scope: url:PUT|/api/v1/group_categories/:group_category_id

Modifies an existing group category.

Request Parameters:

Parameter Type Description
name string

Name of the group category

self_signup string

Allow students to sign up for a group themselves (Course Only). Valid values are:

“enabled”

allows students to self sign up for any group in course

“restricted”

allows students to self sign up only for groups in the same section null disallows self sign up

Allowed values: enabled, restricted

auto_leader string

Assigns group leaders automatically when generating and allocating students to groups Valid values are:

“first”

the first student to be allocated to a group is the leader

“random”

a random student from all members is chosen as the leader

Allowed values: first, random

group_limit integer

Limit the maximum number of users in each group (Course Only). Requires self signup.

sis_group_category_id string

The unique SIS identifier.

create_group_count integer

Create this number of groups (Course Only).

split_group_count string

(Deprecated) Create this number of groups, and evenly distribute students among them. not allowed with “enable_self_signup”. because the group assignment happens synchronously, it's recommended that you instead use the assign_unassigned_members endpoint. (Course Only)

Example Request:

curl https://<canvas>/api/v1/group_categories/<group_category_id> \
    -X PUT \
    -F 'name=Project Groups' \
    -H 'Authorization: Bearer <token>'
Returns a GroupCategory

Delete a Group Category GroupCategoriesController#destroy

DELETE /api/v1/group_categories/:group_category_id

Scope: url:DELETE|/api/v1/group_categories/:group_category_id

Deletes a group category and all groups under it. Protected group categories can not be deleted, i.e. “communities” and “student_organized”.

Example Request:

curl https://<canvas>/api/v1/group_categories/<group_category_id> \
      -X DELETE \
      -H 'Authorization: Bearer <token>'

List groups in group category GroupCategoriesController#groups

GET /api/v1/group_categories/:group_category_id/groups

Scope: url:GET|/api/v1/group_categories/:group_category_id/groups

Returns a paginated list of groups in a group category

Example Request:

curl https://<canvas>/api/v1/group_categories/<group_cateogry_id>/groups \
     -H 'Authorization: Bearer <token>'
Returns a list of Groups

List users in group category GroupCategoriesController#users

GET /api/v1/group_categories/:group_category_id/users

Scope: url:GET|/api/v1/group_categories/:group_category_id/users

Returns a paginated list of users in the group category.

Request Parameters:

Parameter Type Description
search_term string

The partial name or full ID of the users to match and return in the results list. Must be at least 3 characters.

unassigned boolean

Set this value to true if you wish only to search unassigned users in the group category.

Example Request:

curl https://<canvas>/api/v1/group_categories/1/users \
     -H 'Authorization: Bearer <token>'
Returns a list of Users

Assign unassigned members GroupCategoriesController#assign_unassigned_members

POST /api/v1/group_categories/:group_category_id/assign_unassigned_members

Scope: url:POST|/api/v1/group_categories/:group_category_id/assign_unassigned_members

Assign all unassigned members as evenly as possible among the existing student groups.

Request Parameters:

Parameter Type Description
sync boolean

The assigning is done asynchronously by default. If you would like to override this and have the assigning done synchronously, set this value to true.

Example Request:

curl https://<canvas>/api/v1/group_categories/1/assign_unassigned_members \
     -H 'Authorization: Bearer <token>'

Example Response:

# Progress (default)
{
    "completion": 0,
    "context_id": 20,
    "context_type": "GroupCategory",
    "created_at": "2013-07-05T10:57:48-06:00",
    "id": 2,
    "message": null,
    "tag": "assign_unassigned_members",
    "updated_at": "2013-07-05T10:57:48-06:00",
    "user_id": null,
    "workflow_state": "running",
    "url": "http://localhost:3000/api/v1/progress/2"
}

# New Group Memberships (when sync = true)
[
  {
    "id": 65,
    "new_members": [
      {
        "user_id": 2,
        "name": "Sam",
        "display_name": "Sam",
        "sections": [
          {
            "section_id": 1,
            "section_code": "Section 1"
          }
        ]
      },
      {
        "user_id": 3,
        "name": "Sue",
        "display_name": "Sue",
        "sections": [
          {
            "section_id": 2,
            "section_code": "Section 2"
          }
        ]
      }
    ]
  },
  {
    "id": 66,
    "new_members": [
      {
        "user_id": 5,
        "name": "Joe",
        "display_name": "Joe",
        "sections": [
          {
            "section_id": 2,
            "section_code": "Section 2"
          }
        ]
      },
      {
        "user_id": 11,
        "name": "Cecil",
        "display_name": "Cecil",
        "sections": [
          {
            "section_id": 3,
            "section_code": "Section 3"
          }
        ]
      }
    ]
  }
]

List your groups GroupsController#index

GET /api/v1/users/self/groups

Scope: url:GET|/api/v1/users/self/groups

Returns a paginated list of active groups for the current user.

Request Parameters:

Parameter Type Description
context_type string

Only include groups that are in this type of context.

Allowed values: Account, Course

include[] string
  • “tabs”: Include the list of tabs configured for each group. See the List available tabs API for more information.

Allowed values: tabs

Example Request:

curl https://<canvas>/api/v1/users/self/groups?context_type=Account \
     -H 'Authorization: Bearer <token>'
Returns a list of Groups

List the groups available in a context. GroupsController#context_index

GET /api/v1/accounts/:account_id/groups

Scope: url:GET|/api/v1/accounts/:account_id/groups

GET /api/v1/courses/:course_id/groups

Scope: url:GET|/api/v1/courses/:course_id/groups

Returns the paginated list of active groups in the given context that are visible to user.

Request Parameters:

Parameter Type Description
only_own_groups boolean

Will only include groups that the user belongs to if this is set

include[] string
  • “tabs”: Include the list of tabs configured for each group. See the List available tabs API for more information.

Allowed values: tabs

Example Request:

curl https://<canvas>/api/v1/courses/1/groups \
     -H 'Authorization: Bearer <token>'
Returns a list of Groups

Get a single group GroupsController#show

GET /api/v1/groups/:group_id

Scope: url:GET|/api/v1/groups/:group_id

Returns the data for a single group, or a 401 if the caller doesn't have the rights to see it.

Request Parameters:

Parameter Type Description
include[] string
  • “permissions”: Include permissions the current user has for the group.

  • “tabs”: Include the list of tabs configured for each group. See the List available tabs API for more information.

Allowed values: permissions, tabs

Example Request:

curl https://<canvas>/api/v1/groups/<group_id> \
     -H 'Authorization: Bearer <token>'
Returns a Group

Create a group GroupsController#create

POST /api/v1/groups

Scope: url:POST|/api/v1/groups

POST /api/v1/group_categories/:group_category_id/groups

Scope: url:POST|/api/v1/group_categories/:group_category_id/groups

Creates a new group. Groups created using the “/api/v1/groups/” endpoint will be community groups.

Request Parameters:

Parameter Type Description
name string

The name of the group

description string

A description of the group

is_public boolean

whether the group is public (applies only to community groups)

join_level string

no description

Allowed values: parent_context_auto_join, parent_context_request, invitation_only

storage_quota_mb integer

The allowed file storage for the group, in megabytes. This parameter is ignored if the caller does not have the manage_storage_quotas permission.

sis_group_id string

The sis ID of the group. Must have manage_sis permission to set.

Example Request:

curl https://<canvas>/api/v1/groups \
     -F 'name=Math Teachers' \
     -F 'description=A place to gather resources for our classes.' \
     -F 'is_public=true' \
     -F 'join_level=parent_context_auto_join' \
     -H 'Authorization: Bearer <token>'
Returns a Group

Edit a group GroupsController#update

PUT /api/v1/groups/:group_id

Scope: url:PUT|/api/v1/groups/:group_id

Modifies an existing group. Note that to set an avatar image for the group, you must first upload the image file to the group, and the use the id in the response as the argument to this function. See the File Upload Documentation for details on the file upload workflow.

Request Parameters:

Parameter Type Description
name string

The name of the group

description string

A description of the group

is_public boolean

Whether the group is public (applies only to community groups). Currently you cannot set a group back to private once it has been made public.

join_level string

no description

Allowed values: parent_context_auto_join, parent_context_request, invitation_only

avatar_id integer

The id of the attachment previously uploaded to the group that you would like to use as the avatar image for this group.

storage_quota_mb integer

The allowed file storage for the group, in megabytes. This parameter is ignored if the caller does not have the manage_storage_quotas permission.

members[] string

An array of user ids for users you would like in the group. Users not in the group will be sent invitations. Existing group members who aren't in the list will be removed from the group.

sis_group_id string

The sis ID of the group. Must have manage_sis permission to set.

Example Request:

curl https://<canvas>/api/v1/groups/<group_id> \
     -X PUT \
     -F 'name=Algebra Teachers' \
     -F 'join_level=parent_context_request' \
     -H 'Authorization: Bearer <token>'
Returns a Group

Delete a group GroupsController#destroy

DELETE /api/v1/groups/:group_id

Scope: url:DELETE|/api/v1/groups/:group_id

Deletes a group and removes all members.

Example Request:

curl https://<canvas>/api/v1/groups/<group_id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'
Returns a Group

Invite others to a group GroupsController#invite

POST /api/v1/groups/:group_id/invite

Scope: url:POST|/api/v1/groups/:group_id/invite

Sends an invitation to all supplied email addresses which will allow the receivers to join the group.

Request Parameters:

Parameter Type Description
invitees[] Required string

An array of email addresses to be sent invitations.

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/invite \
     -F 'invitees[]=leonard@example.com' \
     -F 'invitees[]=sheldon@example.com' \
     -H 'Authorization: Bearer <token>'

List group's users GroupsController#users

GET /api/v1/groups/:group_id/users

Scope: url:GET|/api/v1/groups/:group_id/users

Returns a paginated list of users in the group.

Request Parameters:

Parameter Type Description
search_term string

The partial name or full ID of the users to match and return in the results list. Must be at least 3 characters.

include[] string
  • “avatar_url”: Include users' avatar_urls.

Allowed values: avatar_url

Example Request:

curl https://<canvas>/api/v1/groups/1/users \
     -H 'Authorization: Bearer <token>'
Returns a list of Users

Upload a file GroupsController#create_file

POST /api/v1/groups/:group_id/files

Scope: url:POST|/api/v1/groups/:group_id/files

Upload a file to the group.

This API endpoint is the first step in uploading a file to a group. See the File Upload Documentation for details on the file upload workflow.

Only those with the “Manage Files” permission on a group can upload files to the group. By default, this is anybody participating in the group, or any admin over the group.

Preview processed html GroupsController#preview_html

POST /api/v1/groups/:group_id/preview_html

Scope: url:POST|/api/v1/groups/:group_id/preview_html

Preview html content processed for this group

Request Parameters:

Parameter Type Description
html string

The html content to process

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/preview_html \
     -F 'html=<p><badhtml></badhtml>processed html</p>' \
     -H 'Authorization: Bearer <token>'

Example Response:

{
  "html": "<p>processed html</p>"
}

Group activity stream GroupsController#activity_stream

GET /api/v1/groups/:group_id/activity_stream

Scope: url:GET|/api/v1/groups/:group_id/activity_stream

Returns the current user's group-specific activity stream, paginated.

For full documentation, see the API documentation for the user activity stream, in the user api.

Group activity stream summary GroupsController#activity_stream_summary

GET /api/v1/groups/:group_id/activity_stream/summary

Scope: url:GET|/api/v1/groups/:group_id/activity_stream/summary

Returns a summary of the current user's group-specific activity stream.

For full documentation, see the API documentation for the user activity stream summary, in the user api.

List group memberships GroupMembershipsController#index

GET /api/v1/groups/:group_id/memberships

Scope: url:GET|/api/v1/groups/:group_id/memberships

A paginated list of the members of a group.

Request Parameters:

Parameter Type Description
filter_states[] string

Only list memberships with the given workflow_states. By default it will return all memberships.

Allowed values: accepted, invited, requested

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/memberships \
     -F 'filter_states[]=invited&filter_states[]=requested' \
     -H 'Authorization: Bearer <token>'
Returns a list of GroupMemberships

Get a single group membership GroupMembershipsController#show

GET /api/v1/groups/:group_id/memberships/:membership_id

Scope: url:GET|/api/v1/groups/:group_id/memberships/:membership_id

GET /api/v1/groups/:group_id/users/:user_id

Scope: url:GET|/api/v1/groups/:group_id/users/:user_id

Returns the group membership with the given membership id or user id.

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/memberships/<membership_id> \
     -H 'Authorization: Bearer <token>'

curl https://<canvas>/api/v1/groups/<group_id>/users/<user_id> \
     -H 'Authorization: Bearer <token>'
Returns a GroupMembership

Create a membership GroupMembershipsController#create

POST /api/v1/groups/:group_id/memberships

Scope: url:POST|/api/v1/groups/:group_id/memberships

Join, or request to join, a group, depending on the join_level of the group. If the membership or join request already exists, then it is simply returned

Request Parameters:

Parameter Type Description
user_id string

no description

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/memberships \
     -F 'user_id=self'
     -H 'Authorization: Bearer <token>'
Returns a GroupMembership

Update a membership GroupMembershipsController#update

PUT /api/v1/groups/:group_id/memberships/:membership_id

Scope: url:PUT|/api/v1/groups/:group_id/memberships/:membership_id

PUT /api/v1/groups/:group_id/users/:user_id

Scope: url:PUT|/api/v1/groups/:group_id/users/:user_id

Accept a membership request, or add/remove moderator rights.

Request Parameters:

Parameter Type Description
workflow_state string

Currently, the only allowed value is “accepted”

Allowed values: accepted

moderator string

no description

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/memberships/<membership_id> \
     -F 'moderator=true'
     -H 'Authorization: Bearer <token>'

curl https://<canvas>/api/v1/groups/<group_id>/users/<user_id> \
     -F 'moderator=true'
     -H 'Authorization: Bearer <token>'
Returns a GroupMembership

Leave a group GroupMembershipsController#destroy

DELETE /api/v1/groups/:group_id/memberships/:membership_id

Scope: url:DELETE|/api/v1/groups/:group_id/memberships/:membership_id

DELETE /api/v1/groups/:group_id/users/:user_id

Scope: url:DELETE|/api/v1/groups/:group_id/users/:user_id

Leave a group if you are allowed to leave (some groups, such as sets of course groups created by teachers, cannot be left). You may also use 'self' in place of a membership_id.

Example Request:

curl https://<canvas>/api/v1/groups/<group_id>/memberships/<membership_id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'

curl https://<canvas>/api/v1/groups/<group_id>/users/<user_id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'

Create JWT JwtsController#create

POST /api/v1/jwts

Scope: url:POST|/api/v1/jwts

Create a unique jwt for using with other canvas services

Generates a different JWT each time it's called, each one expires after a short window (1 hour)

Example Request:

curl 'https://<canvas>/api/v1/jwts' \
      -X POST \
      -H "Accept: application/json" \
      -H 'Authorization: Bearer <token>'
Returns a JWT

Refresh JWT JwtsController#refresh

POST /api/v1/jwts/refresh

Scope: url:POST|/api/v1/jwts/refresh

Refresh a JWT for use with other canvas services

Generates a different JWT each time it's called, each one expires after a short window (1 hour).

Request Parameters:

Parameter Type Description
jwt Required string

An existing JWT token to be refreshed. The new token will have the same context and workflows as the existing token.

Example Request:

curl 'https://<canvas>/api/v1/jwts/refresh' \
      -X POST \
      -H "Accept: application/json" \
      -H 'Authorization: Bearer <token>'
      -d 'jwt=<jwt>'
Returns a JWT

Get a late policy LatePolicyController#show

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:id/late_policy

Scope: url:GET|/api/v1/courses/:id/late_policy

Returns the late policy for a course.

Example Response:

{
  "late_policy": LatePolicy
}

Create a late policy LatePolicyController#create

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/courses/:id/late_policy

Scope: url:POST|/api/v1/courses/:id/late_policy

Create a late policy. If the course already has a late policy, a bad_request is returned since there can only be one late policy per course.

Request Parameters:

Parameter Type Description
late_policy[missing_submission_deduction_enabled] boolean

Whether to enable the missing submission deduction late policy.

late_policy[missing_submission_deduction] number

How many percentage points to deduct from a missing submission.

late_policy[late_submission_deduction_enabled] boolean

Whether to enable the late submission deduction late policy.

late_policy[late_submission_deduction] number

How many percentage points to deduct per the late submission interval.

late_policy[late_submission_interval] string

The interval for late policies.

late_policy[late_submission_minimum_percent_enabled] boolean

Whether to enable the late submission minimum percent for a late policy.

late_policy[late_submission_minimum_percent] number

The minimum grade a submissions can have in percentage points.

Example Response:

{
  "late_policy": LatePolicy
}

Patch a late policy LatePolicyController#update

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

PATCH /api/v1/courses/:id/late_policy

Scope: url:PATCH|/api/v1/courses/:id/late_policy

Patch a late policy. No body is returned upon success.

Request Parameters:

Parameter Type Description
late_policy[missing_submission_deduction_enabled] boolean

Whether to enable the missing submission deduction late policy.

late_policy[missing_submission_deduction] number

How many percentage points to deduct from a missing submission.

late_policy[late_submission_deduction_enabled] boolean

Whether to enable the late submission deduction late policy.

late_policy[late_submission_deduction] number

How many percentage points to deduct per the late submission interval.

late_policy[late_submission_interval] string

The interval for late policies.

late_policy[late_submission_minimum_percent_enabled] boolean

Whether to enable the late submission minimum percent for a late policy.

late_policy[late_submission_minimum_percent] number

The minimum grade a submissions can have in percentage points.

Create live assessment results LiveAssessments::ResultsController#create

POST /api/v1/courses/:course_id/live_assessments/:assessment_id/results

Scope: url:POST|/api/v1/courses/:course_id/live_assessments/:assessment_id/results

Creates live assessment results and adds them to a live assessment

Example Request:

{
  "results": [{
    "passed": false,
    "assessed_at": "2014-05-26T14:57:23-07:00",
    "links": {
      "user": "15"
    }
  },{
    "passed": true,
    "assessed_at": "2014-05-26T13:05:40-07:00",
    "links": {
      "user": "16"
    }
  }]
}

Example Response:

{
  "results": [Result]
}

List live assessment results LiveAssessments::ResultsController#index

GET /api/v1/courses/:course_id/live_assessments/:assessment_id/results

Scope: url:GET|/api/v1/courses/:course_id/live_assessments/:assessment_id/results

Returns a paginated list of live assessment results

Request Parameters:

Parameter Type Description
user_id integer

If set, restrict results to those for this user

Example Response:

{
  "results": [Result]
}

Create or find a live assessment LiveAssessments::AssessmentsController#create

POST /api/v1/courses/:course_id/live_assessments

Scope: url:POST|/api/v1/courses/:course_id/live_assessments

Creates or finds an existing live assessment with the given key and aligns it with the linked outcome

Example Request:

{
  "assessments": [{
    "key": "2014-05-27-Outcome-52",
    "title": "Tuesday's LiveAssessment",
    "links": {
      "outcome": "1"
    }
  }]
}

Example Response:

{
  "links": {
    "assessments.results": "http://example.com/courses/1/live_assessments/5/results"
  },
  "assessments": [Assessment]
}

List live assessments LiveAssessments::AssessmentsController#index

GET /api/v1/courses/:course_id/live_assessments

Scope: url:GET|/api/v1/courses/:course_id/live_assessments

Returns a paginated list of live assessments.

Example Response:

{
  "links": {
    "assessments.results": "http://example.com/courses/1/live_assessments/{assessments.id}/results"
  },
  "assessments": [Assessment]
}

List user logins PseudonymsController#index

GET /api/v1/accounts/:account_id/logins

Scope: url:GET|/api/v1/accounts/:account_id/logins

GET /api/v1/users/:user_id/logins

Scope: url:GET|/api/v1/users/:user_id/logins

Given a user ID, return a paginated list of that user's logins for the given account.

API response field:

  • account_id

    The ID of the login's account.

  • id

    The unique, numeric ID for the login.

  • sis_user_id

    The login's unique SIS ID.

  • integration_id

    The login's unique integration ID.

  • unique_id

    The unique ID for the login.

  • user_id

    The unique ID of the login's user.

  • authentication_provider_id

    The ID of the authentication provider that this login is associated with

  • authentication_provider_type

    The type of the authentication provider that this login is associated with

Example Response:

[
  {
    "account_id": 1,
    "id" 2,
    "sis_user_id": null,
    "unique_id": "belieber@example.com",
    "user_id": 2,
    "authentication_provider_id": 1,
    "authentication_provider_type": "facebook"
  }
]

Create a user login PseudonymsController#create

POST /api/v1/accounts/:account_id/logins

Scope: url:POST|/api/v1/accounts/:account_id/logins

Create a new login for an existing user in the given account.

Request Parameters:

Parameter Type Description
user[id] Required string

The ID of the user to create the login for.

login[unique_id] Required string

The unique ID for the new login.

login[password] string

The new login's password.

login[sis_user_id] string

SIS ID for the login. To set this parameter, the caller must be able to manage SIS permissions on the account.

login[integration_id] string

Integration ID for the login. To set this parameter, the caller must be able to manage SIS permissions on the account. The Integration ID is a secondary identifier useful for more complex SIS integrations.

login[authentication_provider_id] string

The authentication provider this login is associated with. Logins associated with a specific provider can only be used with that provider. Legacy providers (LDAP, CAS, SAML) will search for logins associated with them, or unassociated logins. New providers will only search for logins explicitly associated with them. This can be the integer ID of the provider, or the type of the provider (in which case, it will find the first matching provider).

Example Request:

#create a facebook login for user with ID 123
curl 'https://<canvas>/api/v1/accounts/<account_id>/logins' \
     -F 'user[id]=123' \
     -F 'login[unique_id]=112233445566' \
     -F 'login[authentication_provider_id]=facebook' \
     -H 'Authorization: Bearer <token>'

Edit a user login PseudonymsController#update

PUT /api/v1/accounts/:account_id/logins/:id

Scope: url:PUT|/api/v1/accounts/:account_id/logins/:id

Update an existing login for a user in the given account.

Request Parameters:

Parameter Type Description
login[unique_id] string

The new unique ID for the login.

login[password] string

The new password for the login. Can only be set by an admin user if admins are allowed to change passwords for the account.

login[sis_user_id] string

SIS ID for the login. To set this parameter, the caller must be able to manage SIS permissions on the account.

login[integration_id] string

Integration ID for the login. To set this parameter, the caller must be able to manage SIS permissions on the account. The Integration ID is a secondary identifier useful for more complex SIS integrations.

Delete a user login PseudonymsController#destroy

DELETE /api/v1/users/:user_id/logins/:id

Scope: url:DELETE|/api/v1/users/:user_id/logins/:id

Delete an existing login.

Example Request:

curl https://<canvas>/api/v1/users/:user_id/logins/:login_id \
  -H "Authorization: Bearer <ACCESS-TOKEN>" \
  -X DELETE

Example Response:

{
  "unique_id": "bieber@example.com",
  "sis_user_id": null,
  "account_id": 1,
  "id": 12345,
  "user_id": 2
}

List students selected for moderation ModerationSetController#index

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

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

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

Returns a paginated list of students selected for moderation

Returns a list of Users

Select students for moderation ModerationSetController#create

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/courses/:course_id/assignments/:assignment_id/moderated_students

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/moderated_students

Returns an array of users that were selected for moderation

Request Parameters:

Parameter Type Description
student_ids[] number

user ids for students to select for moderation

Returns a list of Users

Show provisional grade status for a student ProvisionalGradesController#status

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/status

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

Tell whether the student's submission needs one or more provisional grades.

Request Parameters:

Parameter Type Description
student_id integer

The id of the student to show the status for

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/provisional_grades/status?student_id=1'

Example Response:

{ "needs_provisional_grade": false }

Select provisional grade ProvisionalGradesController#select

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

PUT /api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/:provisional_grade_id/select

Scope: url:PUT|/api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/:provisional_grade_id/select

Choose which provisional grade the student should receive for a submission. The caller must have :moderate_grades rights.

Example Response:

{
  "assignment_id": 867,
  "student_id": 5309,
  "selected_provisional_grade_id": 53669
}

Copy provisional grade ProvisionalGradesController#copy_to_final_mark

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/:provisional_grade_id/copy_to_final_mark

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/:provisional_grade_id/copy_to_final_mark

Given a provisional grade, copy the grade (and associated submission comments and rubric assessments) to a “final” mark which can be edited or commented upon by a moderator prior to publication of grades.

Notes:

  • The student must be in the moderation set for the assignment.

  • The newly created grade will be selected.

  • The caller must have “Moderate Grades” rights in the course.

Returns a ProvisionalGrade

Publish provisional grades for an assignment ProvisionalGradesController#publish

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/publish

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/provisional_grades/publish

Publish the selected provisional grade for all submissions to an assignment. Use the “Select provisional grade” endpoint to choose which provisional grade to publish for a particular submission.

Students not in the moderation set will have their one and only provisional grade published.

WARNING: This is irreversible. This will overwrite existing grades in the gradebook.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/provisional_grades/publish' \
     -X POST

Show provisional grade status for a student AnonymousProvisionalGradesController#status

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/courses/:course_id/assignments/:assignment_id/anonymous_provisional_grades/status

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

Determine whether or not the student's submission needs one or more provisional grades.

Request Parameters:

Parameter Type Description
anonymous_id string

The id of the student to show the status for

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/anonymous_provisional_grades/status?anonymous_id=1'

Example Response:

{ "needs_provisional_grade": false }

List modules ContextModulesApiController#index

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

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

A paginated list of the modules in a course

Request Parameters:

Parameter Type Description
include[] string
  • “items”: Return module items inline if possible. This parameter suggests that Canvas return module items directly in the Module object JSON, to avoid having to make separate API requests for each module when enumerating modules and items. Canvas is free to omit 'items' for any particular module if it deems them too numerous to return inline. Callers must be prepared to use the List Module Items API if items are not returned.

  • “content_details”: Requires include. Returns additional details with module items specific to their associated content items. Includes standard lock information for each item.

Allowed values: items, content_details

search_term string

The partial name of the modules (and module items, if include is specified) to match and return.

student_id string

Returns module completion information for the student with this id.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/222/modules
Returns a list of Modules

Show module ContextModulesApiController#show

GET /api/v1/courses/:course_id/modules/:id

Scope: url:GET|/api/v1/courses/:course_id/modules/:id

Get information about a single module

Request Parameters:

Parameter Type Description
include[] string
  • “items”: Return module items inline if possible. This parameter suggests that Canvas return module items directly in the Module object JSON, to avoid having to make separate API requests for each module when enumerating modules and items. Canvas is free to omit 'items' for any particular module if it deems them too numerous to return inline. Callers must be prepared to use the List Module Items API if items are not returned.

  • “content_details”: Requires include. Returns additional details with module items specific to their associated content items. Includes standard lock information for each item.

Allowed values: items, content_details

student_id string

Returns module completion information for the student with this id.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/222/modules/123
Returns a Module

Create a module ContextModulesApiController#create

POST /api/v1/courses/:course_id/modules

Scope: url:POST|/api/v1/courses/:course_id/modules

Create and return a new module

Request Parameters:

Parameter Type Description
module[name] Required string

The name of the module

module[unlock_at] DateTime

The date the module will unlock

module[position] integer

The position of this module in the course (1-based)

module[require_sequential_progress] boolean

Whether module items must be unlocked in order

module[prerequisite_module_ids][] string

IDs of Modules that must be completed before this one is unlocked. Prerequisite modules must precede this module (i.e. have a lower position value), otherwise they will be ignored

module[publish_final_grade] boolean

Whether to publish the student's final grade for the course upon completion of this module.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -d 'module[name]=module' \
  -d 'module[position]=2' \
  -d 'module[prerequisite_module_ids][]=121' \
  -d 'module[prerequisite_module_ids][]=122'
Returns a Module

Update a module ContextModulesApiController#update

PUT /api/v1/courses/:course_id/modules/:id

Scope: url:PUT|/api/v1/courses/:course_id/modules/:id

Update and return an existing module

Request Parameters:

Parameter Type Description
module[name] string

The name of the module

module[unlock_at] DateTime

The date the module will unlock

module[position] integer

The position of the module in the course (1-based)

module[require_sequential_progress] boolean

Whether module items must be unlocked in order

module[prerequisite_module_ids][] string

IDs of Modules that must be completed before this one is unlocked Prerequisite modules must precede this module (i.e. have a lower position value), otherwise they will be ignored

module[publish_final_grade] boolean

Whether to publish the student's final grade for the course upon completion of this module.

module[published] boolean

Whether the module is published and visible to students

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id> \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'module[name]=module' \
  -d 'module[position]=2' \
  -d 'module[prerequisite_module_ids][]=121' \
  -d 'module[prerequisite_module_ids][]=122'
Returns a Module

Delete module ContextModulesApiController#destroy

DELETE /api/v1/courses/:course_id/modules/:id

Scope: url:DELETE|/api/v1/courses/:course_id/modules/:id

Delete a module

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id> \
  -X Delete \
  -H 'Authorization: Bearer <token>'
Returns a Module

Re-lock module progressions ContextModulesApiController#relock

PUT /api/v1/courses/:course_id/modules/:id/relock

Scope: url:PUT|/api/v1/courses/:course_id/modules/:id/relock

Resets module progressions to their default locked state and recalculates them based on the current requirements.

Adding progression requirements to an active course will not lock students out of modules they have already unlocked unless this action is called.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/relock \
  -X PUT \
  -H 'Authorization: Bearer <token>'
Returns a Module

List module items ContextModuleItemsApiController#index

GET /api/v1/courses/:course_id/modules/:module_id/items

Scope: url:GET|/api/v1/courses/:course_id/modules/:module_id/items

A paginated list of the items in a module

Request Parameters:

Parameter Type Description
include[] string

If included, will return additional details specific to the content associated with each item. Refer to the Module Item specification for more details. Includes standard lock information for each item.

Allowed values: content_details

search_term string

The partial title of the items to match and return.

student_id string

Returns module completion information for the student with this id.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/222/modules/123/items
Returns a list of ModuleItems

Show module item ContextModuleItemsApiController#show

GET /api/v1/courses/:course_id/modules/:module_id/items/:id

Scope: url:GET|/api/v1/courses/:course_id/modules/:module_id/items/:id

Get information about a single module item

Request Parameters:

Parameter Type Description
include[] string

If included, will return additional details specific to the content associated with this item. Refer to the Module Item specification for more details. Includes standard lock information for each item.

Allowed values: content_details

student_id string

Returns module completion information for the student with this id.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/222/modules/123/items/768
Returns a ModuleItem

Create a module item ContextModuleItemsApiController#create

POST /api/v1/courses/:course_id/modules/:module_id/items

Scope: url:POST|/api/v1/courses/:course_id/modules/:module_id/items

Create and return a new module item

Request Parameters:

Parameter Type Description
module_item[title] string

The name of the module item and associated content

module_item[type] Required string

The type of content linked to the item

Allowed values: File, Page, Discussion, Assignment, Quiz, SubHeader, ExternalUrl, ExternalTool

module_item[content_id] Required string

The id of the content to link to the module item. Required, except for 'ExternalUrl', 'Page', and 'SubHeader' types.

module_item[position] integer

The position of this item in the module (1-based).

module_item[indent] integer

0-based indent level; module items may be indented to show a hierarchy

module_item[page_url] string

Suffix for the linked wiki page (e.g. 'front-page'). Required for 'Page' type.

module_item[external_url] string

External url that the item points to. [Required for 'ExternalUrl' and 'ExternalTool' types.

module_item[new_tab] boolean

Whether the external tool opens in a new tab. Only applies to 'ExternalTool' type.

module_item[completion_requirement][type] string

Completion requirement for this module item. “must_view”: Applies to all item types “must_contribute”: Only applies to “Assignment”, “Discussion”, and “Page” types “must_submit”, “min_score”: Only apply to “Assignment” and “Quiz” types Inapplicable types will be ignored

Allowed values: must_view, must_contribute, must_submit

module_item[completion_requirement][min_score] integer

Minimum score required to complete. Required for completion_requirement type 'min_score'.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -d 'module_item[title]=module item' \
  -d 'module_item[type]=ExternalTool' \
  -d 'module_item[content_id]=10' \
  -d 'module_item[position]=2' \
  -d 'module_item[indent]=1' \
  -d 'module_item[new_tab]=true'
Returns a ModuleItem

Update a module item ContextModuleItemsApiController#update

PUT /api/v1/courses/:course_id/modules/:module_id/items/:id

Scope: url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id

Update and return an existing module item

Request Parameters:

Parameter Type Description
module_item[title] string

The name of the module item

module_item[position] integer

The position of this item in the module (1-based)

module_item[indent] integer

0-based indent level; module items may be indented to show a hierarchy

module_item[external_url] string

External url that the item points to. Only applies to 'ExternalUrl' type.

module_item[new_tab] boolean

Whether the external tool opens in a new tab. Only applies to 'ExternalTool' type.

module_item[completion_requirement][type] string

Completion requirement for this module item. “must_view”: Applies to all item types “must_contribute”: Only applies to “Assignment”, “Discussion”, and “Page” types “must_submit”, “min_score”: Only apply to “Assignment” and “Quiz” types Inapplicable types will be ignored

Allowed values: must_view, must_contribute, must_submit

module_item[completion_requirement][min_score] integer

Minimum score required to complete, Required for completion_requirement type 'min_score'.

module_item[published] boolean

Whether the module item is published and visible to students.

module_item[module_id] string

Move this item to another module by specifying the target module id here. The target module must be in the same course.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items/<item_id> \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'module_item[position]=2' \
  -d 'module_item[indent]=1' \
  -d 'module_item[new_tab]=true'
Returns a ModuleItem

Select a mastery path ContextModuleItemsApiController#select_mastery_path

POST /api/v1/courses/:course_id/modules/:module_id/items/:id/select_mastery_path

Scope: url:POST|/api/v1/courses/:course_id/modules/:module_id/items/:id/select_mastery_path

Select a mastery path when module item includes several possible paths. Requires Mastery Paths feature to be enabled. Returns a compound document with the assignments included in the given path and any module items related to those assignments

Request Parameters:

Parameter Type Description
assignment_set_id string

Assignment set chosen, as specified in the mastery_paths portion of the context module item response

student_id string

Which student the selection applies to. If not specified, current user is implied.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items/<item_id>/select_master_path \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -d 'assignment_set_id=2992'

Delete module item ContextModuleItemsApiController#destroy

DELETE /api/v1/courses/:course_id/modules/:module_id/items/:id

Scope: url:DELETE|/api/v1/courses/:course_id/modules/:module_id/items/:id

Delete a module item

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items/<item_id> \
  -X Delete \
  -H 'Authorization: Bearer <token>'
Returns a ModuleItem

Mark module item as done/not done ContextModuleItemsApiController#mark_as_done

PUT /api/v1/courses/:course_id/modules/:module_id/items/:id/done

Scope: url:PUT|/api/v1/courses/:course_id/modules/:module_id/items/:id/done

Mark a module item as done/not done. Use HTTP method PUT to mark as done, and DELETE to mark as not done.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items/<item_id>/done \
  -X Put \
  -H 'Authorization: Bearer <token>'

Get module item sequence ContextModuleItemsApiController#item_sequence

GET /api/v1/courses/:course_id/module_item_sequence

Scope: url:GET|/api/v1/courses/:course_id/module_item_sequence

Given an asset in a course, find the ModuleItem it belongs to, the previous and next Module Items in the course sequence, and also any applicable mastery path rules

Request Parameters:

Parameter Type Description
asset_type string

The type of asset to find module sequence information for. Use the ModuleItem if it is known (e.g., the user navigated from a module item), since this will avoid ambiguity if the asset appears more than once in the module sequence.

Allowed values: ModuleItem, File, Page, Discussion, Assignment, Quiz, ExternalTool

asset_id integer

The id of the asset (or the url in the case of a Page)

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/module_item_sequence?asset_type=Assignment&asset_id=123 \
  -H 'Authorization: Bearer <token>'
Returns a ModuleItemSequence

Mark module item read ContextModuleItemsApiController#mark_item_read

POST /api/v1/courses/:course_id/modules/:module_id/items/:id/mark_read

Scope: url:POST|/api/v1/courses/:course_id/modules/:module_id/items/:id/mark_read

Fulfills “must view” requirement for a module item. It is generally not necessary to do this explicitly, but it is provided for applications that need to access external content directly (bypassing the html_url redirect that normally allows Canvas to fulfill “must view” requirements).

This endpoint cannot be used to complete requirements on locked or unpublished module items.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/modules/<module_id>/items/<item_id>/mark_read \
  -X POST \
  -H 'Authorization: Bearer <token>'

List preferences NotificationPreferencesController#index

GET /api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preferences

Scope: url:GET|/api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preferences

GET /api/v1/users/:user_id/communication_channels/:type/:address/notification_preferences

Scope: url:GET|/api/v1/users/:user_id/communication_channels/:type/:address/notification_preferences

Fetch all preferences for the given communication channel

Returns a list of NotificationPreferences

List of preference categories NotificationPreferencesController#category_index

GET /api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preference_categories

Scope: url:GET|/api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preference_categories

Fetch all notification preference categories for the given communication channel

Get a preference NotificationPreferencesController#show

GET /api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preferences/:notification

Scope: url:GET|/api/v1/users/:user_id/communication_channels/:communication_channel_id/notification_preferences/:notification

GET /api/v1/users/:user_id/communication_channels/:type/:address/notification_preferences/:notification

Scope: url:GET|/api/v1/users/:user_id/communication_channels/:type/:address/notification_preferences/:notification

Fetch the preference for the given notification for the given communicaiton channel

Returns a NotificationPreference

Update a preference NotificationPreferencesController#update

PUT /api/v1/users/self/communication_channels/:communication_channel_id/notification_preferences/:notification

Scope: url:PUT|/api/v1/users/self/communication_channels/:communication_channel_id/notification_preferences/:notification

PUT /api/v1/users/self/communication_channels/:type/:address/notification_preferences/:notification

Scope: url:PUT|/api/v1/users/self/communication_channels/:type/:address/notification_preferences/:notification

Change the preference for a single notification for a single communication channel

Request Parameters:

Parameter Type Description
notification_preferences[frequency] Required string

The desired frequency for this notification

Update preferences by category NotificationPreferencesController#update_preferences_by_category

PUT /api/v1/users/self/communication_channels/:communication_channel_id/notification_preference_categories/:category

Scope: url:PUT|/api/v1/users/self/communication_channels/:communication_channel_id/notification_preference_categories/:category

Change the preferences for multiple notifications based on the category for a single communication channel

Request Parameters:

Parameter Type Description
category string

The name of the category. Must be parameterized (e.g. The category “Course Content” should be “course_content”)

notification_preferences[frequency] Required string

The desired frequency for each notification in the category

Update multiple preferences NotificationPreferencesController#update_all

PUT /api/v1/users/self/communication_channels/:communication_channel_id/notification_preferences

Scope: url:PUT|/api/v1/users/self/communication_channels/:communication_channel_id/notification_preferences

PUT /api/v1/users/self/communication_channels/:type/:address/notification_preferences

Scope: url:PUT|/api/v1/users/self/communication_channels/:type/:address/notification_preferences

Change the preferences for multiple notifications for a single communication channel at once

Request Parameters:

Parameter Type Description
notification_preferences[<X>][frequency] Required string

The desired frequency for <X> notification

Create an Originality Report Lti::OriginalityReportsApiController#create

POST /api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report

Scope: url:POST|/api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report

Create a new OriginalityReport for the specified file

Request Parameters:

Parameter Type Description
originality_report[file_id] integer

The id of the file being given an originality score. Required if creating a report associated with a file.

originality_report[originality_score] Required number

A number between 0 and 100 representing the measure of the specified file's originality.

originality_report[originality_report_url] string

The URL where the originality report for the specified file may be found.

originality_report[originality_report_file_id] integer

The ID of the file within Canvas that contains the originality report for the submitted file provided in the request URL.

originality_report[tool_setting][resource_type_code] string

The resource type code of the resource handler Canvas should use for the LTI launch for viewing originality reports. If set Canvas will launch to the message with type 'basic-lti-launch-request' in the specified resource handler rather than using the originality_report_url.

originality_report[tool_setting][resource_url] string

The URL Canvas should launch to when showing an LTI originality report. Note that this value is inferred from the specified resource handler's message “path” value (See `resource_type_code`) unless it is specified. If this parameter is used a `resource_type_code` must also be specified.

originality_report[workflow_state] string

May be set to “pending”, “error”, or “scored”. If an originality score is provided a workflow state of “scored” will be inferred.

Returns a OriginalityReport

Edit an Originality Report Lti::OriginalityReportsApiController#update

PUT /api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report/:id

Scope: url:PUT|/api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report/:id

PUT /api/lti/assignments/:assignment_id/files/:file_id/originality_report

Scope: url:PUT|/api/lti/assignments/:assignment_id/files/:file_id/originality_report

Modify an existing originality report. An alternative to this endpoint is to POST the same parameters listed below to the CREATE endpoint.

Request Parameters:

Parameter Type Description
originality_report[originality_score] number

A number between 0 and 100 representing the measure of the specified file's originality.

originality_report[originality_report_url] string

The URL where the originality report for the specified file may be found.

originality_report[originality_report_file_id] integer

The ID of the file within Canvas that contains the originality report for the submitted file provided in the request URL.

originality_report[tool_setting][resource_type_code] string

The resource type code of the resource handler Canvas should use for the LTI launch for viewing originality reports. If set Canvas will launch to the message with type 'basic-lti-launch-request' in the specified resource handler rather than using the originality_report_url.

originality_report[tool_setting][resource_url] string

The URL Canvas should launch to when showing an LTI originality report. Note that this value is inferred from the specified resource handler's message “path” value (See `resource_type_code`) unless it is specified. If this parameter is used a `resource_type_code` must also be specified.

originality_report[workflow_state] string

May be set to “pending”, “error”, or “scored”. If an originality score is provided a workflow state of “scored” will be inferred.

Returns a OriginalityReport

Show an Originality Report Lti::OriginalityReportsApiController#show

GET /api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report/:id

Scope: url:GET|/api/lti/assignments/:assignment_id/submissions/:submission_id/originality_report/:id

GET /api/lti/assignments/:assignment_id/files/:file_id/originality_report

Scope: url:GET|/api/lti/assignments/:assignment_id/files/:file_id/originality_report

Get a single originality report

Returns a OriginalityReport

Redirect to root outcome group for context OutcomeGroupsApiController#redirect

GET /api/v1/global/root_outcome_group

Scope: url:GET|/api/v1/global/root_outcome_group

GET /api/v1/accounts/:account_id/root_outcome_group

Scope: url:GET|/api/v1/accounts/:account_id/root_outcome_group

GET /api/v1/courses/:course_id/root_outcome_group

Scope: url:GET|/api/v1/courses/:course_id/root_outcome_group

Convenience redirect to find the root outcome group for a particular context. Will redirect to the appropriate outcome group's URL.

Get all outcome groups for context OutcomeGroupsApiController#index

GET /api/v1/accounts/:account_id/outcome_groups

Scope: url:GET|/api/v1/accounts/:account_id/outcome_groups

GET /api/v1/courses/:course_id/outcome_groups

Scope: url:GET|/api/v1/courses/:course_id/outcome_groups

Get all outcome links for context OutcomeGroupsApiController#link_index

GET /api/v1/accounts/:account_id/outcome_group_links

Scope: url:GET|/api/v1/accounts/:account_id/outcome_group_links

GET /api/v1/courses/:course_id/outcome_group_links

Scope: url:GET|/api/v1/courses/:course_id/outcome_group_links

Show an outcome group OutcomeGroupsApiController#show

GET /api/v1/global/outcome_groups/:id

Scope: url:GET|/api/v1/global/outcome_groups/:id

GET /api/v1/accounts/:account_id/outcome_groups/:id

Scope: url:GET|/api/v1/accounts/:account_id/outcome_groups/:id

GET /api/v1/courses/:course_id/outcome_groups/:id

Scope: url:GET|/api/v1/courses/:course_id/outcome_groups/:id

Update an outcome group OutcomeGroupsApiController#update

PUT /api/v1/global/outcome_groups/:id

Scope: url:PUT|/api/v1/global/outcome_groups/:id

PUT /api/v1/accounts/:account_id/outcome_groups/:id

Scope: url:PUT|/api/v1/accounts/:account_id/outcome_groups/:id

PUT /api/v1/courses/:course_id/outcome_groups/:id

Scope: url:PUT|/api/v1/courses/:course_id/outcome_groups/:id

Modify an existing outcome group. Fields not provided are left as is; unrecognized fields are ignored.

When changing the parent outcome group, the new parent group must belong to the same context as this outcome group, and must not be a descendant of this outcome group (i.e. no cycles allowed).

Request Parameters:

Parameter Type Description
title string

The new outcome group title.

description string

The new outcome group description.

vendor_guid string

A custom GUID for the learning standard.

parent_outcome_group_id integer

The id of the new parent outcome group.

Example Request:

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/2.json' \
     -X PUT \
     -F 'title=Outcome Group Title' \
     -F 'description=Outcome group description' \
     -F 'vendor_guid=customid9000' \
     -F 'parent_outcome_group_id=1' \
     -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/2.json' \
     -X PUT \
     --data-binary '{
           "title": "Outcome Group Title",
           "description": "Outcome group description",
           "vendor_guid": "customid9000",
           "parent_outcome_group_id": 1
         }' \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer <token>"
Returns a OutcomeGroup

Delete an outcome group OutcomeGroupsApiController#destroy

DELETE /api/v1/global/outcome_groups/:id

Scope: url:DELETE|/api/v1/global/outcome_groups/:id

DELETE /api/v1/accounts/:account_id/outcome_groups/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/outcome_groups/:id

DELETE /api/v1/courses/:course_id/outcome_groups/:id

Scope: url:DELETE|/api/v1/courses/:course_id/outcome_groups/:id

Deleting an outcome group deletes descendant outcome groups and outcome links. The linked outcomes themselves are only deleted if all links to the outcome were deleted.

Aligned outcomes cannot be deleted; as such, if all remaining links to an aligned outcome are included in this group's descendants, the group deletion will fail.

Example Request:

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/2.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"
Returns a OutcomeGroup

List linked outcomes OutcomeGroupsApiController#outcomes

GET /api/v1/global/outcome_groups/:id/outcomes

Scope: url:GET|/api/v1/global/outcome_groups/:id/outcomes

GET /api/v1/accounts/:account_id/outcome_groups/:id/outcomes

Scope: url:GET|/api/v1/accounts/:account_id/outcome_groups/:id/outcomes

GET /api/v1/courses/:course_id/outcome_groups/:id/outcomes

Scope: url:GET|/api/v1/courses/:course_id/outcome_groups/:id/outcomes

A paginated list of the immediate OutcomeLink children of the outcome group.

Request Parameters:

Parameter Type Description
outcome_style string

The detail level of the outcomes. Defaults to “abbrev”. Specify “full” for more information.

Returns a list of OutcomeLinks

Create/link an outcome OutcomeGroupsApiController#link

POST /api/v1/global/outcome_groups/:id/outcomes

Scope: url:POST|/api/v1/global/outcome_groups/:id/outcomes

PUT /api/v1/global/outcome_groups/:id/outcomes/:outcome_id

Scope: url:PUT|/api/v1/global/outcome_groups/:id/outcomes/:outcome_id

POST /api/v1/accounts/:account_id/outcome_groups/:id/outcomes

Scope: url:POST|/api/v1/accounts/:account_id/outcome_groups/:id/outcomes

PUT /api/v1/accounts/:account_id/outcome_groups/:id/outcomes/:outcome_id

Scope: url:PUT|/api/v1/accounts/:account_id/outcome_groups/:id/outcomes/:outcome_id

POST /api/v1/courses/:course_id/outcome_groups/:id/outcomes

Scope: url:POST|/api/v1/courses/:course_id/outcome_groups/:id/outcomes

PUT /api/v1/courses/:course_id/outcome_groups/:id/outcomes/:outcome_id

Scope: url:PUT|/api/v1/courses/:course_id/outcome_groups/:id/outcomes/:outcome_id

Link an outcome into the outcome group. The outcome to link can either be specified by a PUT to the link URL for a specific outcome (the outcome_id in the PUT URLs) or by supplying the information for a new outcome (title, description, ratings, mastery_points) in a POST to the collection.

If linking an existing outcome, the outcome_id must identify an outcome available to this context; i.e. an outcome owned by this group's context, an outcome owned by an associated account, or a global outcome. With outcome_id present, any other parameters (except move_from) are ignored.

If defining a new outcome, the outcome is created in the outcome group's context using the provided title, description, ratings, and mastery points; the title is required but all other fields are optional. The new outcome is then linked into the outcome group.

If ratings are provided when creating a new outcome, an embedded rubric criterion is included in the new outcome. This criterion's mastery_points default to the maximum points in the highest rating if not specified in the mastery_points parameter. Any ratings lacking a description are given a default of “No description”. Any ratings lacking a point value are given a default of 0. If no ratings are provided, the mastery_points parameter is ignored.

Request Parameters:

Parameter Type Description
outcome_id integer

The ID of the existing outcome to link.

move_from integer

The ID of the old outcome group. Only used if outcome_id is present.

title string

The title of the new outcome. Required if outcome_id is absent.

display_name string

A friendly name shown in reports for outcomes with cryptic titles, such as common core standards names.

description string

The description of the new outcome.

vendor_guid string

A custom GUID for the learning standard.

mastery_points integer

The mastery threshold for the embedded rubric criterion.

ratings[][description] string

The description of a rating level for the embedded rubric criterion.

ratings[][points] integer

The points corresponding to a rating level for the embedded rubric criterion.

calculation_method string

The new calculation method. Defaults to “highest”

Allowed values: decaying_average, n_mastery, latest, highest

calculation_int integer

The new calculation int. Only applies if the calculation_method is “decaying_average” or “n_mastery”

Example Request:

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/outcomes/1.json' \
     -X PUT \
     -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/outcomes.json' \
     -X POST \
     -F 'title=Outcome Title' \
     -F 'display_name=Title for reporting' \
     -F 'description=Outcome description' \
     -F 'vendor_guid=customid9000' \
     -F 'mastery_points=3' \
     -F 'calculation_method=decaying_average' \
     -F 'calculation_int=75' \
     -F 'ratings[][description]=Exceeds Expectations' \
     -F 'ratings[][points]=5' \
     -F 'ratings[][description]=Meets Expectations' \
     -F 'ratings[][points]=3' \
     -F 'ratings[][description]=Does Not Meet Expectations' \
     -F 'ratings[][points]=0' \
     -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/outcomes.json' \
     -X POST \
     --data-binary '{
           "title": "Outcome Title",
           "display_name": "Title for reporting",
           "description": "Outcome description",
           "vendor_guid": "customid9000",
           "mastery_points": 3,
           "ratings": [
             { "description": "Exceeds Expectations", "points": 5 },
             { "description": "Meets Expectations", "points": 3 },
             { "description": "Does Not Meet Expectations", "points": 0 }
           ]
         }' \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer <token>"
Returns a OutcomeLink

Unlink an outcome OutcomeGroupsApiController#unlink

DELETE /api/v1/global/outcome_groups/:id/outcomes/:outcome_id

Scope: url:DELETE|/api/v1/global/outcome_groups/:id/outcomes/:outcome_id

DELETE /api/v1/accounts/:account_id/outcome_groups/:id/outcomes/:outcome_id

Scope: url:DELETE|/api/v1/accounts/:account_id/outcome_groups/:id/outcomes/:outcome_id

DELETE /api/v1/courses/:course_id/outcome_groups/:id/outcomes/:outcome_id

Scope: url:DELETE|/api/v1/courses/:course_id/outcome_groups/:id/outcomes/:outcome_id

Unlinking an outcome only deletes the outcome itself if this was the last link to the outcome in any group in any context. Aligned outcomes cannot be deleted; as such, if this is the last link to an aligned outcome, the unlinking will fail.

Example Request:

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/outcomes/1.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"
Returns a OutcomeLink

List subgroups OutcomeGroupsApiController#subgroups

GET /api/v1/global/outcome_groups/:id/subgroups

Scope: url:GET|/api/v1/global/outcome_groups/:id/subgroups

GET /api/v1/accounts/:account_id/outcome_groups/:id/subgroups

Scope: url:GET|/api/v1/accounts/:account_id/outcome_groups/:id/subgroups

GET /api/v1/courses/:course_id/outcome_groups/:id/subgroups

Scope: url:GET|/api/v1/courses/:course_id/outcome_groups/:id/subgroups

A paginated list of the immediate OutcomeGroup children of the outcome group.

Returns a list of OutcomeGroups

Create a subgroup OutcomeGroupsApiController#create

POST /api/v1/global/outcome_groups/:id/subgroups

Scope: url:POST|/api/v1/global/outcome_groups/:id/subgroups

POST /api/v1/accounts/:account_id/outcome_groups/:id/subgroups

Scope: url:POST|/api/v1/accounts/:account_id/outcome_groups/:id/subgroups

POST /api/v1/courses/:course_id/outcome_groups/:id/subgroups

Scope: url:POST|/api/v1/courses/:course_id/outcome_groups/:id/subgroups

Creates a new empty subgroup under the outcome group with the given title and description.

Request Parameters:

Parameter Type Description
title Required string

The title of the new outcome group.

description string

The description of the new outcome group.

vendor_guid string

A custom GUID for the learning standard

Example Request:

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/subgroups.json' \
     -X POST \
     -F 'title=Outcome Group Title' \
     -F 'description=Outcome group description' \
     -F 'vendor_guid=customid9000' \
     -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/accounts/1/outcome_groups/1/subgroups.json' \
     -X POST \
     --data-binary '{
           "title": "Outcome Group Title",
           "description": "Outcome group description",
           "vendor_guid": "customid9000"
         }' \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer <token>"
Returns a OutcomeGroup

Import an outcome group OutcomeGroupsApiController#import

POST /api/v1/global/outcome_groups/:id/import

Scope: url:POST|/api/v1/global/outcome_groups/:id/import

POST /api/v1/accounts/:account_id/outcome_groups/:id/import

Scope: url:POST|/api/v1/accounts/:account_id/outcome_groups/:id/import

POST /api/v1/courses/:course_id/outcome_groups/:id/import

Scope: url:POST|/api/v1/courses/:course_id/outcome_groups/:id/import

Creates a new subgroup of the outcome group with the same title and description as the source group, then creates links in that new subgroup to the same outcomes that are linked in the source group. Recurses on the subgroups of the source group, importing them each in turn into the new subgroup.

Allows you to copy organizational structure, but does not create copies of the outcomes themselves, only new links.

The source group must be either global, from the same context as this outcome group, or from an associated account. The source group cannot be the root outcome group of its context.

Request Parameters:

Parameter Type Description
source_outcome_group_id Required integer

The ID of the source outcome group.

Example Request:

curl 'https://<canvas>/api/v1/accounts/2/outcome_groups/3/import.json' \
     -X POST \
     -F 'source_outcome_group_id=2' \
     -H "Authorization: Bearer <token>"
Returns a OutcomeGroup

Import Outcomes OutcomeImportsApiController#create

POST /api/v1/accounts/:account_id/outcome_imports

Scope: url:POST|/api/v1/accounts/:account_id/outcome_imports

POST /api/v1/courses/:course_id/outcome_imports

Scope: url:POST|/api/v1/courses/:course_id/outcome_imports

Import outcomes into Canvas.

For more information on the format that's expected here, please see the “Outcomes CSV” section in the API docs.

Request Parameters:

Parameter Type Description
import_type string

Choose the data format for reading outcome data. With a standard Canvas install, this option can only be 'instructure_csv', and if unprovided, will be assumed to be so. Can be part of the query string.

attachment string

There are two ways to post outcome import data - either via a multipart/form-data form-field-style attachment, or via a non-multipart raw post request.

'attachment' is required for multipart/form-data style posts. Assumed to be outcome data from a file upload form field named 'attachment'.

Examples:

curl -F attachment=@<filename> -H "Authorization: Bearer <token>" \
    'https://<canvas>/api/v1/accounts/<account_id>/outcome_imports?import_type=instructure_csv'
curl -F attachment=@<filename> -H "Authorization: Bearer <token>" \
    'https://<canvas>/api/v1/courses/<course_id>/outcome_imports?import_type=instructure_csv'

If you decide to do a raw post, you can skip the 'attachment' argument, but you will then be required to provide a suitable Content-Type header. You are encouraged to also provide the 'extension' argument.

Examples:

curl -H 'Content-Type: text/csv' --data-binary @<filename>.csv \
    -H "Authorization: Bearer <token>" \
    'https://<canvas>/api/v1/accounts/<account_id>/outcome_imports?import_type=instructure_csv'

curl -H 'Content-Type: text/csv' --data-binary @<filename>.csv \
    -H "Authorization: Bearer <token>" \
    'https://<canvas>/api/v1/courses/<course_id>/outcome_imports?import_type=instructure_csv'
extension string

Recommended for raw post request style imports. This field will be used to distinguish between csv and other file format extensions that would usually be provided with the filename in the multipart post request scenario. If not provided, this value will be inferred from the Content-Type, falling back to csv-file format if all else fails.

Returns a OutcomeImport

Get Outcome import status OutcomeImportsApiController#show

GET /api/v1/accounts/:account_id/outcome_imports/:id

Scope: url:GET|/api/v1/accounts/:account_id/outcome_imports/:id

GET /api/v1/courses/:course_id/outcome_imports/:id

Scope: url:GET|/api/v1/courses/:course_id/outcome_imports/:id

Get the status of an already created Outcome import. Pass 'latest' for the outcome import id for the latest import.

Examples:
  curl 'https://<canvas>/api/v1/accounts/<account_id>/outcome_imports/<outcome_import_id>' \
      -H "Authorization: Bearer <token>"
  curl 'https://<canvas>/api/v1/courses/<course_id>/outcome_imports/<outcome_import_id>' \
      -H "Authorization: Bearer <token>"
Returns a OutcomeImport

Get outcome results OutcomeResultsController#index

GET /api/v1/courses/:course_id/outcome_results

Scope: url:GET|/api/v1/courses/:course_id/outcome_results

Gets the outcome results for users and outcomes in the specified context.

Request Parameters:

Parameter Type Description
user_ids[] integer

If specified, only the users whose ids are given will be included in the results. SIS ids can be used, prefixed by “sis_user_id:”. It is an error to specify an id for a user who is not a student in the context.

outcome_ids[] integer

If specified, only the outcomes whose ids are given will be included in the results. it is an error to specify an id for an outcome which is not linked to the context.

include[] string
String, “alignments”|“outcomes”|“outcomes.alignments”|“outcome_groups”|“outcome_links”|“outcome_paths”|“users”

Specify additional collections to be side loaded with the result. “alignments” includes only the alignments referenced by the returned results. “outcomes.alignments” includes all alignments referenced by outcomes in the context.

Example Response:

{
  outcome_results: [OutcomeResult]
}

Get outcome result rollups OutcomeResultsController#rollups

GET /api/v1/courses/:course_id/outcome_rollups

Scope: url:GET|/api/v1/courses/:course_id/outcome_rollups

Gets the outcome rollups for the users and outcomes in the specified context.

Request Parameters:

Parameter Type Description
aggregate string

If specified, instead of returning one rollup for each user, all the user rollups will be combined into one rollup for the course that will contain the average rollup score for each outcome.

Allowed values: course

user_ids[] integer

If specified, only the users whose ids are given will be included in the results or used in an aggregate result. it is an error to specify an id for a user who is not a student in the context

outcome_ids[] integer

If specified, only the outcomes whose ids are given will be included in the results. it is an error to specify an id for an outcome which is not linked to the context.

include[] string
String, “courses”|“outcomes”|“outcomes.alignments”|“outcome_groups”|“outcome_links”|“outcome_paths”|“users”

Specify additional collections to be side loaded with the result.

Example Response:

{
  "rollups": [OutcomeRollup],
  "linked": {
    // (Optional) Included if include[] has outcomes
    "outcomes": [Outcome],

    // (Optional) Included if aggregate is not set and include[] has users
    "users": [User],

    // (Optional) Included if aggregate is 'course' and include[] has courses
    "courses": [Course]

    // (Optional) Included if include[] has outcome_groups
    "outcome_groups": [OutcomeGroup],

    // (Optional) Included if include[] has outcome_links
    "outcome_links": [OutcomeLink]

    // (Optional) Included if include[] has outcome_paths
    "outcome_paths": [OutcomePath]

    // (Optional) Included if include[] has outcomes.alignments
    "outcomes.alignments": [OutcomeAlignment]
  }
}

Show an outcome OutcomesApiController#show

GET /api/v1/outcomes/:id

Scope: url:GET|/api/v1/outcomes/:id

Returns the details of the outcome with the given id.

Returns a Outcome

Update an outcome OutcomesApiController#update

PUT /api/v1/outcomes/:id

Scope: url:PUT|/api/v1/outcomes/:id

Modify an existing outcome. Fields not provided are left as is; unrecognized fields are ignored.

If any new ratings are provided, the combination of all new ratings provided completely replace any existing embedded rubric criterion; it is not possible to tweak the ratings of the embedded rubric criterion.

A new embedded rubric criterion's mastery_points default to the maximum points in the highest rating if not specified in the mastery_points parameter. Any new ratings lacking a description are given a default of “No description”. Any new ratings lacking a point value are given a default of 0.

Request Parameters:

Parameter Type Description
title string

The new outcome title.

display_name string

A friendly name shown in reports for outcomes with cryptic titles, such as common core standards names.

description string

The new outcome description.

vendor_guid string

A custom GUID for the learning standard.

mastery_points integer

The new mastery threshold for the embedded rubric criterion.

ratings[][description] string

The description of a new rating level for the embedded rubric criterion.

ratings[][points] integer

The points corresponding to a new rating level for the embedded rubric criterion.

calculation_method string

The new calculation method.

Allowed values: decaying_average, n_mastery, latest, highest

calculation_int integer

The new calculation int. Only applies if the calculation_method is “decaying_average” or “n_mastery”

Example Request:

curl 'https://<canvas>/api/v1/outcomes/1.json' \
     -X PUT \
     -F 'title=Outcome Title' \
     -F 'display_name=Title for reporting' \
     -F 'description=Outcome description' \
     -F 'vendor_guid=customid9001' \
     -F 'mastery_points=3' \
     -F 'calculation_method=decaying_average' \
     -F 'calculation_int=75' \
     -F 'ratings[][description]=Exceeds Expectations' \
     -F 'ratings[][points]=5' \
     -F 'ratings[][description]=Meets Expectations' \
     -F 'ratings[][points]=3' \
     -F 'ratings[][description]=Does Not Meet Expectations' \
     -F 'ratings[][points]=0' \
     -F 'ratings[][points]=0' \
     -H "Authorization: Bearer <token>"

curl 'https://<canvas>/api/v1/outcomes/1.json' \
     -X PUT \
     --data-binary '{
           "title": "Outcome Title",
           "display_name": "Title for reporting",
           "description": "Outcome description",
           "vendor_guid": "customid9001",
           "mastery_points": 3,
           "ratings": [
             { "description": "Exceeds Expectations", "points": 5 },
             { "description": "Meets Expectations", "points": 3 },
             { "description": "Does Not Meet Expectations", "points": 0 }
           ]
         }' \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer <token>"
Returns a Outcome

Show front page WikiPagesApiController#show_front_page

GET /api/v1/courses/:course_id/front_page

Scope: url:GET|/api/v1/courses/:course_id/front_page

GET /api/v1/groups/:group_id/front_page

Scope: url:GET|/api/v1/groups/:group_id/front_page

Retrieve the content of the front page

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/123/front_page
Returns a Page

Duplicate page WikiPagesApiController#duplicate

POST /api/v1/courses/:course_id/pages/:url/duplicate

Scope: url:POST|/api/v1/courses/:course_id/pages/:url/duplicate

Duplicate a wiki page

Example Request:

curl -X DELETE -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/14/duplicate
Returns a Page

Update/create front page WikiPagesApiController#update_front_page

PUT /api/v1/courses/:course_id/front_page

Scope: url:PUT|/api/v1/courses/:course_id/front_page

PUT /api/v1/groups/:group_id/front_page

Scope: url:PUT|/api/v1/groups/:group_id/front_page

Update the title or contents of the front page

Request Parameters:

Parameter Type Description
wiki_page[title] string

The title for the new page. NOTE: changing a page's title will change its url. The updated url will be returned in the result.

wiki_page[body] string

The content for the new page.

wiki_page[editing_roles] string

Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).

“teachers”

Allows editing by teachers in the course.

“students”

Allows editing by students in the course.

“members”

For group wikis, allows editing by members of the group.

“public”

Allows editing by any user.

Allowed values: teachers, students, members, public

wiki_page[notify_of_update] boolean

Whether participants should be notified when this page changes.

wiki_page[published] boolean

Whether the page is published (true) or draft state (false).

Example Request:

curl -X PUT -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/front_page \
-d wiki_page[body]=Updated+body+text
Returns a Page

List pages WikiPagesApiController#index

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

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

GET /api/v1/groups/:group_id/pages

Scope: url:GET|/api/v1/groups/:group_id/pages

A paginated list of the wiki pages associated with a course or group

Request Parameters:

Parameter Type Description
sort string

Sort results by this field.

Allowed values: title, created_at, updated_at

order string

The sorting order. Defaults to 'asc'.

Allowed values: asc, desc

search_term string

The partial title of the pages to match and return.

published boolean

If true, include only published paqes. If false, exclude published pages. If not present, do not filter on published status.

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/123/pages?sort=title&order=asc
Returns a list of Pages

Create page WikiPagesApiController#create

POST /api/v1/courses/:course_id/pages

Scope: url:POST|/api/v1/courses/:course_id/pages

POST /api/v1/groups/:group_id/pages

Scope: url:POST|/api/v1/groups/:group_id/pages

Create a new wiki page

Request Parameters:

Parameter Type Description
wiki_page[title] Required string

The title for the new page.

wiki_page[body] string

The content for the new page.

wiki_page[editing_roles] string

Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).

“teachers”

Allows editing by teachers in the course.

“students”

Allows editing by students in the course.

“members”

For group wikis, allows editing by members of the group.

“public”

Allows editing by any user.

Allowed values: teachers, students, members, public

wiki_page[notify_of_update] boolean

Whether participants should be notified when this page changes.

wiki_page[published] boolean

Whether the page is published (true) or draft state (false).

wiki_page[front_page] boolean

Set an unhidden page as the front page (if true)

Example Request:

curl -X POST -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages \
-d wiki_page[title]=New+page
-d wiki_page[body]=New+body+text
Returns a Page

Show page WikiPagesApiController#show

GET /api/v1/courses/:course_id/pages/:url

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

GET /api/v1/groups/:group_id/pages/:url

Scope: url:GET|/api/v1/groups/:group_id/pages/:url

Retrieve the content of a wiki page

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/123/pages/my-page-url
Returns a Page

Update/create page WikiPagesApiController#update

PUT /api/v1/courses/:course_id/pages/:url

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

PUT /api/v1/groups/:group_id/pages/:url

Scope: url:PUT|/api/v1/groups/:group_id/pages/:url

Update the title or contents of a wiki page

Request Parameters:

Parameter Type Description
wiki_page[title] string

The title for the new page. NOTE: changing a page's title will change its url. The updated url will be returned in the result.

wiki_page[body] string

The content for the new page.

wiki_page[editing_roles] string

Which user roles are allowed to edit this page. Any combination of these roles is allowed (separated by commas).

“teachers”

Allows editing by teachers in the course.

“students”

Allows editing by students in the course.

“members”

For group wikis, allows editing by members of the group.

“public”

Allows editing by any user.

Allowed values: teachers, students, members, public

wiki_page[notify_of_update] boolean

Whether participants should be notified when this page changes.

wiki_page[published] boolean

Whether the page is published (true) or draft state (false).

wiki_page[front_page] boolean

Set an unhidden page as the front page (if true)

Example Request:

curl -X PUT -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url \
-d 'wiki_page[body]=Updated+body+text'
Returns a Page

Delete page WikiPagesApiController#destroy

DELETE /api/v1/courses/:course_id/pages/:url

Scope: url:DELETE|/api/v1/courses/:course_id/pages/:url

DELETE /api/v1/groups/:group_id/pages/:url

Scope: url:DELETE|/api/v1/groups/:group_id/pages/:url

Delete a wiki page

Example Request:

curl -X DELETE -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url
Returns a Page

List revisions WikiPagesApiController#revisions

GET /api/v1/courses/:course_id/pages/:url/revisions

Scope: url:GET|/api/v1/courses/:course_id/pages/:url/revisions

GET /api/v1/groups/:group_id/pages/:url/revisions

Scope: url:GET|/api/v1/groups/:group_id/pages/:url/revisions

A paginated list of the revisions of a page. Callers must have update rights on the page in order to see page history.

Example Request:

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url/revisions
Returns a list of PageRevisions

Show revision WikiPagesApiController#show_revision

GET /api/v1/courses/:course_id/pages/:url/revisions/latest

Scope: url:GET|/api/v1/courses/:course_id/pages/:url/revisions/latest

GET /api/v1/groups/:group_id/pages/:url/revisions/latest

Scope: url:GET|/api/v1/groups/:group_id/pages/:url/revisions/latest

GET /api/v1/courses/:course_id/pages/:url/revisions/:revision_id

Scope: url:GET|/api/v1/courses/:course_id/pages/:url/revisions/:revision_id

GET /api/v1/groups/:group_id/pages/:url/revisions/:revision_id

Scope: url:GET|/api/v1/groups/:group_id/pages/:url/revisions/:revision_id

Retrieve the metadata and optionally content of a revision of the page. Note that retrieving historic versions of pages requires edit rights.

Request Parameters:

Parameter Type Description
summary boolean

If set, exclude page content from results

Example Request:

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url/revisions/latest

curl -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url/revisions/4
Returns a PageRevision

Revert to revision WikiPagesApiController#revert

POST /api/v1/courses/:course_id/pages/:url/revisions/:revision_id

Scope: url:POST|/api/v1/courses/:course_id/pages/:url/revisions/:revision_id

POST /api/v1/groups/:group_id/pages/:url/revisions/:revision_id

Scope: url:POST|/api/v1/groups/:group_id/pages/:url/revisions/:revision_id

Revert a page to a prior revision.

Request Parameters:

Parameter Type Description
revision_id Required integer

The revision to revert to (use the List Revisions API to see available revisions)

Example Request:

curl -X POST -H 'Authorization: Bearer <token>' \
https://<canvas>/api/v1/courses/123/pages/the-page-url/revisions/6
Returns a PageRevision

Get all Peer Reviews PeerReviewsApiController#index

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

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

GET /api/v1/sections/:section_id/assignments/:assignment_id/peer_reviews

Scope: url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/peer_reviews

GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:GET|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

GET /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Get a list of all Peer Reviews for this assignment

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the peer review.

Allowed values: submission_comments, user

Returns a list of PeerReviews

Create Peer Review PeerReviewsApiController#create

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

POST /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:POST|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Create a peer review for the assignment

Request Parameters:

Parameter Type Description
user_id Required integer

user_id to assign as reviewer on this assignment

Returns a PeerReview

Delete Peer Review PeerReviewsApiController#destroy

DELETE /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:DELETE|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

DELETE /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Scope: url:DELETE|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:submission_id/peer_reviews

Delete a peer review for the assignment

Request Parameters:

Parameter Type Description
user_id Required integer

user_id to delete as reviewer on this assignment

Returns a PeerReview

Get a single assignment (lti) Lti::AssignmentsApiController#show

GET /api/lti/assignments/:assignment_id

Scope: url:GET|/api/lti/assignments/:assignment_id

Get a single Canvas assignment by Canvas id or LTI id. Tool providers may only access assignments that are associated with their tool.

Request Parameters:

Parameter Type Description
user_id string

The id of the user. Can be a Canvas or LTI id for the user.

Returns a LtiAssignment

Get a single user (lti) Lti::UsersApiController#show

GET /api/lti/users/:id

Scope: url:GET|/api/lti/users/:id

Get a single Canvas user by Canvas id or LTI id. Tool providers may only access users that have been assigned an assignment associated with their tool.

Returns a User

Get all users in a group (lti) Lti::UsersApiController#group_index

GET /api/lti/groups/:group_id/users

Scope: url:GET|/api/lti/groups/:group_id/users

Get all Canvas users in a group. Tool providers may only access groups that belong to the context the tool is installed in.

Returns a list of Users

Get a single submission Lti::SubmissionsApiController#show

GET /api/lti/assignments/:assignment_id/submissions/:submission_id

Scope: url:GET|/api/lti/assignments/:assignment_id/submissions/:submission_id

Get a single submission, based on submission id.

Get the history of a single submission Lti::SubmissionsApiController#history

GET /api/lti/assignments/:assignment_id/submissions/:submission_id/history

Scope: url:GET|/api/lti/assignments/:assignment_id/submissions/:submission_id/history

Get a list of all attempts made for a submission, based on submission id.

List planner items PlannerController#index

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/planner/items

Scope: url:GET|/api/v1/planner/items

Retrieve the paginated list of objects to be shown on the planner for the current user with the associated planner override to override an item's visibility if set.

[

{
  "context_type": "Course",
  "course_id": 1,
  "visible_in_planner": true, // Whether or not it is displayed on the student planner
  "planner_override": { ... planner override object ... }, // Associated PlannerOverride object if user has toggled visibility for the object on the planner
  "submissions": false, // The statuses of the user's submissions for this object
  "plannable_id": "123",
  "plannable_type": "discussion_topic",
  "plannable": { ... discussion topic object },
  "html_url": "/courses/1/discussion_topics/8"
},
{
  "context_type": "Course",
  "course_id": 1,
  "visible_in_planner": true,
  "planner_override": {
      "id": 3,
      "plannable_type": "Assignment",
      "plannable_id": 1,
      "user_id": 2,
      "workflow_state": "active",
      "marked_complete": true, // A user-defined setting for marking items complete in the planner
      "dismissed": false, // A user-defined setting for hiding items from the opportunities list
      "deleted_at": null,
      "created_at": "2017-05-18T18:35:55Z",
      "updated_at": "2017-05-18T18:35:55Z"
  },
  "submissions": { // The status as it pertains to the current user
    "excused": false,
    "graded": false,
    "late": false,
    "missing": true,
    "needs_grading": false,
    "with_feedback": false
  },
  "plannable_id": "456",
  "plannable_type": "assignment",
  "plannable": { ... assignment object ...  },
  "html_url": "http://canvas.instructure.com/courses/1/assignments/1#submit"
},
{
  "visible_in_planner": true,
  "planner_override": null,
  "submissions": false, // false if no associated assignment exists for the plannable item
  "plannable_id": "789",
  "plannable_type": "planner_note",
  "plannable": {
    "id": 1,
    "todo_date": "2017-05-30T06:00:00Z",
    "title": "hello",
    "details": "world",
    "user_id": 2,
    "course_id": null,
    "workflow_state": "active",
    "created_at": "2017-05-30T16:29:04Z",
    "updated_at": "2017-05-30T16:29:15Z"
  },
  "html_url": "http://canvas.instructure.com/api/v1/planner_notes.1"
}

]

Request Parameters:

Parameter Type Description
start_date Date

Only return items starting from the given date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date Date

Only return items up to the given date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

context_codes[] string

List of context codes of courses and/or groups whose items you want to see. If not specified, defaults to all contexts associated to the current user. Note that concluded courses will be ignored unless specified in the includes[] parameter. The format of this field is the context type, followed by an underscore, followed by the context id. For example: course_42, group_123

filter string

Only return items that have new or unread activity

Allowed values: new_activity

Example Response:

List planner notes PlannerNotesController#index

GET /api/v1/planner_notes

Scope: url: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 DateTime

Only return notes with todo dates since the start_date (inclusive). No default. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

end_date DateTime

Only return notes with todo dates before the end_date (inclusive). No default. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. 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",
  },
]
Returns a list of PlannerNotes

Show a PlannerNote PlannerNotesController#show

GET /api/v1/planner_notes/:id

Scope: url:GET|/api/v1/planner_notes/:id

Retrieve a planner note for the current user

Returns a PlannerNote

Update a PlannerNote PlannerNotesController#update

PUT /api/v1/planner_notes/:id

Scope: url:PUT|/api/v1/planner_notes/:id

Update a planner note for the current user

Request Parameters:

Parameter Type Description
title string

The title of the planner note.

details string

Text of the planner note.

todo_date Date

The date where this planner note should appear in the planner. The value should be formatted as: yyyy-mm-dd.

course_id integer

The ID of the course to associate with the planner note. The caller must be able to view the course in order to associate it with a planner note. Use a null or empty value to remove a planner note from a course. Note that if the planner note is linked to a learning object, its course_id cannot be changed.

Returns a PlannerNote

Create a planner note PlannerNotesController#create

POST /api/v1/planner_notes

Scope: url:POST|/api/v1/planner_notes

Create a planner note for the current user

Request Parameters:

Parameter Type Description
title string

The title of the planner note.

details string

Text of the planner note.

todo_date Date

The date where this planner note should appear in the planner. The value should be formatted as: yyyy-mm-dd.

course_id integer

The ID of the course to associate with the planner note. The caller must be able to view the course in order to associate it with a planner note.

linked_object_type string

The type of a learning object to link to this planner note. Must be used in conjunction wtih linked_object_id and course_id. Valid linked_object_type values are: 'announcement', 'assignment', 'discussion_topic', 'wiki_page', 'quiz'

linked_object_id integer

The id of a learning object to link to this planner note. Must be used in conjunction with linked_object_type and course_id. The object must be in the same course as specified by course_id. If the title argument is not provided, the planner note will use the learning object's title as its title. Only one planner note may be linked to a specific learning object.

Returns a PlannerNote

Delete a planner note PlannerNotesController#destroy

DELETE /api/v1/planner_notes/:id

Scope: url:DELETE|/api/v1/planner_notes/:id

Delete a planner note for the current user

Returns a PlannerNote

List planner overrides PlannerOverridesController#index

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/planner/overrides

Scope: url:GET|/api/v1/planner/overrides

Retrieve a planner override for the current user

Returns a list of PlannerOverrides

Show a planner override PlannerOverridesController#show

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/planner/overrides/:id

Scope: url:GET|/api/v1/planner/overrides/:id

Retrieve a planner override for the current user

Returns a PlannerOverride

Update a planner override PlannerOverridesController#update

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

PUT /api/v1/planner/overrides/:id

Scope: url:PUT|/api/v1/planner/overrides/:id

Update a planner override's visibilty for the current user

Request Parameters:

Parameter Type Description
marked_complete string

determines whether the planner item is marked as completed

dismissed string

determines whether the planner item shows in the opportunities list

Returns a PlannerOverride

Create a planner override PlannerOverridesController#create

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/planner/overrides

Scope: url:POST|/api/v1/planner/overrides

Create a planner override for the current user

Request Parameters:

Parameter Type Description
plannable_type string

Type of the item that you are overriding in the planner

Allowed values: announcement, assignment, discussion_topic, quiz, wiki_page, planner_note

plannable_id integer

ID of the item that you are overriding in the planner

marked_complete boolean

If this is true, the item will show in the planner as completed

dismissed boolean

If this is true, the item will not show in the opportunities list

Returns a PlannerOverride

Delete a planner override PlannerOverridesController#destroy

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

DELETE /api/v1/planner/overrides/:id

Scope: url:DELETE|/api/v1/planner/overrides/:id

Delete a planner override for the current user

Returns a PlannerOverride

List poll sessions for a poll Polling::PollSessionsController#index

GET /api/v1/polls/:poll_id/poll_sessions

Scope: url:GET|/api/v1/polls/:poll_id/poll_sessions

Returns the paginated list of PollSessions in this poll.

Example Response:

{
  "poll_sessions": [PollSession]
}

Get the results for a single poll session Polling::PollSessionsController#show

GET /api/v1/polls/:poll_id/poll_sessions/:id

Scope: url:GET|/api/v1/polls/:poll_id/poll_sessions/:id

Returns the poll session with the given id

Example Response:

{
  "poll_sessions": [PollSession]
}

Create a single poll session Polling::PollSessionsController#create

POST /api/v1/polls/:poll_id/poll_sessions

Scope: url:POST|/api/v1/polls/:poll_id/poll_sessions

Create a new poll session for this poll

Request Parameters:

Parameter Type Description
poll_sessions[][course_id] Required integer

The id of the course this session is associated with.

poll_sessions[][course_section_id] integer

The id of the course section this session is associated with.

poll_sessions[][has_public_results] boolean

Whether or not results are viewable by students.

Example Response:

{
  "poll_sessions": [PollSession]
}

Update a single poll session Polling::PollSessionsController#update

PUT /api/v1/polls/:poll_id/poll_sessions/:id

Scope: url:PUT|/api/v1/polls/:poll_id/poll_sessions/:id

Update an existing poll session for this poll

Request Parameters:

Parameter Type Description
poll_sessions[][course_id] integer

The id of the course this session is associated with.

poll_sessions[][course_section_id] integer

The id of the course section this session is associated with.

poll_sessions[][has_public_results] boolean

Whether or not results are viewable by students.

Example Response:

{
  "poll_sessions": [PollSession]
}

Delete a poll session Polling::PollSessionsController#destroy

DELETE /api/v1/polls/:poll_id/poll_sessions/:id

Scope: url:DELETE|/api/v1/polls/:poll_id/poll_sessions/:id

204 No Content response code is returned if the deletion was successful.

Open a poll session Polling::PollSessionsController#open

GET /api/v1/polls/:poll_id/poll_sessions/:id/open

Scope: url:GET|/api/v1/polls/:poll_id/poll_sessions/:id/open

Close an opened poll session Polling::PollSessionsController#close

GET /api/v1/polls/:poll_id/poll_sessions/:id/close

Scope: url:GET|/api/v1/polls/:poll_id/poll_sessions/:id/close

List opened poll sessions Polling::PollSessionsController#opened

GET /api/v1/poll_sessions/opened

Scope: url:GET|/api/v1/poll_sessions/opened

A paginated list of all opened poll sessions available to the current user.

Example Response:

{
  "poll_sessions": [PollSession]
}

List closed poll sessions Polling::PollSessionsController#closed

GET /api/v1/poll_sessions/closed

Scope: url:GET|/api/v1/poll_sessions/closed

A paginated list of all closed poll sessions available to the current user.

Example Response:

{
  "poll_sessions": [PollSession]
}

List poll choices in a poll Polling::PollChoicesController#index

GET /api/v1/polls/:poll_id/poll_choices

Scope: url:GET|/api/v1/polls/:poll_id/poll_choices

Returns the paginated list of PollChoices in this poll.

Example Response:

{
  "poll_choices": [PollChoice]
}

Get a single poll choice Polling::PollChoicesController#show

GET /api/v1/polls/:poll_id/poll_choices/:id

Scope: url:GET|/api/v1/polls/:poll_id/poll_choices/:id

Returns the poll choice with the given id

Example Response:

{
  "poll_choices": [PollChoice]
}

Create a single poll choice Polling::PollChoicesController#create

POST /api/v1/polls/:poll_id/poll_choices

Scope: url:POST|/api/v1/polls/:poll_id/poll_choices

Create a new poll choice for this poll

Request Parameters:

Parameter Type Description
poll_choices[][text] Required string

The descriptive text of the poll choice.

poll_choices[][is_correct] boolean

Whether this poll choice is considered correct or not. Defaults to false.

poll_choices[][position] integer

The order this poll choice should be returned in the context it's sibling poll choices.

Example Response:

{
  "poll_choices": [PollChoice]
}

Update a single poll choice Polling::PollChoicesController#update

PUT /api/v1/polls/:poll_id/poll_choices/:id

Scope: url:PUT|/api/v1/polls/:poll_id/poll_choices/:id

Update an existing poll choice for this poll

Request Parameters:

Parameter Type Description
poll_choices[][text] Required string

The descriptive text of the poll choice.

poll_choices[][is_correct] boolean

Whether this poll choice is considered correct or not. Defaults to false.

poll_choices[][position] integer

The order this poll choice should be returned in the context it's sibling poll choices.

Example Response:

{
  "poll_choices": [PollChoice]
}

Delete a poll choice Polling::PollChoicesController#destroy

DELETE /api/v1/polls/:poll_id/poll_choices/:id

Scope: url:DELETE|/api/v1/polls/:poll_id/poll_choices/:id

204 No Content response code is returned if the deletion was successful.

Get a single poll submission Polling::PollSubmissionsController#show

GET /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions/:id

Scope: url:GET|/api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions/:id

Returns the poll submission with the given id

Example Response:

{
  "poll_submissions": [PollSubmission]
}

Create a single poll submission Polling::PollSubmissionsController#create

POST /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions

Scope: url:POST|/api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions

Create a new poll submission for this poll session

Request Parameters:

Parameter Type Description
poll_submissions[][poll_choice_id] Required integer

The chosen poll choice for this submission.

Example Response:

{
  "poll_submissions": [PollSubmission]
}

List polls Polling::PollsController#index

GET /api/v1/polls

Scope: url:GET|/api/v1/polls

Returns the paginated list of polls for the current user.

Example Response:

{
  "polls": [Poll]
}

Get a single poll Polling::PollsController#show

GET /api/v1/polls/:id

Scope: url:GET|/api/v1/polls/:id

Returns the poll with the given id

Example Response:

{
  "polls": [Poll]
}

Create a single poll Polling::PollsController#create

POST /api/v1/polls

Scope: url:POST|/api/v1/polls

Create a new poll for the current user

Request Parameters:

Parameter Type Description
polls[][question] Required string

The title of the poll.

polls[][description] string

A brief description or instructions for the poll.

Example Response:

{
  "polls": [Poll]
}

Update a single poll Polling::PollsController#update

PUT /api/v1/polls/:id

Scope: url:PUT|/api/v1/polls/:id

Update an existing poll belonging to the current user

Request Parameters:

Parameter Type Description
polls[][question] Required string

The title of the poll.

polls[][description] string

A brief description or instructions for the poll.

Example Response:

{
  "polls": [Poll]
}

Delete a poll Polling::PollsController#destroy

DELETE /api/v1/polls/:id

Scope: url:DELETE|/api/v1/polls/:id

204 No Content response code is returned if the deletion was successful.

Query progress ProgressController#show

GET /api/v1/progress/:id

Scope: url:GET|/api/v1/progress/:id

Return completion and status information about an asynchronous job

Returns a Progress

Retrieve assignment-overridden dates for quizzes Quizzes::QuizAssignmentOverridesController#index

GET /api/v1/courses/:course_id/quizzes/assignment_overrides

Scope: url:GET|/api/v1/courses/:course_id/quizzes/assignment_overrides

Retrieve the actual due-at, unlock-at, and available-at dates for quizzes based on the assignment overrides active for the current API user.

Request Parameters:

Parameter Type Description
quiz_assignment_overrides[0][quiz_ids][] integer

An array of quiz IDs. If omitted, overrides for all quizzes available to the operating user will be returned.

Example Response:

{
   "quiz_assignment_overrides": [{
     "quiz_id": "1",
     "due_dates": [QuizAssignmentOverride],
     "all_dates": [QuizAssignmentOverride]
   },{
     "quiz_id": "2",
     "due_dates": [QuizAssignmentOverride],
     "all_dates": [QuizAssignmentOverride]
   }]
}
Returns a QuizAssignmentOverrideSetContainer

Set extensions for student quiz submissions Quizzes::QuizExtensionsController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/extensions

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/extensions

Responses

  • 200 OK if the request was successful

  • 403 Forbidden if you are not allowed to extend quizzes for this course

Request Parameters:

Parameter Type Description
user_id Required integer

The ID of the user we want to add quiz extensions for.

extra_attempts integer

Number of times the student is allowed to re-take the quiz over the multiple-attempt limit. This is limited to 1000 attempts or less.

extra_time integer

The number of extra minutes to allow for all attempts. This will add to the existing time limit on the submission. This is limited to 10080 minutes (1 week)

manually_unlocked boolean

Allow the student to take the quiz even if it's locked for everyone else.

extend_from_now integer

The number of minutes to extend the quiz from the current time. This is mutually exclusive to extend_from_end_at. This is limited to 1440 minutes (24 hours)

extend_from_end_at integer

The number of minutes to extend the quiz beyond the quiz's current ending time. This is mutually exclusive to extend_from_now. This is limited to 1440 minutes (24 hours)

Example Request:

{
  "quiz_extensions": [{
    "user_id": 3,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": true
  },{
    "user_id": 2,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": false
  }]
}

{
  "quiz_extensions": [{
    "user_id": 3,
    "extend_from_now": 20
  }]
}

Example Response:

{
  "quiz_extensions": [QuizExtension]
}

Get available quiz IP filters. Quizzes::QuizIpFiltersController#index

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

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

Get a list of available IP filters for this Quiz.

200 OK response code is returned if the request was successful.

Example Response:

{
  "quiz_ip_filters": [QuizIPFilter]
}

Get a single quiz group Quizzes::QuizGroupsController#show

GET /api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id

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

Returns details of the quiz group with the given id.

Returns a QuizGroup

Create a question group Quizzes::QuizGroupsController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/groups

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/groups

Create a new question group for this quiz

201 Created response code is returned if the creation was successful.

Request Parameters:

Parameter Type Description
quiz_groups[][name] string

The name of the question group.

quiz_groups[][pick_count] integer

The number of questions to randomly select for this group.

quiz_groups[][question_points] integer

The number of points to assign to each question in the group.

quiz_groups[][assessment_question_bank_id] integer

The id of the assessment question bank to pull questions from.

Example Response:

{
  "quiz_groups": [QuizGroup]
}

Update a question group Quizzes::QuizGroupsController#update

PUT /api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id

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

Update a question group

Request Parameters:

Parameter Type Description
quiz_groups[][name] string

The name of the question group.

quiz_groups[][pick_count] integer

The number of questions to randomly select for this group.

quiz_groups[][question_points] integer

The number of points to assign to each question in the group.

Example Response:

{
  "quiz_groups": [QuizGroup]
}

Delete a question group Quizzes::QuizGroupsController#destroy

DELETE /api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id

Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id

Delete a question group

<b>204 No Content<b> response code is returned if the deletion was successful.

Reorder question groups Quizzes::QuizGroupsController#reorder

POST /api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id/reorder

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/groups/:id/reorder

Change the order of the quiz questions within the group

<b>204 No Content<b> response code is returned if the reorder was successful.

Request Parameters:

Parameter Type Description
order[][id] Required integer

The associated item's unique identifier

order[][type] string

The type of item is always 'question' for a group

Allowed values: question

List questions in a quiz or a submission Quizzes::QuizQuestionsController#index

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

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

Returns the paginated list of QuizQuestions in this quiz.

Request Parameters:

Parameter Type Description
quiz_submission_id integer

If specified, the endpoint will return the questions that were presented for that submission. This is useful if the quiz has been modified after the submission was created and the latest quiz version's set of questions does not match the submission's. NOTE: you must specify quiz_submission_attempt as well if you specify this parameter.

quiz_submission_attempt integer

The attempt of the submission you want the questions for.

Returns a list of QuizQuestions

Get a single quiz question Quizzes::QuizQuestionsController#show

GET /api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id

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

Returns the quiz question with the given id

Request Parameters:

Parameter Type Description
id Required integer

The quiz question unique identifier.

Returns a QuizQuestion

Create a single quiz question Quizzes::QuizQuestionsController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/questions

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/questions

Create a new quiz question for this quiz

Request Parameters:

Parameter Type Description
question[question_name] string

The name of the question.

question[question_text] string

The text of the question.

question[quiz_group_id] integer

The id of the quiz group to assign the question to.

question[question_type] string

The type of question. Multiple optional fields depend upon the type of question to be used.

Allowed values: calculated_question, essay_question, file_upload_question, fill_in_multiple_blanks_question, matching_question, multiple_answers_question, multiple_choice_question, multiple_dropdowns_question, numerical_question, short_answer_question, text_only_question, true_false_question

question[position] integer

The order in which the question will be displayed in the quiz in relation to other questions.

question[points_possible] integer

The maximum amount of points received for answering this question correctly.

question[correct_comments] string

The comment to display if the student answers the question correctly.

question[incorrect_comments] string

The comment to display if the student answers incorrectly.

question[neutral_comments] string

The comment to display regardless of how the student answered.

question[text_after_answers] string

no description

question[answers] [Answer]

no description

Returns a QuizQuestion

Update an existing quiz question Quizzes::QuizQuestionsController#update

PUT /api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id

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

Updates an existing quiz question for this quiz

Request Parameters:

Parameter Type Description
quiz_id Required integer

The associated quiz's unique identifier.

id Required integer

The quiz question's unique identifier.

question[question_name] string

The name of the question.

question[question_text] string

The text of the question.

question[quiz_group_id] integer

The id of the quiz group to assign the question to.

question[question_type] string

The type of question. Multiple optional fields depend upon the type of question to be used.

Allowed values: calculated_question, essay_question, file_upload_question, fill_in_multiple_blanks_question, matching_question, multiple_answers_question, multiple_choice_question, multiple_dropdowns_question, numerical_question, short_answer_question, text_only_question, true_false_question

question[position] integer

The order in which the question will be displayed in the quiz in relation to other questions.

question[points_possible] integer

The maximum amount of points received for answering this question correctly.

question[correct_comments] string

The comment to display if the student answers the question correctly.

question[incorrect_comments] string

The comment to display if the student answers incorrectly.

question[neutral_comments] string

The comment to display regardless of how the student answered.

question[text_after_answers] string

no description

question[answers] [Answer]

no description

Returns a QuizQuestion

Delete a quiz question Quizzes::QuizQuestionsController#destroy

DELETE /api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id

Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:quiz_id/questions/:id

204 No Content response code is returned if the deletion was successful.

Request Parameters:

Parameter Type Description
quiz_id Required integer

The associated quiz's unique identifier

id Required integer

The quiz question's unique identifier

Retrieve all quiz reports Quizzes::QuizReportsController#index

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

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

Returns a list of all available reports.

Request Parameters:

Parameter Type Description
includes_all_versions boolean

Whether to retrieve reports that consider all the submissions or only the most recent. Defaults to false, ignored for item_analysis reports.

Returns a list of QuizReports

Create a quiz report Quizzes::QuizReportsController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/reports

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/reports

Create and return a new report for this quiz. If a previously generated report matches the arguments and is still current (i.e. there have been no new submissions), it will be returned.

Responses

  • 400 Bad Request if the specified report type is invalid

  • 409 Conflict if a quiz report of the specified type is already being generated

Request Parameters:

Parameter Type Description
quiz_report[report_type] Required string

The type of report to be generated.

Allowed values: student_analysis, item_analysis

quiz_report[includes_all_versions] boolean

Whether the report should consider all submissions or only the most recent. Defaults to false, ignored for item_analysis.

include String[]

Whether the output should include documents for the file and/or progress objects associated with this report. (Note: JSON-API only)

Allowed values: file, progress

Returns a QuizReport

Get a quiz report Quizzes::QuizReportsController#show

GET /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id

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

Returns the data for a single quiz report.

Request Parameters:

Parameter Type Description
include String[]

Whether the output should include documents for the file and/or progress objects associated with this report. (Note: JSON-API only)

Allowed values: file, progress

Returns a QuizReport

Abort the generation of a report, or remove a previously generated one Quizzes::QuizReportsController#abort

DELETE /api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id

Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:quiz_id/reports/:id

This API allows you to cancel a previous request you issued for a report to be generated. Or in the case of an already generated report, you'd like to remove it, perhaps to generate it another time with an updated version that provides new features.

You must check the report's generation status before attempting to use this interface. See the “workflow_state” property of the QuizReport's Progress object for more information. Only when the progress reports itself in a “queued” state can the generation be aborted.

Responses

  • 204 No Content if your request was accepted

  • 422 Unprocessable Entity if the report is not being generated or can not be aborted at this stage

Fetching the latest quiz statistics Quizzes::QuizStatisticsController#index

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

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

This endpoint provides statistics for all quiz versions, or for a specific quiz version, in which case the output is guaranteed to represent the latest and most current version of the quiz.

200 OK response code is returned if the request was successful.

Request Parameters:

Parameter Type Description
all_versions boolean

Whether the statistics report should include all submissions attempts.

Example Response:

{
  "quiz_statistics": [ QuizStatistics ]
}

Submit captured events Quizzes::QuizSubmissionEventsApiController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/events

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/events

Store a set of events which were captured during a quiz taking session.

On success, the response will be 204 No Content with an empty body.

Request Parameters:

Parameter Type Description
quiz_submission_events[] Required Array

The submission events to be recorded

Example Request:

{
  "quiz_submission_events":
  [
    {
      "client_timestamp": "2014-10-08T19:29:58Z",
      "event_type": "question_answered",
      "event_data" : {"answer": "42"}
    }, {
      "client_timestamp": "2014-10-08T19:30:17Z",
      "event_type": "question_flagged",
      "event_data" : { "question_id": "1", "flagged": true }
    }
  ]
}

Retrieve captured events Quizzes::QuizSubmissionEventsApiController#index

GET /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/events

Scope: url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/events

Retrieve the set of events captured during a specific submission attempt.

Request Parameters:

Parameter Type Description
attempt integer

The specific submission attempt to look up the events for. If unspecified, the latest attempt will be used.

Example Response:

{
  "quiz_submission_events": [
    {
      "id": "3409",
      "event_type": "page_blurred",
      "event_data": null,
      "created_at": "2014-11-16T13:37:21Z"
    },
    {
      "id": "3410",
      "event_type": "page_focused",
      "event_data": null,
      "created_at": "2014-11-16T13:37:27Z"
    }
  ]
}

Upload a file Quizzes::QuizSubmissionFilesController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/self/files

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions/self/files

Associate a new quiz submission file

This API endpoint is the first step in uploading a quiz submission file. See the File Upload Documentation for details on the file upload workflow as these parameters are interpreted as per the documentation there.

Request Parameters:

Parameter Type Description
name string

The name of the quiz submission file

on_duplicate string

How to handle duplicate names

Example Response:

{
  "attachments": [
    {
      "upload_url": "https://some-bucket.s3.amazonaws.com/",
      "upload_params": {
        "key": "/users/1234/files/answer_pic.jpg",
        "acl": "private",
        "Filename": "answer_pic.jpg",
        "AWSAccessKeyId": "some_id",
        "Policy": "some_opaque_string",
        "Signature": "another_opaque_string",
        "Content-Type": "image/jpeg"
      }
    }
  ]
}

Get all quiz submission questions. Quizzes::QuizSubmissionQuestionsController#index

GET /api/v1/quiz_submissions/:quiz_submission_id/questions

Scope: url:GET|/api/v1/quiz_submissions/:quiz_submission_id/questions

Get a list of all the question records for this quiz submission.

200 OK response code is returned if the request was successful.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the quiz submission question.

Allowed values: quiz_question

Example Response:

{
  "quiz_submission_questions": [QuizSubmissionQuestion]
}

Answering questions Quizzes::QuizSubmissionQuestionsController#answer

POST /api/v1/quiz_submissions/:quiz_submission_id/questions

Scope: url:POST|/api/v1/quiz_submissions/:quiz_submission_id/questions

Provide or update an answer to one or more QuizQuestions.

Request Parameters:

Parameter Type Description
attempt Required integer

The attempt number of the quiz submission being taken. Note that this must be the latest attempt index, as questions for earlier attempts can not be modified.

validation_token Required string

The unique validation token you received when the Quiz Submission was created.

access_code string

Access code for the Quiz, if any.

quiz_questions[] QuizSubmissionQuestion

Set of question IDs and the answer value.

See Appendix: Question Answer Formats for the accepted answer formats for each question type.

Example Request:

{
  "attempt": 1,
  "validation_token": "YOUR_VALIDATION_TOKEN",
  "access_code": null,
  "quiz_questions": [{
    "id": "1",
    "answer": "Hello World!"
  }, {
    "id": "2",
    "answer": 42.0
  }]
}
Returns a list of QuizSubmissionQuestions

Flagging a question. Quizzes::QuizSubmissionQuestionsController#flag

PUT /api/v1/quiz_submissions/:quiz_submission_id/questions/:id/flag

Scope: url:PUT|/api/v1/quiz_submissions/:quiz_submission_id/questions/:id/flag

Set a flag on a quiz question to indicate that you want to return to it later.

Request Parameters:

Parameter Type Description
attempt Required integer

The attempt number of the quiz submission being taken. Note that this must be the latest attempt index, as questions for earlier attempts can not be modified.

validation_token Required string

The unique validation token you received when the Quiz Submission was created.

access_code string

Access code for the Quiz, if any.

Example Request:

{
  "attempt": 1,
  "validation_token": "YOUR_VALIDATION_TOKEN",
  "access_code": null
}

Unflagging a question. Quizzes::QuizSubmissionQuestionsController#unflag

PUT /api/v1/quiz_submissions/:quiz_submission_id/questions/:id/unflag

Scope: url:PUT|/api/v1/quiz_submissions/:quiz_submission_id/questions/:id/unflag

Remove the flag that you previously set on a quiz question after you've returned to it.

Request Parameters:

Parameter Type Description
attempt Required integer

The attempt number of the quiz submission being taken. Note that this must be the latest attempt index, as questions for earlier attempts can not be modified.

validation_token Required string

The unique validation token you received when the Quiz Submission was created.

access_code string

Access code for the Quiz, if any.

Example Request:

{
  "attempt": 1,
  "validation_token": "YOUR_VALIDATION_TOKEN",
  "access_code": null
}

Send a message to unsubmitted or submitted users for the quiz Quizzes::QuizSubmissionUsersController#message

POST /api/v1/courses/:course_id/quizzes/:id/submission_users/message

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:id/submission_users/message

{

"body": {
  "type": "string",
  "description": "message body of the conversation to be created",
  "example": "Please take the quiz."
},
"recipients": {
  "type": "string",
  "description": "Who to send the message to. May be either 'submitted' or 'unsubmitted'",
  "example": "submitted"
},
"subject": {
  "type": "string",
  "description": "Subject of the new Conversation created",
  "example": "ATTN: Quiz 101 Students"
}

}

Request Parameters:

Parameter Type Description
conversations QuizUserConversation
  • Body and recipients to send the message to.

Get all quiz submissions. Quizzes::QuizSubmissionsApiController#index

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

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

Get a list of all submissions for this quiz. Users who can view or manage grades for a course will have submissions from multiple users returned. A user who can only submit will have only their own submissions returned. When a user has an in-progress submission, only that submission is returned. When there isn't an in-progress quiz_submission, all completed submissions, including previous attempts, are returned.

200 OK response code is returned if the request was successful.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the quiz submission.

Allowed values: submission, quiz, user

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

Get the quiz submission. Quizzes::QuizSubmissionsApiController#submission

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

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

Get the submission for this quiz for the current user.

200 OK response code is returned if the request was successful.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the quiz submission.

Allowed values: submission, quiz, user

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

Get a single quiz submission. Quizzes::QuizSubmissionsApiController#show

GET /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id

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

Get a single quiz submission.

200 OK response code is returned if the request was successful.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the quiz submission.

Allowed values: submission, quiz, user

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

Create the quiz submission (start a quiz-taking session) Quizzes::QuizSubmissionsApiController#create

POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions

Start taking a Quiz by creating a QuizSubmission which you can use to answer questions and submit your answers.

Responses

  • 200 OK if the request was successful

  • 400 Bad Request if the quiz is locked

  • 403 Forbidden if an invalid access code is specified

  • 403 Forbidden if the Quiz's IP filter restriction does not pass

  • 409 Conflict if a QuizSubmission already exists for this user and quiz

Request Parameters:

Parameter Type Description
access_code string

Access code for the Quiz, if any.

preview boolean

Whether this should be a preview QuizSubmission and not count towards the user's course record. Teachers only.

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

Update student question scores and comments. Quizzes::QuizSubmissionsApiController#update

PUT /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id

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

Update the amount of points a student has scored for questions they've answered, provide comments for the student about their answer(s), or simply fudge the total score by a specific amount of points.

Responses

  • 200 OK if the request was successful

  • 403 Forbidden if you are not a teacher in this course

  • 400 Bad Request if the attempt parameter is missing or invalid

  • 400 Bad Request if the specified QS attempt is not yet complete

Request Parameters:

Parameter Type Description
attempt Required integer

The attempt number of the quiz submission that should be updated. This attempt MUST be already completed.

fudge_points number

Amount of positive or negative points to fudge the total score by.

questions Hash

A set of scores and comments for each question answered by the student. The keys are the question IDs, and the values are hashes of `score` and `comment` entries. See Appendix: Manual Scoring for more on this parameter.

Example Request:

{
  "quiz_submissions": [{
    "attempt": 1,
    "fudge_points": -2.4,
    "questions": {
      "1": {
        "score": 2.5,
        "comment": "This can't be right, but I'll let it pass this one time."
      },
      "2": {
        "score": 0,
        "comment": "Good thinking. Almost!"
      }
    }
  }]
}

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

See Also:

Complete the quiz submission (turn it in). Quizzes::QuizSubmissionsApiController#complete

POST /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/complete

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/complete

Complete the quiz submission by marking it as complete and grading it. When the quiz submission has been marked as complete, no further modifications will be allowed.

Responses

  • 200 OK if the request was successful

  • 403 Forbidden if an invalid access code is specified

  • 403 Forbidden if the Quiz's IP filter restriction does not pass

  • 403 Forbidden if an invalid token is specified

  • 400 Bad Request if the QS is already complete

  • 400 Bad Request if the attempt parameter is missing

  • 400 Bad Request if the attempt parameter is not the latest attempt

Request Parameters:

Parameter Type Description
attempt Required integer

The attempt number of the quiz submission that should be completed. Note that this must be the latest attempt index, as earlier attempts can not be modified.

validation_token Required string

The unique validation token you received when this Quiz Submission was created.

access_code string

Access code for the Quiz, if any.

Example Response:

{
  "quiz_submissions": [QuizSubmission]
}

Get current quiz submission times. Quizzes::QuizSubmissionsApiController#time

GET /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/time

Scope: url:GET|/api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/time

Get the current timing data for the quiz attempt, both the end_at timestamp and the time_left parameter.

Responses

  • 200 OK if the request was successful

Example Response:

{
  "end_at": [DateTime],
  "time_left": [Integer]
}

List quizzes in a course Quizzes::QuizzesApiController#index

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

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

Returns the paginated list of Quizzes in this course.

Request Parameters:

Parameter Type Description
search_term string

The partial title of the quizzes to match and return.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/quizzes \
     -H 'Authorization: Bearer <token>'
Returns a list of Quizzes

Get a single quiz Quizzes::QuizzesApiController#show

GET /api/v1/courses/:course_id/quizzes/:id

Scope: url:GET|/api/v1/courses/:course_id/quizzes/:id

Returns the quiz with the given id.

Returns a Quiz

Create a quiz Quizzes::QuizzesApiController#create

POST /api/v1/courses/:course_id/quizzes

Scope: url:POST|/api/v1/courses/:course_id/quizzes

Create a new quiz for this course.

Request Parameters:

Parameter Type Description
quiz[title] Required string

The quiz title.

quiz[description] string

A description of the quiz.

quiz[quiz_type] string

The type of quiz.

Allowed values: practice_quiz, assignment, graded_survey, survey

quiz[assignment_group_id] integer

The assignment group id to put the assignment in. Defaults to the top assignment group in the course. Only valid if the quiz is graded, i.e. if quiz_type is “assignment” or “graded_survey”.

quiz[time_limit] integer

Time limit to take this quiz, in minutes. Set to null for no time limit. Defaults to null.

quiz[shuffle_answers] boolean

If true, quiz answers for multiple choice questions will be randomized for each student. Defaults to false.

quiz[hide_results] string

Dictates whether or not quiz results are hidden from students. If null, students can see their results after any attempt. If “always”, students can never see their results. If “until_after_last_attempt”, students can only see results after their last attempt. (Only valid if allowed_attempts > 1). Defaults to null.

Allowed values: always, until_after_last_attempt

quiz[show_correct_answers] boolean

Only valid if hide_results=null If false, hides correct answers from students when quiz results are viewed. Defaults to true.

quiz[show_correct_answers_last_attempt] boolean

Only valid if show_correct_answers=true and allowed_attempts > 1 If true, hides correct answers from students when quiz results are viewed until they submit the last attempt for the quiz. Defaults to false.

quiz[show_correct_answers_at] DateTime

Only valid if show_correct_answers=true If set, the correct answers will be visible by students only after this date, otherwise the correct answers are visible once the student hands in their quiz submission.

quiz[hide_correct_answers_at] DateTime

Only valid if show_correct_answers=true If set, the correct answers will stop being visible once this date has passed. Otherwise, the correct answers will be visible indefinitely.

quiz[allowed_attempts] integer

Number of times a student is allowed to take a quiz. Set to -1 for unlimited attempts. Defaults to 1.

quiz[scoring_policy] string

Required and only valid if allowed_attempts > 1. Scoring policy for a quiz that students can take multiple times. Defaults to “keep_highest”.

Allowed values: keep_highest, keep_latest

quiz[one_question_at_a_time] boolean

If true, shows quiz to student one question at a time. Defaults to false.

quiz[cant_go_back] boolean

Only valid if one_question_at_a_time=true If true, questions are locked after answering. Defaults to false.

quiz[access_code] string

Restricts access to the quiz with a password. For no access code restriction, set to null. Defaults to null.

quiz[ip_filter] string

Restricts access to the quiz to computers in a specified IP range. Filters can be a comma-separated list of addresses, or an address followed by a mask

Examples:

"192.168.217.1"
"192.168.217.1/24"
"192.168.217.1/255.255.255.0"

For no IP filter restriction, set to null. Defaults to null.

quiz[due_at] DateTime

The day/time the quiz is due. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z.

quiz[lock_at] DateTime

The day/time the quiz is locked for students. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z.

quiz[unlock_at] DateTime

The day/time the quiz is unlocked for students. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z.

quiz[published] boolean

Whether the quiz should have a draft state of published or unpublished. NOTE: If students have started taking the quiz, or there are any submissions for the quiz, you may not unpublish a quiz and will recieve an error.

quiz[one_time_results] boolean

Whether students should be prevented from viewing their quiz results past the first time (right after they turn the quiz in.) Only valid if “hide_results” is not set to “always”. Defaults to false.

quiz[only_visible_to_overrides] boolean

Whether this quiz is only visible to overrides (Only useful if 'differentiated assignments' account setting is on) Defaults to false.

Returns a Quiz

Edit a quiz Quizzes::QuizzesApiController#update

PUT /api/v1/courses/:course_id/quizzes/:id

Scope: url:PUT|/api/v1/courses/:course_id/quizzes/:id

Modify an existing quiz. See the documentation for quiz creation.

Additional arguments:

Request Parameters:

Parameter Type Description
quiz[notify_of_update] boolean

If true, notifies users that the quiz has changed. Defaults to true

Returns a Quiz

Delete a quiz Quizzes::QuizzesApiController#destroy

DELETE /api/v1/courses/:course_id/quizzes/:id

Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:id

Reorder quiz items Quizzes::QuizzesApiController#reorder

POST /api/v1/courses/:course_id/quizzes/:id/reorder

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:id/reorder

Change order of the quiz questions or groups within the quiz

204 No Content response code is returned if the reorder was successful.

Request Parameters:

Parameter Type Description
order[][id] Required integer

The associated item's unique identifier

order[][type] string

The type of item is either 'question' or 'group'

Allowed values: question, group

Validate quiz access code Quizzes::QuizzesApiController#validate_access_code

POST /api/v1/courses/:course_id/quizzes/:id/validate_access_code

Scope: url:POST|/api/v1/courses/:course_id/quizzes/:id/validate_access_code

Accepts an access code and returns a boolean indicating whether that access code is correct

Request Parameters:

Parameter Type Description
access_code Required string

The access code being validated

List roles RoleOverridesController#api_index

GET /api/v1/accounts/:account_id/roles

Scope: url:GET|/api/v1/accounts/:account_id/roles

A paginated list of the roles available to an account.

Request Parameters:

Parameter Type Description
account_id Required string

The id of the account to retrieve roles for.

state[] string

Filter by role state. If this argument is omitted, only 'active' roles are returned.

Allowed values: active, inactive

show_inherited boolean

If this argument is true, all roles inherited from parent accounts will be included.

Returns a list of Roles

Get a single role RoleOverridesController#show

GET /api/v1/accounts/:account_id/roles/:id

Scope: url:GET|/api/v1/accounts/:account_id/roles/:id

Retrieve information about a single role

Request Parameters:

Parameter Type Description
account_id Required string

The id of the account containing the role

role_id Required integer

The unique identifier for the role

role string

The name for the role

Returns a Role

Create a new role RoleOverridesController#add_role

POST /api/v1/accounts/:account_id/roles

Scope: url:POST|/api/v1/accounts/:account_id/roles

Create a new course-level or account-level role.

Request Parameters:

Parameter Type Description
label Required string

Label for the role.

role string

Deprecated alias for label.

base_role_type string

Specifies the role type that will be used as a base for the permissions granted to this role.

Defaults to 'AccountMembership' if absent

Allowed values: AccountMembership, StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment

permissions[<X>][explicit] boolean

no description

permissions[<X>][enabled] boolean

If explicit is 1 and enabled is 1, permission <X> will be explicitly granted to this role. If explicit is 1 and enabled has any other value (typically 0), permission <X> will be explicitly denied to this role. If explicit is any other value (typically 0) or absent, or if enabled is absent, the value for permission <X> will be inherited from upstream. Ignored if permission <X> is locked upstream (in an ancestor account).

May occur multiple times with unique values for <X>. Recognized permission names for <X> are:

[For Account-Level Roles Only]
become_user                      -- Become other users
import_sis                       -- Import SIS data
manage_account_memberships       -- Add/remove other admins for the account
manage_account_settings          -- Manage account-level settings
manage_alerts                    -- Manage global alerts
manage_courses                   -- Manage ( add / edit / delete ) courses
manage_developer_keys            -- Manage developer keys
manage_global_outcomes           -- Manage learning outcomes
manage_jobs                      -- Manage background jobs
manage_role_overrides            -- Manage permissions
manage_storage_quotas            -- Set storage quotas for courses, groups, and users
manage_sis                       -- Manage SIS data
manage_site_settings             -- Manage site-wide and plugin settings
manage_user_logins               -- Modify login details for users
read_course_content              -- View course content
read_course_list                 -- View the list of courses
read_messages                    -- View notifications sent to users
site_admin                       -- Use the Site Admin section and admin all other accounts
view_error_reports               -- View error reports
view_statistics                  -- View statistics
manage_feature_flags             -- Enable or disable features at an account level

[For both Account-Level and Course-Level roles]
 Note: Applicable enrollment types for course-level roles are given in brackets:
       S = student, T = teacher, A = TA, D = designer, O = observer.
       Lower-case letters indicate permissions that are off by default.
       A missing letter indicates the permission cannot be enabled for the role
       or any derived custom roles.
change_course_state              -- [ TaD ] Change course state
comment_on_others_submissions    -- [sTAD ] View all students' submissions and make comments on them
create_collaborations            -- [STADo] Create student collaborations
create_conferences               -- [STADo] Create web conferences
import_outcomes                  -- [ TaDo] Import outcome data
manage_admin_users               -- [ Tad ] Add/remove other teachers, course designers or TAs to the course
manage_assignments               -- [ TADo] Manage (add / edit / delete) assignments and quizzes
manage_calendar                  -- [sTADo] Add, edit and delete events on the course calendar
manage_content                   -- [ TADo] Manage all other course content
manage_files                     -- [ TADo] Manage (add / edit / delete) course files
manage_grades                    -- [ TA  ] Edit grades
manage_groups                    -- [ TAD ] Manage (create / edit / delete) groups
manage_interaction_alerts        -- [ Ta  ] Manage alerts
manage_outcomes                  -- [sTaDo] Manage learning outcomes
manage_sections                  -- [ TaD ] Manage (create / edit / delete) course sections
manage_students                  -- [ TAD ] Add/remove students for the course
manage_user_notes                -- [ TA  ] Manage faculty journal entries
manage_rubrics                   -- [ TAD ] Edit assessing rubrics
manage_wiki                      -- [ TADo] Manage (add / edit / delete) pages
read_forum                       -- [STADO] View discussions
moderate_forum                   -- [sTADo] Moderate discussions (delete/edit others' posts, lock topics)
post_to_forum                    -- [STADo] Post to discussions
read_announcements               -- [STADO] View announcements
read_question_banks              -- [ TADo] View and link to question banks
read_reports                     -- [ TAD ] View usage reports for the course
read_roster                      -- [STADo] See the list of users
read_sis                         -- [sTa  ] Read SIS data
send_messages                    -- [STADo] Send messages to individual course members
send_messages_all                -- [sTADo] Send messages to the entire class
view_all_grades                  -- [ TAd ] View all grades
view_group_pages                 -- [sTADo] View the group pages of all student groups
lti_add_edit                     -- [ TAD ] LTI add and edit
read_email_addresses             -- [sTAdo] See other users' primary email address
view_user_logins                 -- [ TA  ] View login ids for users

Some of these permissions are applicable only for roles on the site admin account, on a root account, or for course-level roles with a particular base role type; if a specified permission is inapplicable, it will be ignored.

Additional permissions may exist based on installed plugins.

permissions[<X>][locked] boolean

If the value is 1, permission <X> will be locked downstream (new roles in subaccounts cannot override the setting). For any other value, permission <X> is left unlocked. Ignored if permission <X> is already locked upstream. May occur multiple times with unique values for <X>.

permissions[<X>][applies_to_self] boolean

If the value is 1, permission <X> applies to the account this role is in. The default value is 1. Must be true if applies_to_descendants is false. This value is only returned if enabled is true.

permissions[<X>][applies_to_descendants] boolean

If the value is 1, permission <X> cascades down to sub accounts of the account this role is in. The default value is 1. Must be true if applies_to_self is false.This value is only returned if enabled is true.

Example Request:

curl 'https://<canvas>/api/v1/accounts/<account_id>/roles.json' \
     -H "Authorization: Bearer <token>" \
     -F 'label=New Role' \
     -F 'permissions[read_course_content][explicit]=1' \
     -F 'permissions[read_course_content][enabled]=1' \
     -F 'permissions[read_course_list][locked]=1' \
     -F 'permissions[read_question_banks][explicit]=1' \
     -F 'permissions[read_question_banks][enabled]=0' \
     -F 'permissions[read_question_banks][locked]=1'
Returns a Role

Deactivate a role RoleOverridesController#remove_role

DELETE /api/v1/accounts/:account_id/roles/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/roles/:id

Deactivates a custom role. This hides it in the user interface and prevents it from being assigned to new users. Existing users assigned to the role will continue to function with the same permissions they had previously. Built-in roles cannot be deactivated.

Request Parameters:

Parameter Type Description
role_id Required integer

The unique identifier for the role

role string

The name for the role

Returns a Role

Activate a role RoleOverridesController#activate_role

POST /api/v1/accounts/:account_id/roles/:id/activate

Scope: url:POST|/api/v1/accounts/:account_id/roles/:id/activate

Re-activates an inactive role (allowing it to be assigned to new users)

Request Parameters:

Parameter Type Description
role_id Required integer

The unique identifier for the role

role Deprecated

The name for the role

Returns a Role

Update a role RoleOverridesController#update

PUT /api/v1/accounts/:account_id/roles/:id

Scope: url:PUT|/api/v1/accounts/:account_id/roles/:id

Update permissions for an existing role.

Recognized roles are:

  • TeacherEnrollment

  • StudentEnrollment

  • TaEnrollment

  • ObserverEnrollment

  • DesignerEnrollment

  • AccountAdmin

  • Any previously created custom role

Request Parameters:

Parameter Type Description
label string

The label for the role. Can only change the label of a custom role that belongs directly to the account.

permissions[<X>][explicit] boolean

no description

permissions[<X>][enabled] boolean

These arguments are described in the documentation for the add_role method.

permissions[<X>][applies_to_self] boolean

If the value is 1, permission <X> applies to the account this role is in. The default value is 1. Must be true if applies_to_descendants is false. This value is only returned if enabled is true.

permissions[<X>][applies_to_descendants] boolean

If the value is 1, permission <X> cascades down to sub accounts of the account this role is in. The default value is 1. Must be true if applies_to_self is false.This value is only returned if enabled is true.

Example Request:

curl https://<canvas>/api/v1/accounts/:account_id/roles/2 \
  -X PUT \
  -H 'Authorization: Bearer <access_token>' \
  -F 'label=New Role Name' \
  -F 'permissions[manage_groups][explicit]=1' \
  -F 'permissions[manage_groups][enabled]=1' \
  -F 'permissions[manage_groups][locked]=1' \
  -F 'permissions[send_messages][explicit]=1' \
  -F 'permissions[send_messages][enabled]=0'
Returns a Role

List rubrics RubricsApiController#index

GET /api/v1/accounts/:account_id/rubrics

Scope: url:GET|/api/v1/accounts/:account_id/rubrics

GET /api/v1/courses/:course_id/rubrics

Scope: url:GET|/api/v1/courses/:course_id/rubrics

Returns the paginated list of active rubrics for the current context.

Get a single rubric RubricsApiController#show

GET /api/v1/accounts/:account_id/rubrics/:id

Scope: url:GET|/api/v1/accounts/:account_id/rubrics/:id

GET /api/v1/courses/:course_id/rubrics/:id

Scope: url:GET|/api/v1/courses/:course_id/rubrics/:id

Returns the rubric with the given id.

Request Parameters:

Parameter Type Description
include string

If included, the type of associated rubric assessments to return. If not included, assessments will be omitted.

Allowed values: assessments, graded_assessments, peer_assessments

style string

Applicable only if assessments are being returned. If included, returns either all criteria data associated with the assessment, or just the comments. If not included, both data and comments are omitted.

Allowed values: full, comments_only

Returns a Rubric

Get SIS import error list SisImportErrorsApiController#index

GET /api/v1/accounts/:account_id/sis_imports/:id/errors

Scope: url:GET|/api/v1/accounts/:account_id/sis_imports/:id/errors

GET /api/v1/accounts/:account_id/sis_import_errors

Scope: url:GET|/api/v1/accounts/:account_id/sis_import_errors

Returns the list of SIS import errors for an account or a SIS import. Import errors are only stored for 30 days.

Example:

curl 'https://<canvas>/api/v1/accounts/<account_id>/sis_imports/<id>/sis_import_errors' \
  -H "Authorization: Bearer <token>"

Example:

curl 'https://<canvas>/api/v1/accounts/<account_id>/sis_import_errors' \
  -H "Authorization: Bearer <token>"
Returns a list of SisImportErrors

Get SIS import list SisImportsApiController#index

GET /api/v1/accounts/:account_id/sis_imports

Scope: url:GET|/api/v1/accounts/:account_id/sis_imports

Returns the list of SIS imports for an account

Example:

curl https://<canvas>/api/v1/accounts/<account_id>/sis_imports \
  -H 'Authorization: Bearer <token>'

Request Parameters:

Parameter Type Description
created_since DateTime

If set, only shows imports created after the specified date (use ISO8601 format)

Returns a list of SisImports

Import SIS data SisImportsApiController#create

POST /api/v1/accounts/:account_id/sis_imports

Scope: url:POST|/api/v1/accounts/:account_id/sis_imports

Import SIS data into Canvas. Must be on a root account with SIS imports enabled.

For more information on the format that's expected here, please see the “SIS CSV” section in the API docs.

Request Parameters:

Parameter Type Description
import_type string

Choose the data format for reading SIS data. With a standard Canvas install, this option can only be 'instructure_csv', and if unprovided, will be assumed to be so. Can be part of the query string.

attachment string

There are two ways to post SIS import data - either via a multipart/form-data form-field-style attachment, or via a non-multipart raw post request.

'attachment' is required for multipart/form-data style posts. Assumed to be SIS data from a file upload form field named 'attachment'.

Examples:

curl -F attachment=@<filename> -H "Authorization: Bearer <token>" \
    https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv

If you decide to do a raw post, you can skip the 'attachment' argument, but you will then be required to provide a suitable Content-Type header. You are encouraged to also provide the 'extension' argument.

Examples:

curl -H 'Content-Type: application/octet-stream' --data-binary @<filename>.zip \
    -H "Authorization: Bearer <token>" \
    https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv&extension=zip

curl -H 'Content-Type: application/zip' --data-binary @<filename>.zip \
    -H "Authorization: Bearer <token>" \
    https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv

curl -H 'Content-Type: text/csv' --data-binary @<filename>.csv \
    -H "Authorization: Bearer <token>" \
    https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv

curl -H 'Content-Type: text/csv' --data-binary @<filename>.csv \
    -H "Authorization: Bearer <token>" \
    https://<canvas>/api/v1/accounts/<account_id>/sis_imports.json?import_type=instructure_csv&batch_mode=1&batch_mode_term_id=15
extension string

Recommended for raw post request style imports. This field will be used to distinguish between zip, xml, csv, and other file format extensions that would usually be provided with the filename in the multipart post request scenario. If not provided, this value will be inferred from the Content-Type, falling back to zip-file format if all else fails.

batch_mode boolean

If set, this SIS import will be run in batch mode, deleting any data previously imported via SIS that is not present in this latest import. See the SIS CSV Format page for details. Batch mode cannot be used with diffing.

batch_mode_term_id string

Limit deletions to only this term. Required if batch mode is enabled.

multi_term_batch_mode boolean

Runs batch mode against all terms in terms file. Requires change_threshold.

skip_deletes boolean

When set the import will skip any deletes. This does not account for objects that are deleted during the batch mode cleanup process.

override_sis_stickiness boolean

Many fields on records in Canvas can be marked “sticky,” which means that when something changes in the UI apart from the SIS, that field gets “stuck.” In this way, by default, SIS imports do not override UI changes. If this field is present, however, it will tell the SIS import to ignore “stickiness” and override all fields.

add_sis_stickiness boolean

This option, if present, will process all changes as if they were UI changes. This means that “stickiness” will be added to changed fields. This option is only processed if 'override_sis_stickiness' is also provided.

clear_sis_stickiness boolean

This option, if present, will clear “stickiness” from all fields touched by this import. Requires that 'override_sis_stickiness' is also provided. If 'add_sis_stickiness' is also provided, 'clear_sis_stickiness' will overrule the behavior of 'add_sis_stickiness'

diffing_data_set_identifier string

If set on a CSV import, Canvas will attempt to optimize the SIS import by comparing this set of CSVs to the previous set that has the same data set identifier, and only applying the difference between the two. See the SIS CSV Format documentation for more details. Diffing cannot be used with batch_mode

diffing_remaster_data_set boolean

If true, and diffing_data_set_identifier is sent, this SIS import will be part of the data set, but diffing will not be performed. See the SIS CSV Format documentation for details.

diffing_drop_status string

If diffing_drop_status is passed, this SIS import will use this status for enrollments that are not included in the sis_batch. Defaults to 'deleted'

Allowed values: deleted, completed, inactive

change_threshold integer

If set with batch_mode, the batch cleanup process will not run if the number of items deleted is higher than the percentage set. If set to 10 and a term has 200 enrollments, and batch would delete more than 20 of the enrollments the batch will abort before the enrollments are deleted. The change_threshold will be evaluated for course, sections, and enrollments independently. If set with diffing, diffing will not be performed if the files are greater than the threshold as a percent. If set to 5 and the file is more than 5% smaller or more than 5% larger than the file that is being compared to, diffing will not be performed. If the files are less than 5%, diffing will be performed. See the SIS CSV Format documentation for more details. Required for multi_term_batch_mode.

Returns a SisImport

Get SIS import status SisImportsApiController#show

GET /api/v1/accounts/:account_id/sis_imports/:id

Scope: url:GET|/api/v1/accounts/:account_id/sis_imports/:id

Get the status of an already created SIS import.

Examples:
  curl https://<canvas>/api/v1/accounts/<account_id>/sis_imports/<sis_import_id> \
      -H 'Authorization: Bearer <token>'
Returns a SisImport

Restore workflow_states of SIS imported items SisImportsApiController#restore_states

PUT /api/v1/accounts/:account_id/sis_imports/:id/restore_states

Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/:id/restore_states

This will restore the the workflow_state for all the items that changed their workflow_state during the import being restored. This will restore states for items imported with the following importers: accounts.csv terms.csv courses.csv sections.csv group_categories.csv groups.csv users.csv admins.csv This also restores states for other items that changed during the import. An example would be if an enrollment was deleted from a sis import and the group_membership was also deleted as a result of the enrollment deletion, both items would be restored when the sis batch is restored.

Request Parameters:

Parameter Type Description
batch_mode boolean

If set, will only restore items that were deleted from batch_mode.

undelete_only boolean

If set, will only restore items that were deleted. This will ignore any items that were created or modified.

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/sis_imports/<sis_import_id>/restore_states \
  -H 'Authorization: Bearer <token>'
Returns a SisImport

Abort SIS import SisImportsApiController#abort

PUT /api/v1/accounts/:account_id/sis_imports/:id/abort

Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/:id/abort

Abort a SIS import that has not completed.

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/sis_imports/<sis_import_id>/abort \
  -H 'Authorization: Bearer <token>'
Returns a SisImport

Abort all pending SIS imports SisImportsApiController#abort_all_pending

PUT /api/v1/accounts/:account_id/sis_imports/abort_all_pending

Scope: url:PUT|/api/v1/accounts/:account_id/sis_imports/abort_all_pending

Abort already created but not processed or processing SIS imports.

Example Request:

curl https://<canvas>/api/v1/accounts/<account_id>/sis_imports/abort_all_pending \
  -H 'Authorization: Bearer <token>'

Retrieve assignments enabled for grade export to SIS SisApiController#sis_assignments

GET /api/sis/accounts/:account_id/assignments

Scope: url:GET|/api/sis/accounts/:account_id/assignments

GET /api/sis/courses/:course_id/assignments

Scope: url:GET|/api/sis/courses/:course_id/assignments

Retrieve a list of published assignments flagged as “post_to_sis”. See the Assignments API for more details on assignments. Assignment group and section information are included for convenience.

Each section includes course information for the origin course and the cross-listed course, if applicable. The `origin_course` is the course to which the section belongs or the course from which the section was cross-listed. Generally, the `origin_course` should be preferred when performing integration work. The `xlist_course` is provided for consistency and is only present when the section has been cross-listed. See Sections API and Courses Api for me details.

The `override` is only provided if the Differentiated Assignments course feature is turned on and the assignment has an override for that section. When there is an override for the assignment the override object's keys/values can be merged with the top level assignment object to create a view of the assignment object specific to that section. See Assignments api for more information on assignment overrides.

restricts to courses that start before this date (if they have a start date) restricts to courses that end after this date (if they have an end date) information to include.

"student_overrides":: returns individual student override information

Request Parameters:

Parameter Type Description
account_id integer

The ID of the account to query.

course_id integer

The ID of the course to query.

starts_before DateTime

When searching on an account,

ends_after DateTime

When searching on an account,

include string

Array of additional

Allowed values: student_overrides

Disable assignments currently enabled for grade export to SIS DisablePostToSisApiController#disable_post_to_sis

PUT /api/sis/courses/:course_id/disable_post_to_sis

Scope: url:PUT|/api/sis/courses/:course_id/disable_post_to_sis

Disable all assignments flagged as “post_to_sis”, with the option of making it specific to a grading period, in a course.

On success, the response will be 204 No Content with an empty body.

On failure, the response will be 400 Bad Request with a body of a specific message.

For disabling assignments in a specific grading period

Request Parameters:

Parameter Type Description
course_id integer

The ID of the course.

grading_period_id integer

The ID of the grading period.

Example Request:

curl 'https://<canvas>/api/sis/courses/<course_id>/disable_post_to_sis' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0"

curl 'https://<canvas>/api/sis/courses/<course_id>/disable_post_to_sis' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0" \
     -d 'grading_period_id=1'

Find recipients SearchController#recipients

GET /api/v1/conversations/find_recipients

Scope: url:GET|/api/v1/conversations/find_recipients

GET /api/v1/search/recipients

Scope: url:GET|/api/v1/search/recipients

Find valid recipients (users, courses and groups) that the current user can send messages to. The /api/v1/search/recipients path is the preferred endpoint, /api/v1/conversations/find_recipients is deprecated.

Pagination is supported.

Request Parameters:

Parameter Type Description
search string

Search terms used for matching users/courses/groups (e.g. “bob smith”). If multiple terms are given (separated via whitespace), only results matching all terms will be returned.

context string

Limit the search to a particular course/group (e.g. “course_3” or “group_4”).

exclude[] string

Array of ids to exclude from the search. These may be user ids or course/group ids prefixed with “course_” or “group_” respectively, e.g. exclude[]=1&exclude=2&exclude[]=course_3

type string

Limit the search just to users or contexts (groups/courses).

Allowed values: user, context

user_id integer

Search for a specific user id. This ignores the other above parameters, and will never return more than one result.

from_conversation_id integer

When searching by user_id, only users that could be normally messaged by this user will be returned. This parameter allows you to specify a conversation that will be referenced for a shared context – if both the current user and the searched user are in the conversation, the user will be returned. This is used to start new side conversations.

permissions[] string

Array of permission strings to be checked for each matched context (e.g. “send_messages”). This argument determines which permissions may be returned in the response; it won't prevent contexts from being returned if they don't grant the permission(s).

API response field:

  • id

    The unique identifier for the user/context. For groups/courses, the id is prefixed by “group_”/“course_” respectively.

  • name

    The name of the context or short name of the user

  • full_name

    Only set for users. The full name of the user

  • avatar_url

    Avatar image url for the user/context

  • type
    “context”|“course”|“section”|“group”|“user”|null

    Type of recipients to return, defaults to null (all). “context” encompasses “course”, “section” and “group”

  • types[]

    Array of recipient types to return (see type above), e.g. types[]=user&types=course

  • user_count

    Only set for contexts, indicates number of messageable users

  • common_courses

    Only set for users. Hash of course ids and enrollment types for each course to show what they share with this user

  • common_groups

    Only set for users. Hash of group ids and enrollment types for each group to show what they share with this user

  • permissions[]

    Only set for contexts. Mapping of requested permissions that the context grants the current user, e.g. { send_messages: true }

Example Response:

[
  {"id": "group_1", "name": "the group", "type": "context", "user_count": 3},
  {"id": 2, "name": "greg", "full_name": "greg jones", "common_courses": {}, "common_groups": {"1": ["Member"]}}
]

List all courses SearchController#all_courses

GET /api/v1/search/all_courses

Scope: url:GET|/api/v1/search/all_courses

A paginated list of all courses visible in the public index

Request Parameters:

Parameter Type Description
search string

Search terms used for matching users/courses/groups (e.g. “bob smith”). If multiple terms are given (separated via whitespace), only results matching all terms will be returned.

public_only boolean

Only return courses with public content. Defaults to false.

open_enrollment_only boolean

Only return courses that allow self enrollment. Defaults to false.

List course sections SectionsController#index

GET /api/v1/courses/:course_id/sections

Scope: url:GET|/api/v1/courses/:course_id/sections

A paginated list of the list of sections for this course.

Request Parameters:

Parameter Type Description
include[] string
  • “students”: Associations to include with the group. Note: this is only available if you have permission to view users or grades in the course

  • “avatar_url”: Include the avatar URLs for students returned.

  • “enrollments”: If 'students' is also included, return the section enrollment for each student

  • “total_students”: Returns the total amount of active and invited students for the course section

  • “passback_status”: Include the grade passback status.

Allowed values: students, avatar_url, enrollments, total_students, passback_status

Returns a list of Sections

Create course section SectionsController#create

POST /api/v1/courses/:course_id/sections

Scope: url:POST|/api/v1/courses/:course_id/sections

Creates a new section for this course.

Request Parameters:

Parameter Type Description
course_section[name] string

The name of the section

course_section[sis_section_id] string

The sis ID of the section. Must have manage_sis permission to set. This is ignored if caller does not have permission to set.

course_section[integration_id] string

The integration_id of the section. Must have manage_sis permission to set. This is ignored if caller does not have permission to set.

course_section[start_at] DateTime

Section start date in ISO8601 format, e.g. 2011-01-01T01:00Z

course_section[end_at] DateTime

Section end date in ISO8601 format. e.g. 2011-01-01T01:00Z

course_section[restrict_enrollments_to_section_dates] boolean

Set to true to restrict user enrollments to the start and end dates of the section.

enable_sis_reactivation boolean

When true, will first try to re-activate a deleted section with matching sis_section_id if possible.

Returns a Section

Cross-list a Section SectionsController#crosslist

POST /api/v1/sections/:id/crosslist/:new_course_id

Scope: url:POST|/api/v1/sections/:id/crosslist/:new_course_id

Move the Section to another course. The new course may be in a different account (department), but must belong to the same root account (institution).

Returns a Section

De-cross-list a Section SectionsController#uncrosslist

DELETE /api/v1/sections/:id/crosslist

Scope: url:DELETE|/api/v1/sections/:id/crosslist

Undo cross-listing of a Section, returning it to its original course.

Returns a Section

Edit a section SectionsController#update

PUT /api/v1/sections/:id

Scope: url:PUT|/api/v1/sections/:id

Modify an existing section.

Request Parameters:

Parameter Type Description
course_section[name] string

The name of the section

course_section[sis_section_id] string

The sis ID of the section. Must have manage_sis permission to set.

course_section[integration_id] string

The integration_id of the section. Must have manage_sis permission to set.

course_section[start_at] DateTime

Section start date in ISO8601 format, e.g. 2011-01-01T01:00Z

course_section[end_at] DateTime

Section end date in ISO8601 format. e.g. 2011-01-01T01:00Z

course_section[restrict_enrollments_to_section_dates] boolean

Set to true to restrict user enrollments to the start and end dates of the section.

Returns a Section

Get section information SectionsController#show

GET /api/v1/courses/:course_id/sections/:id

Scope: url:GET|/api/v1/courses/:course_id/sections/:id

GET /api/v1/sections/:id

Scope: url:GET|/api/v1/sections/:id

Gets details about a specific section

Request Parameters:

Parameter Type Description
include[] string
  • “students”: Associations to include with the group. Note: this is only available if you have permission to view users or grades in the course

  • “avatar_url”: Include the avatar URLs for students returned.

  • “enrollments”: If 'students' is also included, return the section enrollment for each student

  • “total_students”: Returns the total amount of active and invited students for the course section

  • “passback_status”: Include the grade passback status.

Allowed values: students, avatar_url, enrollments, total_students, passback_status

Returns a Section

Delete a section SectionsController#destroy

DELETE /api/v1/sections/:id

Scope: url:DELETE|/api/v1/sections/:id

Delete an existing section. Returns the former Section.

Returns a Section

Get Kaltura config ServicesApiController#show_kaltura_config

GET /api/v1/services/kaltura

Scope: url:GET|/api/v1/services/kaltura

Return the config information for the Kaltura plugin in json format.

API response field:

  • enabled

    Enabled state of the Kaltura plugin

  • domain

    Main domain of the Kaltura instance (This is the URL where the Kaltura API resides)

  • resources_domain

    Kaltura URL for grabbing thumbnails and other resources

  • rtmp_domain

    Hostname to be used for RTMP recording

  • partner_id

    Partner ID used for communicating with the Kaltura instance

Example Response:

# For an enabled Kaltura plugin:
{
  'domain': 'kaltura.example.com',
  'enabled': true,
  'partner_id': '123456',
  'resource_domain': 'cdn.kaltura.example.com',
  'rtmp_domain': 'rtmp.example.com'
}

# For a disabled or unconfigured Kaltura plugin:
{
  'enabled': false
}

Start Kaltura session ServicesApiController#start_kaltura_session

POST /api/v1/services/kaltura_session

Scope: url:POST|/api/v1/services/kaltura_session

Start a new Kaltura session, so that new media can be recorded and uploaded to this Canvas instance's Kaltura instance.

API response field:

  • ks

    The kaltura session id, for use in the kaltura v3 API. This can be used in the uploadtoken service, for instance, to upload a new media file into kaltura.

Example Response:

{
  'ks': '1e39ad505f30c4fa1af5752b51bd69fe'
}

Share a BrandConfig (Theme) SharedBrandConfigsController#create

POST /api/v1/accounts/:account_id/shared_brand_configs

Scope: url:POST|/api/v1/accounts/:account_id/shared_brand_configs

Create a SharedBrandConfig, which will give the given brand_config a name and make it available to other users of this account.

Request Parameters:

Parameter Type Description
shared_brand_config[name] Required string

Name to share this BrandConfig (theme) as.

shared_brand_config[brand_config_md5] Required string

MD5 of brand_config to share

Example Request:

curl 'https://<canvas>/api/v1/accounts/<account_id>/shared_brand_configs' \
     -X POST \
     -F 'shared_brand_config[name]=Crimson and Gold Theme' \
     -F 'shared_brand_config[brand_config_md5]=a1f113321fa024e7a14cb0948597a2a4' \
     -H "Authorization: Bearer <token>"
Returns a SharedBrandConfig

Update a shared theme SharedBrandConfigsController#update

PUT /api/v1/accounts/:account_id/shared_brand_configs/:id

Scope: url:PUT|/api/v1/accounts/:account_id/shared_brand_configs/:id

Update the specified shared_brand_config with a new name or to point to a new brand_config. Uses same parameters as create.

Example Request:

curl -X PUT 'https://<canvas>/api/v1/accounts/<account_id>/shared_brand_configs/<shared_brand_config_id>' \
     -H "Authorization: Bearer <token>" \
     -F 'shared_brand_config[name]=New Name' \
     -F 'shared_brand_config[brand_config_md5]=a1f113321fa024e7a14cb0948597a2a4'
Returns a SharedBrandConfig

Un-share a BrandConfig (Theme) SharedBrandConfigsController#destroy

DELETE /api/v1/shared_brand_configs/:id

Scope: url:DELETE|/api/v1/shared_brand_configs/:id

Delete a SharedBrandConfig, which will unshare it so you nor anyone else in your account will see it as an option to pick from.

Example Request:

curl -X DELETE https://<canvas>/api/v1/shared_brand_configs/<id> \
     -H 'Authorization: Bearer <token>'
Returns a SharedBrandConfig

Upload a file SubmissionCommentsApiController#create_file

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/files

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/files

Upload a file to attach to a submission comment

See the File Upload Documentation for details on the file upload workflow.

The final step of the file upload workflow will return the attachment data, including the new file id. The caller can then PUT the file_id to the submission API to attach it to a comment

Submit an assignment SubmissionsController#create

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions

POST /api/v1/sections/:section_id/assignments/:assignment_id/submissions

Scope: url:POST|/api/v1/sections/:section_id/assignments/:assignment_id/submissions

Make a submission for an assignment. You must be enrolled as a student in the course/section to do this.

All online turn-in submission types are supported in this API. However, there are a few things that are not yet supported:

  • Files can be submitted based on a file ID of a user or group file. However, there is no API yet for listing the user and group files, or uploading new files via the API. A file upload API is coming soon.

  • Media comments can be submitted, however, there is no API yet for creating a media comment to submit.

  • Integration with Google Docs is not yet supported.

Request Parameters:

Parameter Type Description
comment[text_comment] string

Include a textual comment with the submission.

submission[submission_type] Required string

The type of submission being made. The assignment submission_types must include this submission type as an allowed option, or the submission will be rejected with a 400 error.

The submission_type given determines which of the following parameters is used. For instance, to submit a URL, submission [submission_type] must be set to “online_url”, otherwise the submission [url] parameter will be ignored.

Allowed values: online_text_entry, online_url, online_upload, media_recording, basic_lti_launch

submission[body] string

Submit the assignment as an HTML document snippet. Note this HTML snippet will be sanitized using the same ruleset as a submission made from the Canvas web UI. The sanitized HTML will be returned in the response as the submission body. Requires a submission_type of “online_text_entry”.

submission[url] string

Submit the assignment as a URL. The URL scheme must be “http” or “https”, no “ftp” or other URL schemes are allowed. If no scheme is given (e.g. “www.example.com”) then “http” will be assumed. Requires a submission_type of “online_url” or “basic_lti_launch”.

submission[file_ids][] integer

Submit the assignment as a set of one or more previously uploaded files residing in the submitting user's files section (or the group's files section, for group assignments).

To upload a new file to submit, see the submissions Upload a file API.

Requires a submission_type of “online_upload”.

submission[media_comment_id] string

The media comment id to submit. Media comment ids can be submitted via this API, however, note that there is not yet an API to generate or list existing media comments, so this functionality is currently of limited use.

Requires a submission_type of “media_recording”.

submission[media_comment_type] string

The type of media comment being submitted.

Allowed values: audio, video

List assignment submissions SubmissionsApiController#index

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

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

GET /api/v1/sections/:section_id/assignments/:assignment_id/submissions

Scope: url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/submissions

A paginated list of all existing submissions for an assignment.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the group. “group” will add group_id and group_name.

Allowed values: submission_history, submission_comments, rubric_assessment, assignment, visibility, course, user, group

grouped boolean

If this argument is true, the response will be grouped by student groups.

API response field:

  • assignment_id

    The unique identifier for the assignment.

  • user_id

    The id of the user who submitted the assignment.

  • grader_id

    The id of the user who graded the submission. This will be null for submissions that haven't been graded yet. It will be a positive number if a real user has graded the submission and a negative number if the submission was graded by a process (e.g. Quiz autograder and autograding LTI tools). Specifically autograded quizzes set grader_id to the negative of the quiz id. Submissions autograded by LTI tools set grader_id to the negative of the tool id.

  • canvadoc_document_id

    The id for the canvadoc document associated with this submission, if it was a file upload.

  • submitted_at

    The timestamp when the assignment was submitted, if an actual submission has been made.

  • score

    The raw score for the assignment submission.

  • attempt

    If multiple submissions have been made, this is the attempt number.

  • body

    The content of the submission, if it was submitted directly in a text field.

  • grade

    The grade for the submission, translated into the assignment grading scheme (so a letter grade, for example).

  • grade_matches_current_submission

    A boolean flag which is false if the student has re-submitted since the submission was last graded.

  • preview_url

    Link to the URL in canvas where the submission can be previewed. This will require the user to log in.

  • url

    If the submission was made as a URL.

  • late

    Whether the submission was made after the applicable due date.

  • assignment_visible

    Whether this assignment is visible to the user who submitted the assignment.

  • workflow_state

    The current status of the submission. Possible values: “submitted”, “unsubmitted”, “graded”, “pending_review”

Returns a list of Submissions

List submissions for multiple assignments SubmissionsApiController#for_students

GET /api/v1/courses/:course_id/students/submissions

Scope: url:GET|/api/v1/courses/:course_id/students/submissions

GET /api/v1/sections/:section_id/students/submissions

Scope: url:GET|/api/v1/sections/:section_id/students/submissions

A paginated list of all existing submissions for a given set of students and assignments.

Request Parameters:

Parameter Type Description
student_ids[] string

List of student ids to return submissions for. If this argument is omitted, return submissions for the calling user. Students may only list their own submissions. Observers may only list those of associated students. The special id “all” will return submissions for all students in the course/section as appropriate.

assignment_ids[] string

List of assignments to return submissions for. If none are given, submissions for all assignments are returned.

grouped boolean

If this argument is present, the response will be grouped by student, rather than a flat array of submissions.

post_to_sis boolean

If this argument is set to true, the response will only include submissions for assignments that have the post_to_sis flag set to true and user enrollments that were added through sis.

submitted_since DateTime

If this argument is set, the response will only include submissions that were submitted after the specified date_time. This will exclude submissions that do not have a submitted_at which will exclude unsubmitted submissions. The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

graded_since DateTime

If this argument is set, the response will only include submissions that were graded after the specified date_time. This will exclude submissions that have not been graded. The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ.

grading_period_id integer

The id of the grading period in which submissions are being requested (Requires grading periods to exist on the account)

workflow_state string

The current status of the submission

Allowed values: submitted, unsubmitted, graded, pending_review

enrollment_state string

The current state of the enrollments. If omitted will include all enrollments that are not deleted.

Allowed values: active, concluded

state_based_on_date boolean

If omitted it is set to true. When set to false it will ignore the effective state of the student enrollments and use the workflow_state for the enrollments. The argument is ignored unless enrollment_state argument is also passed.

order string

The order submissions will be returned in. Defaults to “id”. Doesn't affect results for “grouped” mode.

Allowed values: id, graded_at

order_direction string

Determines whether ordered results are returned in ascending or descending order. Defaults to “ascending”. Doesn't affect results for “grouped” mode.

Allowed values: ascending, descending

include[] string

Associations to include with the group. `total_scores` requires the `grouped` argument.

Allowed values: submission_history, submission_comments, rubric_assessment, assignment, total_scores, visibility, course, user

Example Response:

# Without grouped:

[
  { "assignment_id": 100, grade: 5, "user_id": 1, ... },
  { "assignment_id": 101, grade: 6, "user_id": 2, ... }

# With grouped:

[
  {
    "user_id": 1,
    "submissions": [
      { "assignment_id": 100, grade: 5, ... },
      { "assignment_id": 101, grade: 6, ... }
    ]
  }
]

Get a single submission SubmissionsApiController#show

GET /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id

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

GET /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id

Scope: url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id

Get a single submission, based on user id.

Request Parameters:

Parameter Type Description
include[] string

Associations to include with the group.

Allowed values: submission_history, submission_comments, rubric_assessment, visibility, course, user

Upload a file SubmissionsApiController#create_file

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/files

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/files

POST /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/files

Scope: url:POST|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/files

Upload a file to a submission.

This API endpoint is the first step in uploading a file to a submission as a student. See the File Upload Documentation for details on the file upload workflow.

The final step of the file upload workflow will return the attachment data, including the new file id. The caller can then POST to submit the online_upload assignment with these file ids.

Grade or comment on a submission SubmissionsApiController#update

PUT /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id

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

PUT /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id

Scope: url:PUT|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id

Comment on and/or update the grading for a student's assignment submission. If any submission or rubric_assessment arguments are provided, the user must have permission to manage grades in the appropriate context (course or section).

Request Parameters:

Parameter Type Description
comment[text_comment] string

Add a textual comment to the submission.

comment[group_comment] boolean

Whether or not this comment should be sent to the entire group (defaults to false). Ignored if this is not a group assignment or if no text_comment is provided.

comment[media_comment_id] string

Add an audio/video comment to the submission. Media comments can be added via this API, however, note that there is not yet an API to generate or list existing media comments, so this functionality is currently of limited use.

comment[media_comment_type] string

The type of media comment being added.

Allowed values: audio, video

comment[file_ids][] integer

Attach files to this comment that were previously uploaded using the Submission Comment API's files action

include[visibility] string

Whether this assignment is visible to the owner of the submission

submission[posted_grade] string

Assign a score to the submission, updating both the “score” and “grade” fields on the submission record. This parameter can be passed in a few different formats:

points

A floating point or integral value, such as “13.5”. The grade

will be interpreted directly as the score of the assignment.
Values above assignment.points_possible are allowed, for awarding
extra credit.
percentage

A floating point value appended with a percent sign, such as

"40%". The grade will be interpreted as a percentage score on the
assignment, where 100% == assignment.points_possible. Values above 100%
are allowed, for awarding extra credit.
letter grade

A letter grade, following the assignment's defined letter

grading scheme. For example, "A-". The resulting score will be the high
end of the defined range for the letter grade. For instance, if "B" is
defined as 86% to 84%, a letter grade of "B" will be worth 86%. The
letter grade will be rejected if the assignment does not have a defined
letter grading scheme. For more fine-grained control of scores, pass in
points or percentage rather than the letter grade.
“pass/complete/fail/incomplete”

A string value of “pass” or “complete”

will give a score of 100%. "fail" or "incomplete" will give a score of
0.

Note that assignments with grading_type of “pass_fail” can only be assigned a score of 0 or assignment.points_possible, nothing inbetween. If a posted_grade in the “points” or “percentage” format is sent, the grade will only be accepted if the grade equals one of those two values.

submission[excuse] boolean

Sets the “excused” status of an assignment.

submission[late_policy_status] string

Sets the late policy status to either “late”, “missing”, “none”, or null.

submission[seconds_late_override] integer

Sets the seconds late if late policy status is “late”

rubric_assessment RubricAssessment

Assign a rubric assessment to this assignment submission. The sub-parameters here depend on the rubric for the assignment. The general format is, for each row in the rubric:

The points awarded for this row.

rubric_assessment[criterion_id][points]

Comments to add for this row.

rubric_assessment[criterion_id][comments]

For example, if the assignment rubric is (in JSON format):

[
  {
    'id': 'crit1',
    'points': 10,
    'description': 'Criterion 1',
    'ratings':
    [
      { 'description': 'Good', 'points': 10 },
      { 'description': 'Poor', 'points': 3 }
    ]
  },
  {
    'id': 'crit2',
    'points': 5,
    'description': 'Criterion 2',
    'ratings':
    [
      { 'description': 'Complete', 'points': 5 },
      { 'description': 'Incomplete', 'points': 0 }
    ]
  }
]

Then a possible set of values for rubric_assessment would be:

rubric_assessment[crit1][points]=3&rubric_assessment[crit2][points]=5&rubric_assessment[crit2][comments]=Well%20Done.

List gradeable students SubmissionsApiController#gradeable_students

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

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

A paginated list of students eligible to submit the assignment. The caller must have permission to view grades.

Section-limited instructors will only see students in their own sections.

returns [UserDisplay]

List multiple assignments gradeable students SubmissionsApiController#multiple_gradeable_students

GET /api/v1/courses/:course_id/assignments/gradeable_students

Scope: url:GET|/api/v1/courses/:course_id/assignments/gradeable_students

A paginated list of students eligible to submit a list of assignments. The caller must have permission to view grades for the requested course.

Section-limited instructors will only see students in their own sections.

Request Parameters:

Parameter Type Description
assignment_ids[] string

Assignments being requested

Example Response:

A [UserDisplay] with an extra assignment_ids field to indicate what assignments
that user can submit

[
  {
    "id": 2,
    "display_name": "Display Name",
    "avatar_image_url": "http://avatar-image-url.jpeg",
    "html_url": "http://canvas.com",
    "assignment_ids": [1, 2, 3]
  }
]

Grade or comment on multiple submissions SubmissionsApiController#bulk_update

POST /api/v1/courses/:course_id/submissions/update_grades

Scope: url:POST|/api/v1/courses/:course_id/submissions/update_grades

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/update_grades

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/update_grades

POST /api/v1/sections/:section_id/submissions/update_grades

Scope: url:POST|/api/v1/sections/:section_id/submissions/update_grades

POST /api/v1/sections/:section_id/assignments/:assignment_id/submissions/update_grades

Scope: url:POST|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/update_grades

Update the grading and comments on multiple student's assignment submissions in an asynchronous job.

The user must have permission to manage grades in the appropriate context (course or section).

Request Parameters:

Parameter Type Description
grade_data[<student_id>][posted_grade] string

See documentation for the posted_grade argument in the Submissions Update documentation

grade_data[<student_id>][excuse] boolean

See documentation for the excuse argument in the Submissions Update documentation

grade_data[<student_id>][rubric_assessment] RubricAssessment

See documentation for the rubric_assessment argument in the Submissions Update documentation

grade_data[<student_id>][text_comment] string

no description

grade_data[<student_id>][group_comment] boolean

no description

grade_data[<student_id>][media_comment_id] string

no description

grade_data[<student_id>][media_comment_type] string

no description

Allowed values: audio, video

grade_data[<student_id>][file_ids][] integer

See documentation for the comment[] arguments in the Submissions Update documentation

grade_data[<student_id>][assignment_id] integer

Specifies which assignment to grade. This argument is not necessary when using the assignment-specific endpoints.

Example Request:

curl 'https://<canvas>/api/v1/courses/1/assignments/2/submissions/update_grades' \
     -X POST \
     -F 'grade_data[3][posted_grade]=88' \
     -F 'grade_data[4][posted_grade]=95' \
     -H "Authorization: Bearer <token>"
Returns a Progress

Mark submission as read SubmissionsApiController#mark_submission_read

PUT /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read

Scope: url:PUT|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read

PUT /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/read

Scope: url:PUT|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/read

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/assignments/<assignment_id>/submissions/<user_id>/read.json' \
     -X PUT \
     -H "Authorization: Bearer <token>" \
     -H "Content-Length: 0"

Mark submission as unread SubmissionsApiController#mark_submission_unread

DELETE /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read

Scope: url:DELETE|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/read

DELETE /api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/read

Scope: url:DELETE|/api/v1/sections/:section_id/assignments/:assignment_id/submissions/:user_id/read

No request fields are necessary.

On success, the response will be 204 No Content with an empty body.

Example Request:

curl 'https://<canvas>/api/v1/courses/<course_id>/assignments/<assignment_id>/submissions/<user_id>/read.json' \
     -X DELETE \
     -H "Authorization: Bearer <token>"

Submission Summary SubmissionsApiController#submission_summary

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

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

GET /api/v1/sections/:section_id/assignments/:assignment_id/submission_summary

Scope: url:GET|/api/v1/sections/:section_id/assignments/:assignment_id/submission_summary

Returns the number of submissions for the given assignment based on gradeable students that fall into three categories: graded, ungraded, not submitted.

Request Parameters:

Parameter Type Description
grouped boolean

If this argument is true, the response will take into account student groups.

Example Response:

{
  "graded": 5,
  "ungraded": 10,
  "not_submitted": 42
}

List available tabs for a course or group TabsController#index

GET /api/v1/courses/:course_id/tabs

Scope: url:GET|/api/v1/courses/:course_id/tabs

GET /api/v1/groups/:group_id/tabs

Scope: url:GET|/api/v1/groups/:group_id/tabs

Returns a paginated list of navigation tabs available in the current context.

Request Parameters:

Parameter Type Description
include[] string
“external”

Optionally include external tool tabs in the returned list of tabs (Only has effect for courses, not groups)

Allowed values: external

Example Request:

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/courses/<course_id>/tabs\?include\="external"

curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/groups/<group_id>/tabs"

Example Response:

[
  {
    "html_url": "/courses/1",
    "id": "home",
    "label": "Home",
    "position": 1,
    "visibility": "public",
    "type": "internal"
  },
  {
    "html_url": "/courses/1/external_tools/4",
    "id": "context_external_tool_4",
    "label": "WordPress",
    "hidden": true,
    "visibility": "public",
    "position": 2,
    "type": "external"
  },
  {
    "html_url": "/courses/1/grades",
    "id": "grades",
    "label": "Grades",
    "position": 3,
    "hidden": true
    "visibility": "admins"
    "type": "internal"
  }
]

Update a tab for a course TabsController#update

PUT /api/v1/courses/:course_id/tabs/:tab_id

Scope: url:PUT|/api/v1/courses/:course_id/tabs/:tab_id

Home and Settings tabs are not manageable, and can't be hidden or moved

Returns a tab object

Request Parameters:

Parameter Type Description
position integer

The new position of the tab, 1-based

hidden boolean

no description

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/tabs/tab_id \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'hidden=true' \
  -d 'position=2' // 1 based
Returns a Tab

List observees UserObserveesController#index

GET /api/v1/users/:user_id/observees

Scope: url:GET|/api/v1/users/:user_id/observees

A paginated list of the users that the given user is observing.

Note: all users are allowed to list their own observees. Administrators can list other users' observees.

The returned observees will include an attribute “observation_link_root_account_ids”, a list of ids for the root accounts the observer and observee are linked on. The observer will only be able to observe in courses associated with these root accounts.

Request Parameters:

Parameter Type Description
include[] string
  • “avatar_url”: Optionally include avatar_url.

Allowed values: avatar_url

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/observees \
     -X GET \
     -H 'Authorization: Bearer <token>'
Returns a list of Users

Add an observee with credentials UserObserveesController#create

POST /api/v1/users/:user_id/observees

Scope: url:POST|/api/v1/users/:user_id/observees

Register the given user to observe another user, given the observee's credentials.

Note: all users are allowed to add their own observees, given the observee's credentials or access token are provided. Administrators can add observees given credentials, access token or the observee's id.

Request Parameters:

Parameter Type Description
observee[unique_id] string

The login id for the user to observe. Required if access_token is omitted.

observee[password] string

The password for the user to observe. Required if access_token is omitted.

access_token string

The access token for the user to observe. Required if observee[unique_id] or observee[password] are omitted.

root_account_id integer

The ID for the root account to associate with the observation link. Defaults to the current domain account. If 'all' is specified, a link will be created for each root account associated to both the observer and observee.

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/observees \
     -X POST \
     -H 'Authorization: Bearer <token>' \
     -F 'observee[unique_id]=UNIQUE_ID' \
     -F 'observee[password]=PASSWORD'
Returns a User

Show an observee UserObserveesController#show

GET /api/v1/users/:user_id/observees/:observee_id

Scope: url:GET|/api/v1/users/:user_id/observees/:observee_id

Gets information about an observed user.

Note: all users are allowed to view their own observees.

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/observees/<observee_id> \
     -X GET \
     -H 'Authorization: Bearer <token>'
Returns a User

Add an observee UserObserveesController#update

PUT /api/v1/users/:user_id/observees/:observee_id

Scope: url:PUT|/api/v1/users/:user_id/observees/:observee_id

Registers a user as being observed by the given user.

Request Parameters:

Parameter Type Description
root_account_id integer

The ID for the root account to associate with the observation link. If not specified, a link will be created for each root account associated to both the observer and observee.

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/observees/<observee_id> \
     -X PUT \
     -H 'Authorization: Bearer <token>'
Returns a User

Remove an observee UserObserveesController#destroy

DELETE /api/v1/users/:user_id/observees/:observee_id

Scope: url:DELETE|/api/v1/users/:user_id/observees/:observee_id

Unregisters a user as being observed by the given user.

Request Parameters:

Parameter Type Description
root_account_id integer

If specified, only removes the link for the given root account

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/observees/<observee_id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'
Returns a User

List users in account UsersController#index

GET /api/v1/accounts/:account_id/users

Scope: url:GET|/api/v1/accounts/:account_id/users

A paginated list of of users associated with this account.

@example_request
  curl https://<canvas>/api/v1/accounts/self/users?search_term=<search value> \
     -X GET \
     -H 'Authorization: Bearer <token>'

Request Parameters:

Parameter Type Description
search_term string

The partial name or full ID of the users to match and return in the results list. Must be at least 3 characters.

Note that the API will prefer matching on canonical user ID if the ID has a numeric form. It will only search against other fields if non-numeric in form, or if the numeric value doesn't yield any matches. Queries by administrative users will search on SIS ID, login ID, name, or email address; non-administrative queries will only be compared against name.

sort string

The column to sort results by.

Allowed values: username, email, sis_id, last_login

order string

The order to sort the given column by.

Allowed values: asc, desc

Returns a list of Users

List the activity stream UsersController#activity_stream

GET /api/v1/users/self/activity_stream

Scope: url:GET|/api/v1/users/self/activity_stream

GET /api/v1/users/activity_stream

Scope: url:GET|/api/v1/users/activity_stream

Returns the current user's global activity stream, paginated.

There are many types of objects that can be returned in the activity stream. All object types have the same basic set of shared attributes:

{
  'created_at': '2011-07-13T09:12:00Z',
  'updated_at': '2011-07-25T08:52:41Z',
  'id': 1234,
  'title': 'Stream Item Subject',
  'message': 'This is the body text of the activity stream item. It is plain-text, and can be multiple paragraphs.',
  'type': 'DiscussionTopic|Conversation|Message|Submission|Conference|Collaboration|AssessmentRequest...',
  'read_state': false,
  'context_type': 'course', // course|group
  'course_id': 1,
  'group_id': null,
  'html_url': "http://..." // URL to the Canvas web UI for this stream item
}

In addition, each item type has its own set of attributes available.

DiscussionTopic:

{
  'type': 'DiscussionTopic',
  'discussion_topic_id': 1234,
  'total_root_discussion_entries': 5,
  'require_initial_post': true,
  'user_has_posted': true,
  'root_discussion_entries': {
    ...
  }
}

For DiscussionTopic, the message is truncated at 4kb.

Announcement:

{
  'type': 'Announcement',
  'announcement_id': 1234,
  'total_root_discussion_entries': 5,
  'require_initial_post': true,
  'user_has_posted': null,
  'root_discussion_entries': {
    ...
  }
}

For Announcement, the message is truncated at 4kb.

Conversation:

{
  'type': 'Conversation',
  'conversation_id': 1234,
  'private': false,
  'participant_count': 3,
}

Message:

{
  'type': 'Message',
  'message_id': 1234,
  'notification_category': 'Assignment Graded'
}

Submission:

Returns an Submission with its Course and Assignment data.

Conference:

{
  'type': 'Conference',
  'web_conference_id': 1234
}

Collaboration:

{
  'type': 'Collaboration',
  'collaboration_id': 1234
}

AssessmentRequest:

{
  'type': 'AssessmentRequest',
  'assessment_request_id': 1234
}

Activity stream summary UsersController#activity_stream_summary

GET /api/v1/users/self/activity_stream/summary

Scope: url:GET|/api/v1/users/self/activity_stream/summary

Returns a summary of the current user's global activity stream.

Example Response:

[
  {
    "type": "DiscussionTopic",
    "unread_count": 2,
    "count": 7
  },
  {
    "type": "Conversation",
    "unread_count": 0,
    "count": 3
  }
]

List the TODO items UsersController#todo_items

GET /api/v1/users/self/todo

Scope: url:GET|/api/v1/users/self/todo

A paginated list of the current user's list of todo items, as seen on the user dashboard.

There is a limit to the number of items returned.

The `ignore` and `ignore_permanently` URLs can be used to update the user's preferences on what items will be displayed. Performing a DELETE request against the `ignore` URL will hide that item from future todo item requests, until the item changes. Performing a DELETE request against the `ignore_permanently` URL will hide that item forever.

Request Parameters:

Parameter Type Description
include[] string
“ungraded_quizzes”

Optionally include ungraded quizzes (such as practice quizzes and surveys) in the list. These will be returned under a quiz key instead of an assignment key in response elements.

Allowed values: ungraded_quizzes

Example Response:

[
  {
    'type': 'grading',        // an assignment that needs grading
    'assignment': { .. assignment object .. },
    'ignore': '.. url ..',
    'ignore_permanently': '.. url ..',
    'html_url': '.. url ..',
    'needs_grading_count': 3, // number of submissions that need grading
    'context_type': 'course', // course|group
    'course_id': 1,
    'group_id': null,
  },
  {
    'type' => 'submitting',   // an assignment that needs submitting soon
    'assignment' => { .. assignment object .. },
    'ignore' => '.. url ..',
    'ignore_permanently' => '.. url ..',
    'html_url': '.. url ..',
    'context_type': 'course',
    'course_id': 1,
  },
  {
    'type' => 'submitting',   // a quiz that needs submitting soon
    'quiz' => { .. quiz object .. },
    'ignore' => '.. url ..',
    'ignore_permanently' => '.. url ..',
    'html_url': '.. url ..',
    'context_type': 'course',
    'course_id': 1,
  },
]

List counts for todo items UsersController#todo_item_count

GET /api/v1/users/self/todo_item_count

Scope: url:GET|/api/v1/users/self/todo_item_count

Counts of different todo items such as the number of assignments needing grading as well as the number of assignments needing submitting.

There is a limit to the number of todo items this endpoint will count. It will only look at the first 100 todo items for the user. If the user has more than 100 todo items this count may not be reliable. The largest reliable number for both counts is 100.

Request Parameters:

Parameter Type Description
include[] string
“ungraded_quizzes”

Optionally include ungraded quizzes (such as practice quizzes and surveys) in the list. These will be returned under a quiz key instead of an assignment key in response elements.

Allowed values: ungraded_quizzes

Example Response:

{
  needs_grading_count: 32,
  assignments_needing_submitting: 10
}

List upcoming assignments, calendar events UsersController#upcoming_events

GET /api/v1/users/self/upcoming_events

Scope: url:GET|/api/v1/users/self/upcoming_events

A paginated list of the current user's upcoming events, i.e. the same things shown in the dashboard 'Coming Up' sidebar.

Example Response:

[
  {
    "id"=>597,
    "title"=>"Upcoming Course Event",
    "description"=>"Attendance is correlated with passing!",
    "start_at"=>"2013-04-27T14:33:14Z",
    "end_at"=>"2013-04-27T14:33:14Z",
    "location_name"=>"Red brick house",
    "location_address"=>"110 Top of the Hill Dr.",
    "all_day"=>false,
    "all_day_date"=>nil,
    "created_at"=>"2013-04-26T14:33:14Z",
    "updated_at"=>"2013-04-26T14:33:14Z",
    "workflow_state"=>"active",
    "context_code"=>"course_12938",
    "child_events_count"=>0,
    "child_events"=>[],
    "parent_event_id"=>nil,
    "hidden"=>false,
    "url"=>"http://www.example.com/api/v1/calendar_events/597",
    "html_url"=>"http://www.example.com/calendar?event_id=597&include_contexts=course_12938"
  },
  {
    "id"=>"assignment_9729",
    "title"=>"Upcoming Assignment",
    "description"=>nil,
    "start_at"=>"2013-04-28T14:47:32Z",
    "end_at"=>"2013-04-28T14:47:32Z",
    "all_day"=>false,
    "all_day_date"=>"2013-04-28",
    "created_at"=>"2013-04-26T14:47:32Z",
    "updated_at"=>"2013-04-26T14:47:32Z",
    "workflow_state"=>"published",
    "context_code"=>"course_12942",
    "assignment"=>{
      "id"=>9729,
      "name"=>"Upcoming Assignment",
      "description"=>nil,
      "points_possible"=>10,
      "due_at"=>"2013-04-28T14:47:32Z",
      "assignment_group_id"=>2439,
      "automatic_peer_reviews"=>false,
      "grade_group_students_individually"=>nil,
      "grading_standard_id"=>nil,
      "grading_type"=>"points",
      "group_category_id"=>nil,
      "lock_at"=>nil,
      "peer_reviews"=>false,
      "position"=>1,
      "unlock_at"=>nil,
      "course_id"=>12942,
      "submission_types"=>["none"],
      "muted"=>false,
      "needs_grading_count"=>0,
      "html_url"=>"http://www.example.com/courses/12942/assignments/9729"
    },
    "url"=>"http://www.example.com/api/v1/calendar_events/assignment_9729",
    "html_url"=>"http://www.example.com/courses/12942/assignments/9729"
  }
]

List Missing Submissions UsersController#missing_submissions

GET /api/v1/users/:user_id/missing_submissions

Scope: url:GET|/api/v1/users/:user_id/missing_submissions

A paginated list of past-due assignments for which the student does not have a submission. The user sending the request must either be an admin or a parent observer using the parent app

Request Parameters:

Parameter Type Description
user_id string

the student's ID

include[] string
“planner_overrides”

Optionally include the assignment's associated planner override, if it exists, for the current user. These will be returned under a planner_override key

“course”

Optionally include the assignments' courses

Allowed values: planner_overrides, course

Returns a list of Assignments

Hide a stream item UsersController#ignore_stream_item

DELETE /api/v1/users/self/activity_stream/:id

Scope: url:DELETE|/api/v1/users/self/activity_stream/:id

Hide the given stream item.

Example Request:

curl https://<canvas>/api/v1/users/self/activity_stream/<stream_item_id> \
   -X DELETE \
   -H 'Authorization: Bearer <token>'

Example Response:

{
  "hidden": true
}

Hide all stream items UsersController#ignore_all_stream_items

DELETE /api/v1/users/self/activity_stream

Scope: url:DELETE|/api/v1/users/self/activity_stream

Hide all stream items for the user

Example Request:

curl https://<canvas>/api/v1/users/self/activity_stream \
   -X DELETE \
   -H 'Authorization: Bearer <token>'

Example Response:

{
  "hidden": true
}

Upload a file UsersController#create_file

POST /api/v1/users/:user_id/files

Scope: url:POST|/api/v1/users/:user_id/files

Upload a file to the user's personal files section.

This API endpoint is the first step in uploading a file to a user's files. See the File Upload Documentation for details on the file upload workflow.

Note that typically users will only be able to upload files to their own files section. Passing a user_id of self is an easy shortcut to specify the current user.

Show user details UsersController#api_show

GET /api/v1/users/:id

Scope: url:GET|/api/v1/users/:id

Shows details for user.

Also includes an attribute “permissions”, a non-comprehensive list of permissions for the user. Example:

"permissions": {
 "can_update_name": true, // Whether the user can update their name.
 "can_update_avatar": false // Whether the user can update their avatar.
}

Example Request:

curl https://<canvas>/api/v1/users/self \
    -X GET \
    -H 'Authorization: Bearer <token>'
Returns a User

Create a user UsersController#create

POST /api/v1/accounts/:account_id/users

Scope: url:POST|/api/v1/accounts/:account_id/users

Create and return a new user and pseudonym for an account.

If you don't have the “Modify login details for users” permission, but self-registration is enabled on the account, you can still use this endpoint to register new users. Certain fields will be required, and others will be ignored (see below).

Request Parameters:

Parameter Type Description
user[name] string

The full name of the user. This name will be used by teacher for grading. Required if this is a self-registration.

user[short_name] string

User's name as it will be displayed in discussions, messages, and comments.

user[sortable_name] string

User's name as used to sort alphabetically in lists.

user[time_zone] string

The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

user[locale] string

The user's preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.

user[birthdate] Date

The user's birth date.

user[terms_of_use] boolean

Whether the user accepts the terms of use. Required if this is a self-registration and this canvas instance requires users to accept the terms (on by default).

If this is true, it will mark the user as having accepted the terms of use.

user[skip_registration] boolean

Automatically mark the user as registered.

If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. Otherwise, the user will not receive any messages about their account creation.

The users communication channel confirmation can be skipped by setting "communication_channel[skip_confirmation]" to true as well.

pseudonym[unique_id] Required string

User's login ID. If this is a self-registration, it must be a valid email address.

pseudonym[password] string

User's password. Cannot be set during self-registration.

pseudonym[sis_user_id] string

SIS ID for the user's account. To set this parameter, the caller must be able to manage SIS permissions.

pseudonym[integration_id] string

Integration ID for the login. To set this parameter, the caller must be able to manage SIS permissions. The Integration ID is a secondary identifier useful for more complex SIS integrations.

pseudonym[send_confirmation] boolean

Send user notification of account creation if true. Automatically set to true during self-registration.

pseudonym[force_self_registration] boolean

Send user a self-registration style email if true. Setting it means the users will get a notification asking them to “complete the registration process” by clicking it, setting a password, and letting them in. Will only be executed on if the user does not need admin approval. Defaults to false unless explicitly provided.

pseudonym[authentication_provider_id] string

The authentication provider this login is associated with. Logins associated with a specific provider can only be used with that provider. Legacy providers (LDAP, CAS, SAML) will search for logins associated with them, or unassociated logins. New providers will only search for logins explicitly associated with them. This can be the integer ID of the provider, or the type of the provider (in which case, it will find the first matching provider).

communication_channel[type] string

The communication channel type, e.g. 'email' or 'sms'.

communication_channel[address] string

The communication channel address, e.g. the user's email address.

communication_channel[confirmation_url] boolean

Only valid for account admins. If true, returns the new user account confirmation URL in the response.

communication_channel[skip_confirmation] boolean

Only valid for site admins and account admins making requests; If true, the channel is automatically validated and no confirmation email or SMS is sent. Otherwise, the user must respond to a confirmation message to confirm the channel.

If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. Otherwise, the user will not receive any messages about their account creation.

force_validations boolean

If true, validations are performed on the newly created user (and their associated pseudonym) even if the request is made by a privileged user like an admin. When set to false, or not included in the request parameters, any newly created users are subject to validations unless the request is made by a user with a 'manage_user_logins' right. In which case, certain validations such as 'require_acceptance_of_terms' and 'require_presence_of_name' are not enforced. Use this parameter to return helpful json errors while building users with an admin request.

enable_sis_reactivation boolean

When true, will first try to re-activate a deleted user with matching sis_user_id if possible.

destination URL

If you're setting the password for the newly created user, you can provide this param with a valid URL pointing into this Canvas installation, and the response will include a destination field that's a URL that you can redirect a browser to and have the newly created user automatically logged in. The URL is only valid for a short time, and must match the domain this request is directed to, and be for a well-formed path that Canvas can recognize.

Returns a User

Self register a user UsersController#create_self_registered_user

POST /api/v1/accounts/:account_id/self_registration

Scope: url:POST|/api/v1/accounts/:account_id/self_registration

Self register and return a new user and pseudonym for an account.

If self-registration is enabled on the account, you can use this endpoint to self register new users.

Request Parameters:

Parameter Type Description
user[name] Required string

The full name of the user. This name will be used by teacher for grading.

user[short_name] string

User's name as it will be displayed in discussions, messages, and comments.

user[sortable_name] string

User's name as used to sort alphabetically in lists.

user[time_zone] string

The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

user[locale] string

The user's preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.

user[birthdate] Date

The user's birth date.

user[terms_of_use] Required boolean

Whether the user accepts the terms of use.

pseudonym[unique_id] Required string

User's login ID. Must be a valid email address.

communication_channel[type] string

The communication channel type, e.g. 'email' or 'sms'.

communication_channel[address] string

The communication channel address, e.g. the user's email address.

Returns a User

Update user settings. UsersController#settings

GET /api/v1/users/:id/settings

Scope: url:GET|/api/v1/users/:id/settings

PUT /api/v1/users/:id/settings

Scope: url:PUT|/api/v1/users/:id/settings

Update an existing user's settings.

Request Parameters:

Parameter Type Description
manual_mark_as_read boolean

If true, require user to manually mark discussion posts as read (don't auto-mark as read).

collapse_global_nav boolean

If true, the user's page loads with the global navigation collapsed

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/settings \
  -X PUT \
  -F 'manual_mark_as_read=true'
  -H 'Authorization: Bearer <token>'

Get custom colors UsersController#get_custom_colors

GET /api/v1/users/:id/colors

Scope: url:GET|/api/v1/users/:id/colors

Returns all custom colors that have been saved for a user.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/colors/ \
  -X GET \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "custom_colors": {
    "course_42": "#abc123",
    "course_88": "#123abc"
  }
}

Get custom color UsersController#get_custom_color

GET /api/v1/users/:id/colors/:asset_string

Scope: url:GET|/api/v1/users/:id/colors/:asset_string

Returns the custom colors that have been saved for a user for a given context.

The asset_string parameter should be in the format 'context_id', for example 'course_42'.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/colors/<asset_string> \
  -X GET \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "hexcode": "#abc123"
}

Update custom color UsersController#set_custom_color

PUT /api/v1/users/:id/colors/:asset_string

Scope: url:PUT|/api/v1/users/:id/colors/:asset_string

Updates a custom color for a user for a given context. This allows colors for the calendar and elsewhere to be customized on a user basis.

The asset string parameter should be in the format 'context_id', for example 'course_42'

Request Parameters:

Parameter Type Description
hexcode string

The hexcode of the color to set for the context, if you choose to pass the hexcode as a query parameter rather than in the request body you should NOT include the '#' unless you escape it first.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/colors/<asset_string> \
  -X PUT \
  -F 'hexcode=fffeee'
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "hexcode": "#abc123"
}

Get dashboard positions UsersController#get_dashboard_positions

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/users/:id/dashboard_positions

Scope: url:GET|/api/v1/users/:id/dashboard_positions

Returns all dashboard positions that have been saved for a user.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/dashboard_positions/ \
  -X GET \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "dashboard_positions": {
    "course_42": 2,
    "course_88": 1
  }
}

Update dashboard positions UsersController#set_dashboard_positions

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

PUT /api/v1/users/:id/dashboard_positions

Scope: url:PUT|/api/v1/users/:id/dashboard_positions

Updates the dashboard positions for a user for a given context. This allows positions for the dashboard cards and elsewhere to be customized on a per user basis.

The asset string parameter should be in the format 'context_id', for example 'course_42'

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/dashboard_positions/ \
  -X PUT \
  -F 'dashboard_positions[course_42]=1' \
  -F 'dashboard_positions[course_53]=2' \
  -F 'dashboard_positions[course_10]=3' \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "dashboard_positions": {
    "course_10": 3,
    "course_42": 1,
    "course_53": 2
  }
}

Edit a user UsersController#update

PUT /api/v1/users/:id

Scope: url:PUT|/api/v1/users/:id

Modify an existing user. To modify a user's login, see the documentation for logins.

Request Parameters:

Parameter Type Description
user[name] string

The full name of the user. This name will be used by teacher for grading.

user[short_name] string

User's name as it will be displayed in discussions, messages, and comments.

user[sortable_name] string

User's name as used to sort alphabetically in lists.

user[time_zone] string

The time zone for the user. Allowed time zones are IANA time zones or friendlier Ruby on Rails time zones.

user[email] string

The default email address of the user.

user[locale] string

The user's preferred language, from the list of languages Canvas supports. This is in RFC-5646 format.

user[avatar][token] string

A unique representation of the avatar record to assign as the user's current avatar. This token can be obtained from the user avatars endpoint. This supersedes the user [avatar] [url] argument, and if both are included the url will be ignored. Note: this is an internal representation and is subject to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client.

user[avatar][url] string

To set the user's avatar to point to an external url, do not include a token and instead pass the url here. Warning: For maximum compatibility, please use 128 px square images.

Example Request:

curl 'https://<canvas>/api/v1/users/133.json' \
     -X PUT \
     -F 'user[name]=Sheldon Cooper' \
     -F 'user[short_name]=Shelly' \
     -F 'user[time_zone]=Pacific Time (US & Canada)' \
     -F 'user[avatar][token]=<opaque_token>' \
     -H "Authorization: Bearer <token>"
Returns a User

Merge user into another user UsersController#merge_into

PUT /api/v1/users/:id/merge_into/:destination_user_id

Scope: url:PUT|/api/v1/users/:id/merge_into/:destination_user_id

PUT /api/v1/users/:id/merge_into/accounts/:destination_account_id/users/:destination_user_id

Scope: url:PUT|/api/v1/users/:id/merge_into/accounts/:destination_account_id/users/:destination_user_id

Merge a user into another user. To merge users, the caller must have permissions to manage both users. This should be considered irreversible. This will delete the user and move all the data into the destination user.

When finding users by SIS ids in different accounts the destination_account_id is required.

The account can also be identified by passing the domain in destination_account_id.

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/merge_into/<destination_user_id> \
     -X PUT \
     -H 'Authorization: Bearer <token>'

curl https://<canvas>/api/v1/users/<user_id>/merge_into/accounts/<destination_account_id>/users/<destination_user_id> \
     -X PUT \
     -H 'Authorization: Bearer <token>'
Returns a User

Split merged users into separate users UsersController#split

POST /api/v1/users/:id/split

Scope: url:POST|/api/v1/users/:id/split

Merged users cannot be fully restored to their previous state, but this will attempt to split as much as possible to the previous state. To split a merged user, the caller must have permissions to manage all of the users logins. If there are multiple users that have been merged into one user it will split each merge into a separate user. A split can only happen within 180 days of a user merge. A user merge deletes the previous user and may be permanently deleted. In this scenario we create a new user object and proceed to move as much as possible to the new user. The user object will not have preserved the name or settings from the previous user. Some items may have been deleted during a user_merge that cannot be restored, and/or the data has become stale because of other changes to the objects since the time of the user_merge.

Example Request:

curl https://<canvas>/api/v1/users/<user_id>/split \
     -X POST \
     -H 'Authorization: Bearer <token>'
Returns a list of Users

Get a Pandata Events jwt token and its expiration date UsersController#pandata_events_token

POST /api/v1/users/self/pandata_events_token

Scope: url:POST|/api/v1/users/self/pandata_events_token

Returns a jwt auth and props token that can be used to send events to Pandata.

NOTE: This is currently only available to the mobile developer keys.

Request Parameters:

Parameter Type Description
app_key string

The pandata events appKey for this mobile app

Example Request:

curl https://<canvas>/api/v1/users/self/pandata_events_token \
     -X POST \
     -H 'Authorization: Bearer <token>'
     -F 'app_key=MOBILE_APPS_KEY' \

Example Response:

{
  "url": "https://example.com/pandata/events"
  "auth_token": "wek23klsdnsoieioeoi3of9deeo8r8eo8fdn",
  "props_token": "paowinefopwienpfiownepfiownepfownef",
  "expires_at": 1521667783000,
}

Get user profile ProfileController#settings

GET /api/v1/users/:user_id/profile

Scope: url:GET|/api/v1/users/:user_id/profile

Returns user profile data, including user id, name, and profile pic.

When requesting the profile for the user accessing the API, the user's calendar feed URL and LTI user id will be returned as well.

Returns a Profile

List avatar options ProfileController#profile_pics

GET /api/v1/users/:user_id/avatars

Scope: url:GET|/api/v1/users/:user_id/avatars

A paginated list of the possible user avatar options that can be set with the user update endpoint. The response will be an array of avatar records. If the 'type' field is 'attachment', the record will include all the normal attachment json fields; otherwise it will include only the 'url' and 'display_name' fields. Additionally, all records will include a 'type' field and a 'token' field. The following explains each field in more detail

type
“gravatar”|“attachment”|“no_pic”

The type of avatar record, for categorization purposes.

url

The url of the avatar

token

A unique representation of the avatar record which can be used to set the avatar with the user update endpoint. Note: this is an internal representation and is subject to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client.

display_name

A textual description of the avatar record

id
'attachment' type only

the internal id of the attachment

content-type
'attachment' type only

the content-type of the attachment

filename
'attachment' type only

the filename of the attachment

size
'attachment' type only

the size of the attachment

Example Request:

curl 'https://<canvas>/api/v1/users/1/avatars.json' \
     -H "Authorization: Bearer <token>"

Example Response:

[
  {
    "type":"gravatar",
    "url":"https://secure.gravatar.com/avatar/2284...",
    "token":<opaque_token>,
    "display_name":"gravatar pic"
  },
  {
    "type":"attachment",
    "url":<url to fetch thumbnail of attachment>,
    "token":<opaque_token>,
    "display_name":"profile.jpg",
    "id":12,
    "content-type":"image/jpeg",
    "filename":"profile.jpg",
    "size":32649
  },
  {
    "type":"no_pic",
    "url":"https://<canvas>/images/dotted_pic.png",
    "token":<opaque_token>,
    "display_name":"no pic"
  }
]
Returns a list of Avatars

List user page views PageViewsController#index

GET /api/v1/users/:user_id/page_views

Scope: url:GET|/api/v1/users/:user_id/page_views

Return a paginated list of the user's page view history in json format, similar to the available CSV download. Page views are returned in descending order, newest to oldest.

Request Parameters:

Parameter Type Description
start_time DateTime

The beginning of the time range from which you want page views.

end_time DateTime

The end of the time range from which you want page views.

Returns a list of PageViews

Store custom data CustomDataController#set_data

PUT /api/v1/users/:user_id/custom_data(/*scope)

Scope: url:PUT|/api/v1/users/:user_id/custom_data(/*scope)

Store arbitrary user data as JSON.

Arbitrary JSON data can be stored for a User. A typical scenario would be an external site/service that registers users in Canvas and wants to capture additional info about them. The part of the URL that follows /custom_data/ defines the scope of the request, and it reflects the structure of the JSON data to be stored or retrieved.

The value self may be used for user_id to store data associated with the calling user. In order to access another user's custom data, you must be an account administrator with permission to manage users.

A namespace parameter, ns, is used to prevent custom_data collisions between different apps. This parameter is required for all custom_data requests.

A request with Content-Type multipart/form-data or Content-Type application/x-www-form-urlencoded can only be used to store strings.

Example PUT with multipart/form-data data:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/telephone' \
  -X PUT \
  -F 'ns=com.my-organization.canvas-app' \
  -F 'data=555-1234' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": "555-1234"
}

Subscopes (or, generated scopes) can also be specified by passing values to data[subscope].

Example PUT specifying subscopes:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/body/measurements' \
  -X PUT \
  -F 'ns=com.my-organization.canvas-app' \
  -F 'data[waist]=32in' \
  -F 'data[inseam]=34in' \
  -F 'data[chest]=40in' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": {
    "chest": "40in",
    "waist": "32in",
    "inseam": "34in"
  }
}

Following such a request, subsets of the stored data to be retrieved directly from a subscope.

Example GET from a generated scope

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/body/measurements/chest' \
  -X GET \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": "40in"
}

If you want to store more than just strings (i.e. numbers, arrays, hashes, true, false, and/or null), you must make a request with Content-Type application/json as in the following example.

Example PUT with JSON data:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data' \
  -H 'Content-Type: application/json' \
  -X PUT \
  -d '{
        "ns": "com.my-organization.canvas-app",
        "data": {
          "a-number": 6.02e23,
          "a-bool": true,
          "a-string": "true",
          "a-hash": {"a": {"b": "ohai"}},
          "an-array": [1, "two", null, false]
        }
      }' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": {
    "a-number": 6.02e+23,
    "a-bool": true,
    "a-string": "true",
    "a-hash": {
      "a": {
        "b": "ohai"
      }
    },
    "an-array": [1, "two", null, false]
  }
}

If the data is an Object (as it is in the above example), then subsets of the data can be accessed by including the object's (possibly nested) keys in the scope of a GET request.

Example GET with a generated scope:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/a-hash/a/b' \
  -X GET \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": "ohai"
}

On success, this endpoint returns an object containing the data that was stored.

Responds with status code 200 if the scope already contained data, and it was overwritten by the data specified in the request.

Responds with status code 201 if the scope was previously empty, and the data specified in the request was successfully stored there.

Responds with status code 400 if the namespace parameter, ns, is missing or invalid, or if the data parameter is missing.

Responds with status code 409 if the requested scope caused a conflict and data was not stored. This happens when storing data at the requested scope would cause data at an outer scope to be lost. e.g., if /custom_data was {“fashion_app”: {“hair”: “blonde”}}, but you tried to `PUT /custom_data/fashion_app/hair/style -F data=buzz`, then for the request to succeed,the value of /custom_data/fashion_app/hair would have to become a hash, and its old string value would be lost. In this situation, an error object is returned with the following format:

{
  "message": "write conflict for custom_data hash",
  "conflict_scope": "fashion_app/hair",
  "type_at_conflict": "String",
  "value_at_conflict": "blonde"
}

Request Parameters:

Parameter Type Description
ns Required string

The namespace under which to store the data. This should be something other Canvas API apps aren't likely to use, such as a reverse DNS for your organization.

data Required JSON

The data you want to store for the user, at the specified scope. If the data is composed of (possibly nested) JSON objects, scopes will be generated for the (nested) keys (see examples).

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/food_app' \
  -X PUT \
  -F 'ns=com.my-organization.canvas-app' \
  -F 'data[weight]=81kg' \
  -F 'data[favorites][meat]=pork belly' \
  -F 'data[favorites][dessert]=pistachio ice cream' \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "data": {
    "weight": "81kg",
    "favorites": {
      "meat": "pork belly",
      "dessert": "pistachio ice cream"
    }
  }
}

Load custom data CustomDataController#get_data

GET /api/v1/users/:user_id/custom_data(/*scope)

Scope: url:GET|/api/v1/users/:user_id/custom_data(/*scope)

Load custom user data.

Arbitrary JSON data can be stored for a User. This API call retrieves that data for a (optional) given scope. See Store Custom Data for details and examples.

On success, this endpoint returns an object containing the data that was requested.

Responds with status code 400 if the namespace parameter, ns, is missing or invalid, or if the specified scope does not contain any data.

Request Parameters:

Parameter Type Description
ns Required string

The namespace from which to retrieve the data. This should be something other Canvas API apps aren't likely to use, such as a reverse DNS for your organization.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/food_app/favorites/dessert' \
  -X GET \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Example Response:

{
  "data": "pistachio ice cream"
}

Delete custom data CustomDataController#delete_data

DELETE /api/v1/users/:user_id/custom_data(/*scope)

Scope: url:DELETE|/api/v1/users/:user_id/custom_data(/*scope)

Delete custom user data.

Arbitrary JSON data can be stored for a User. This API call deletes that data for a given scope. Without a scope, all custom_data is deleted. See Store Custom Data for details and examples of storage and retrieval.

As an example, we'll store some data, then delete a subset of it.

Example PUT with valid JSON data:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data' \
  -X PUT \
  -F 'ns=com.my-organization.canvas-app' \
  -F 'data[fruit][apple]=so tasty' \
  -F 'data[fruit][kiwi]=a bit sour' \
  -F 'data[veggies][root][onion]=tear-jerking' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": {
    "fruit": {
      "apple": "so tasty",
      "kiwi": "a bit sour"
    },
    "veggies": {
      "root": {
        "onion": "tear-jerking"
      }
    }
  }
}

Example DELETE:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/fruit/kiwi' \
  -X DELETE \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": "a bit sour"
}

Example GET following the above DELETE:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data' \
  -X GET \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": {
    "fruit": {
      "apple": "so tasty"
    },
    "veggies": {
      "root": {
        "onion": "tear-jerking"
      }
    }
  }
}

Note that hashes left empty after a DELETE will get removed from the custom_data store. For example, following the previous commands, if we delete /custom_data/veggies/root/onion, then the entire /custom_data/veggies scope will be removed.

Example DELETE that empties a parent scope:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/veggies/root/onion' \
  -X DELETE \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": "tear-jerking"
}

Example GET following the above DELETE:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data' \
  -X GET \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Response:

{
  "data": {
    "fruit": {
      "apple": "so tasty"
    }
  }
}

On success, this endpoint returns an object containing the data that was deleted.

Responds with status code 400 if the namespace parameter, ns, is missing or invalid, or if the specified scope does not contain any data.

Request Parameters:

Parameter Type Description
ns Required string

The namespace from which to delete the data. This should be something other Canvas API apps aren't likely to use, such as a reverse DNS for your organization.

Example Request:

curl 'https://<canvas>/api/v1/users/<user_id>/custom_data/fruit/kiwi' \
  -X DELETE \
  -F 'ns=com.my-organization.canvas-app' \
  -H 'Authorization: Bearer <token>'

Example Response:

!!!javascript
{
  "data": "a bit sour"
}

List course nicknames CourseNicknamesController#index

GET /api/v1/users/self/course_nicknames

Scope: url:GET|/api/v1/users/self/course_nicknames

Returns all course nicknames you have set.

Example Request:

curl 'https://<canvas>/api/v1/users/self/course_nicknames \
  -H 'Authorization: Bearer <token>'
Returns a list of CourseNicknames

Get course nickname CourseNicknamesController#show

GET /api/v1/users/self/course_nicknames/:course_id

Scope: url:GET|/api/v1/users/self/course_nicknames/:course_id

Returns the nickname for a specific course.

Example Request:

curl 'https://<canvas>/api/v1/users/self/course_nicknames/<course_id> \
  -H 'Authorization: Bearer <token>'
Returns a CourseNickname

Set course nickname CourseNicknamesController#update

PUT /api/v1/users/self/course_nicknames/:course_id

Scope: url:PUT|/api/v1/users/self/course_nicknames/:course_id

Set a nickname for the given course. This will replace the course's name in output of API calls you make subsequently, as well as in selected places in the Canvas web user interface.

Request Parameters:

Parameter Type Description
nickname Required string

The nickname to set. It must be non-empty and shorter than 60 characters.

Example Request:

curl 'https://<canvas>/api/v1/users/self/course_nicknames/<course_id> \
  -X PUT \
  -F 'nickname=Physics' \
  -H 'Authorization: Bearer <token>'
Returns a CourseNickname

Remove course nickname CourseNicknamesController#delete

DELETE /api/v1/users/self/course_nicknames/:course_id

Scope: url:DELETE|/api/v1/users/self/course_nicknames/:course_id

Remove the nickname for the given course. Subsequent course API calls will return the actual name for the course.

Example Request:

curl 'https://<canvas>/api/v1/users/self/course_nicknames/<course_id> \
  -X DELETE \
  -H 'Authorization: Bearer <token>'
Returns a CourseNickname

Clear course nicknames CourseNicknamesController#clear

DELETE /api/v1/users/self/course_nicknames

Scope: url:DELETE|/api/v1/users/self/course_nicknames

Remove all stored course nicknames.

Example Request:

curl 'https://<canvas>/api/v1/users/self/course_nicknames \
  -X DELETE \
  -H 'Authorization: Bearer <token>'

Create a Webhook Subscription Lti::SubscriptionsApiController#create

POST /api/lti/subscriptions

Scope: url:POST|/api/lti/subscriptions

Creates a webook subscription for the specified event type and context.

Request Parameters:

Parameter Type Description
submission[ContextId] Required string

The id of the context for the subscription.

subscription[ContextType] Required string

The type of context for the subscription. Must be 'assignment', 'account', or 'course'.

subscription[EventTypes] Required Array

Array of strings representing the event types for the subscription.

subscription[Format] Required string

Format to deliver the live events. Must be 'live-event' or 'caliper'.

subscription[TransportMetadata] Required Object

An object with a single key: 'Url'. Example: { “Url”: “sqs.example” }

subscription[TransportType] Required string

Must be either 'sqs' or 'https'.

Delete a Webhook Subscription Lti::SubscriptionsApiController#destroy

DELETE /api/lti/subscriptions/:id

Scope: url:DELETE|/api/lti/subscriptions/:id

Show a single Webhook Subscription Lti::SubscriptionsApiController#show

GET /api/lti/subscriptions/:id

Scope: url:GET|/api/lti/subscriptions/:id

Update a Webhook Subscription Lti::SubscriptionsApiController#update

PUT /api/lti/subscriptions/:id

Scope: url:PUT|/api/lti/subscriptions/:id

This endpoint uses the same parameters as the create endpoint

List all Webhook Subscription for a tool proxy Lti::SubscriptionsApiController#index

GET /api/lti/subscriptions

Scope: url:GET|/api/lti/subscriptions

This endpoint returns a paginated list with a default limit of 100 items per result set. You can retrieve the next result set by setting a 'StartKey' header in your next request with the value of the 'EndKey' header in the response.

Example use of a 'StartKey' header object:

{ "Id":"71d6dfba-0547-477d-b41d-db8cb528c6d1","DeveloperKey":"10000000000001" }

List courses with their latest ePub export EpubExportsController#index

GET /api/v1/epub_exports

Scope: url:GET|/api/v1/epub_exports

A paginated list of all courses a user is actively participating in, and the latest ePub export associated with the user & course.

Returns a list of CourseEpubExports

Create ePub Export EpubExportsController#create

POST /api/v1/courses/:course_id/epub_exports

Scope: url:POST|/api/v1/courses/:course_id/epub_exports

Begin an ePub export for a course.

You can use the Progress API to track the progress of the export. The export's progress is linked to with the progress_url value.

When the export completes, use the Show content export endpoint to retrieve a download URL for the exported content.

Returns a EpubExport

Show ePub export EpubExportsController#show

GET /api/v1/courses/:course_id/epub_exports/:id

Scope: url:GET|/api/v1/courses/:course_id/epub_exports/:id

Get information about a single ePub export.

Returns a EpubExport