canvas.courses.update-course
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" If an account has set prevent_course_availability_editing_by_teachers, a teacher cannot change +course[start_at]+, +course[conclude_at]+, or +course[restrict_enrollments_to_course_dates]+ here.
Update a course
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-canvas |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | Yes | — | Canvas API root, e.g. https://<host>/api |
api_token | string | No | — | Bearer token; omit to use the workflow's token env var |
id | string | Yes | — | ID |
course_account_id | integer | No | — | The unique ID of the account to move the course to. |
course_name | string | No | — | The name of the course. If omitted, the course will be named "Unnamed Course." |
course_course_code | string | No | — | The course code for the course. |
course_start_at | string | No | — | Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true, or the course is already published. |
course_end_at | string | No | — | Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true. |
course_license | string | No | — | 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 | No | — | Set to true if course is public to both authenticated and unauthenticated users. |
course_is_public_to_auth_users | boolean | No | — | Set to true if course is public only to authenticated users. |
course_public_syllabus | boolean | No | — | Set to true to make the course syllabus public. |
course_public_syllabus_to_auth | boolean | No | — | Set to true to make the course syllabus to public for authenticated users. |
course_public_description | string | No | — | A publicly visible description of the course. |
course_allow_student_wiki_edits | boolean | No | — | If true, students will be able to modify the course wiki. |
course_allow_wiki_comments | boolean | No | — | If true, course members will be able to comment on wiki pages. |
course_allow_student_forum_attachments | boolean | No | — | If true, students can attach files to forum posts. |
course_open_enrollment | boolean | No | — | Set to true if the course is open enrollment. |
course_self_enrollment | boolean | No | — | Set to true if the course is self enrollment. |
course_restrict_enrollments_to_course_dates | boolean | No | — | Set to true to restrict user enrollments to the start and end dates of the course. Setting this value to false will remove the course end date (if it exists), as well as the course start date (if the course is unpublished). |
course_term_id | integer | No | — | The unique ID of the term to create to course in. |
course_sis_course_id | string | No | — | The unique SIS identifier. |
course_integration_id | string | No | — | The unique Integration identifier. |
course_hide_final_grades | boolean | No | — | If this option is set to true, the totals in student grades summary will be hidden. |
course_time_zone | string | No | — | The time zone for the course. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. |
course_apply_assignment_group_weights | boolean | No | — | Set to true to weight final grade based on assignment groups percentages. |
course_storage_quota_mb | integer | No | — | Set the storage quota for the course, in megabytes. The caller must have the "Manage storage quotas" account permission. |
offer | boolean | No | — | If this option is set to true, the course will be available to students immediately. |
course_event | string | No | — | 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. This action requires account administrative rights. (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. |
course_default_view | string | No | — | 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 |
course_syllabus_body | string | No | — | The syllabus body for the course |
course_syllabus_course_summary | boolean | No | — | Optional. Indicates whether the Course Summary (consisting of the course's assignments and calendar events) is displayed on the syllabus page. Defaults to +true+. |
course_grading_standard_id | integer | No | — | 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_grade_passback_setting | string | No | — | Optional. The grade_passback_setting for the course. Only 'nightly_sync' and '' are allowed |
course_course_format | string | No | — | Optional. Specifies the format of the course. (Should be either 'on_campus' or 'online') |
course_image_id | integer | No | — | 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 | No | — | 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 | No | — | If this option is set to true, the course image url and course image ID are both set to nil |
course_remove_banner_image | boolean | No | — | If this option is set to true, the course banner image url and course banner image ID are both set to nil |
course_blueprint | boolean | No | — | Sets the course as a blueprint course. |
course_blueprint_restrictions | json | No | — | Sets a default set to apply to blueprint course objects when restricted, unless use_blueprint_restrictions_by_object_type is enabled. See the {api:Blueprint_Courses:BlueprintRestriction Blueprint Restriction} documentation |
course_use_blueprint_restrictions_by_object_type | boolean | No | — | 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 | json | No | — | Allows setting multiple {api:Blueprint_Courses:BlueprintRestriction 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 |
course_homeroom_course | boolean | No | — | Sets the course as a homeroom course. The setting takes effect only when the course is associated with a Canvas for Elementary-enabled account. |
course_sync_enrollments_from_homeroom | string | No | — | Syncs enrollments from the homeroom that is set in homeroom_course_id. The setting only takes effect when the course is associated with a Canvas for Elementary-enabled account and sync_enrollments_from_homeroom is enabled. |
course_homeroom_course_id | string | No | — | Sets the Homeroom Course id to be used with sync_enrollments_from_homeroom. The setting only takes effect when the course is associated with a Canvas for Elementary-enabled account and sync_enrollments_from_homeroom is enabled. |
course_template | boolean | No | — | Enable or disable the course as a template that can be selected by an account |
course_course_color | string | No | — | Sets a color in hex code format to be associated with the course. The setting takes effect only when the course is associated with a Canvas for Elementary-enabled account. |
course_friendly_name | string | No | — | Set a friendly name for the course. If this is provided and the course is associated with a Canvas for Elementary account, it will be shown instead of the course name. This setting takes priority over course nicknames defined by individual users. |
course_enable_course_paces | boolean | No | — | Enable or disable Course Pacing for the course. This setting only has an effect when the Course Pacing feature flag is enabled for the sub-account. Otherwise, Course Pacing are always disabled. |
course_conditional_release | boolean | No | — | Enable or disable individual learning paths for students based on assessment |
course_post_manually | boolean | No | — | When true, all grades in the course will be posted manually. When false, all grades in the course will be automatically posted. Use with caution as this setting will override any assignment level post policy. |
override_sis_stickiness | boolean | No | — | Default is true. If false, any fields containing “sticky” changes will not be updated. See SIS CSV Format documentation for information on which fields can have SIS stickiness |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | Yes | — | Canvas API root, e.g. https://<host>/api |
api_token | string | No | — | Bearer token; omit to use the workflow's token env var |
id | string | Yes | — | ID |
course_account_id | integer | No | — | The unique ID of the account to move the course to. |
course_name | string | No | — | The name of the course. If omitted, the course will be named "Unnamed Course." |
course_course_code | string | No | — | The course code for the course. |
course_start_at | string | No | — | Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true, or the course is already published. |
course_end_at | string | No | — | Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z This value is ignored unless 'restrict_enrollments_to_course_dates' is set to true. |
course_license | string | No | — | 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 | No | — | Set to true if course is public to both authenticated and unauthenticated users. |
course_is_public_to_auth_users | boolean | No | — | Set to true if course is public only to authenticated users. |
course_public_syllabus | boolean | No | — | Set to true to make the course syllabus public. |
course_public_syllabus_to_auth | boolean | No | — | Set to true to make the course syllabus to public for authenticated users. |
course_public_description | string | No | — | A publicly visible description of the course. |
course_allow_student_wiki_edits | boolean | No | — | If true, students will be able to modify the course wiki. |
course_allow_wiki_comments | boolean | No | — | If true, course members will be able to comment on wiki pages. |
course_allow_student_forum_attachments | boolean | No | — | If true, students can attach files to forum posts. |
course_open_enrollment | boolean | No | — | Set to true if the course is open enrollment. |
course_self_enrollment | boolean | No | — | Set to true if the course is self enrollment. |
course_restrict_enrollments_to_course_dates | boolean | No | — | Set to true to restrict user enrollments to the start and end dates of the course. Setting this value to false will remove the course end date (if it exists), as well as the course start date (if the course is unpublished). |
course_term_id | integer | No | — | The unique ID of the term to create to course in. |
course_sis_course_id | string | No | — | The unique SIS identifier. |
course_integration_id | string | No | — | The unique Integration identifier. |
course_hide_final_grades | boolean | No | — | If this option is set to true, the totals in student grades summary will be hidden. |
course_time_zone | string | No | — | The time zone for the course. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. |
course_apply_assignment_group_weights | boolean | No | — | Set to true to weight final grade based on assignment groups percentages. |
course_storage_quota_mb | integer | No | — | Set the storage quota for the course, in megabytes. The caller must have the "Manage storage quotas" account permission. |
offer | boolean | No | — | If this option is set to true, the course will be available to students immediately. |
course_event | string | No | — | 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. This action requires account administrative rights. (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. |
course_default_view | string | No | — | 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 |
course_syllabus_body | string | No | — | The syllabus body for the course |
course_syllabus_course_summary | boolean | No | — | Optional. Indicates whether the Course Summary (consisting of the course's assignments and calendar events) is displayed on the syllabus page. Defaults to +true+. |
course_grading_standard_id | integer | No | — | 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_grade_passback_setting | string | No | — | Optional. The grade_passback_setting for the course. Only 'nightly_sync' and '' are allowed |
course_course_format | string | No | — | Optional. Specifies the format of the course. (Should be either 'on_campus' or 'online') |
course_image_id | integer | No | — | 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 | No | — | 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 | No | — | If this option is set to true, the course image url and course image ID are both set to nil |
course_remove_banner_image | boolean | No | — | If this option is set to true, the course banner image url and course banner image ID are both set to nil |
course_blueprint | boolean | No | — | Sets the course as a blueprint course. |
course_blueprint_restrictions | json | No | — | Sets a default set to apply to blueprint course objects when restricted, unless use_blueprint_restrictions_by_object_type is enabled. See the {api:Blueprint_Courses:BlueprintRestriction Blueprint Restriction} documentation |
course_use_blueprint_restrictions_by_object_type | boolean | No | — | 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 | json | No | — | Allows setting multiple {api:Blueprint_Courses:BlueprintRestriction 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 |
course_homeroom_course | boolean | No | — | Sets the course as a homeroom course. The setting takes effect only when the course is associated with a Canvas for Elementary-enabled account. |
course_sync_enrollments_from_homeroom | string | No | — | Syncs enrollments from the homeroom that is set in homeroom_course_id. The setting only takes effect when the course is associated with a Canvas for Elementary-enabled account and sync_enrollments_from_homeroom is enabled. |
course_homeroom_course_id | string | No | — | Sets the Homeroom Course id to be used with sync_enrollments_from_homeroom. The setting only takes effect when the course is associated with a Canvas for Elementary-enabled account and sync_enrollments_from_homeroom is enabled. |
course_template | boolean | No | — | Enable or disable the course as a template that can be selected by an account |
course_course_color | string | No | — | Sets a color in hex code format to be associated with the course. The setting takes effect only when the course is associated with a Canvas for Elementary-enabled account. |
course_friendly_name | string | No | — | Set a friendly name for the course. If this is provided and the course is associated with a Canvas for Elementary account, it will be shown instead of the course name. This setting takes priority over course nicknames defined by individual users. |
course_enable_course_paces | boolean | No | — | Enable or disable Course Pacing for the course. This setting only has an effect when the Course Pacing feature flag is enabled for the sub-account. Otherwise, Course Pacing are always disabled. |
course_conditional_release | boolean | No | — | Enable or disable individual learning paths for students based on assessment |
course_post_manually | boolean | No | — | When true, all grades in the course will be posted manually. When false, all grades in the course will be automatically posted. Use with caution as this setting will override any assignment level post policy. |
override_sis_stickiness | boolean | No | — | Default is true. If false, any fields containing “sticky” changes will not be updated. See SIS CSV Format documentation for information on which fields can have SIS stickiness |
status_code | integer | No | — | HTTP status code of the completed call |
response | json | No | — | Parsed JSON response body |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_at | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Waiting to call PUT /v1/courses/ |
completed | No | Yes | Yes | — | HTTP call succeeded |
failed | No | Yes | No | — | HTTP call failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Perform PUT /v1/courses/ |
* (any state) | fail | failed | Record the failure reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "canvas.courses.update-course",
"initial_data": {
"base_url": "value",
"id": "value"
}
}