canvas.courses.create-new-course ​
Create a new 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 |
account_id | string | Yes | — | ID |
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. |
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 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. This value must be set to true in order to specify a course start date and/or end date. |
course_term_id | string | 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_apply_assignment_group_weights | boolean | No | — | Set to true to weight final grade based on assignment groups percentages. |
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}. |
offer | boolean | No | — | If this option is set to true, the course will be available to students immediately. |
enroll_me | boolean | No | — | Set to true to enroll the current user as the teacher. |
skip_course_template | boolean | No | — | If this option is set to true, the template of the account will not be applied to this course It means copy_from_course_template will not be executed. This option is thought for a course copy. |
course_default_view | string | No | — | 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 |
course_syllabus_body | string | No | — | The syllabus body for the course |
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', 'disabled', and '' are allowed |
course_course_format | string | No | — | Optional. Specifies the format of the course. (Should be 'on_campus', 'online', or 'blended') |
course_post_manually | boolean | No | — | Default is false. When true, all grades in the course must be posted manually, and will not be automatically posted. When false, all grades in the course will be automatically posted. |
enable_sis_reactivation | boolean | No | — | When true, will first try to re-activate a deleted course with matching sis_course_id if possible. |
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 |
account_id | string | Yes | — | ID |
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. |
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 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. This value must be set to true in order to specify a course start date and/or end date. |
course_term_id | string | 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_apply_assignment_group_weights | boolean | No | — | Set to true to weight final grade based on assignment groups percentages. |
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}. |
offer | boolean | No | — | If this option is set to true, the course will be available to students immediately. |
enroll_me | boolean | No | — | Set to true to enroll the current user as the teacher. |
skip_course_template | boolean | No | — | If this option is set to true, the template of the account will not be applied to this course It means copy_from_course_template will not be executed. This option is thought for a course copy. |
course_default_view | string | No | — | 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 |
course_syllabus_body | string | No | — | The syllabus body for the course |
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', 'disabled', and '' are allowed |
course_course_format | string | No | — | Optional. Specifies the format of the course. (Should be 'on_campus', 'online', or 'blended') |
course_post_manually | boolean | No | — | Default is false. When true, all grades in the course must be posted manually, and will not be automatically posted. When false, all grades in the course will be automatically posted. |
enable_sis_reactivation | boolean | No | — | When true, will first try to re-activate a deleted course with matching sis_course_id if possible. |
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 POST /v1/accounts/{account_id}/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 POST /v1/accounts/{account_id}/courses |
* (any state) | fail | failed | Record the failure reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "canvas.courses.create-new-course",
"initial_data": {
"base_url": "value",
"account_id": "value"
}
}