canvas.courses.get-single-course-courses ​
Return information on a single course. Accepts the same include[] parameters as the list action plus:
Get a single 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 |
include | list | No | — | - "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": Include course image url if a course image has been set - "banner_image": Include course banner image url if the course is a Canvas for Elementary subject and a banner image has been set - "concluded": Optional information to include with Course. Indicates whether the course has been concluded, taking course and term dates into account. - "lti_context_id": Include course LTI tool id. - "post_manually": Include course post policy. If the post policy is manually post grades, the value will be true. If the post policy is automatically post grades, the value will be false. - "syllabus_versions": Optional information to include with each Course. Returns recent saved versions of the syllabus body. Requires the syllabus_versioning feature flag and permission to manage course content. Version numbers can be passed to the Restore course syllabus version API. |
teacher_limit | integer | No | — | The maximum number of teacher enrollments to show. If the course contains more teachers than this, instead of giving the teacher enrollments, the count of teachers will be given under a teacher_count key. |
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 |
include | list | No | — | - "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": Include course image url if a course image has been set - "banner_image": Include course banner image url if the course is a Canvas for Elementary subject and a banner image has been set - "concluded": Optional information to include with Course. Indicates whether the course has been concluded, taking course and term dates into account. - "lti_context_id": Include course LTI tool id. - "post_manually": Include course post policy. If the post policy is manually post grades, the value will be true. If the post policy is automatically post grades, the value will be false. - "syllabus_versions": Optional information to include with each Course. Returns recent saved versions of the syllabus body. Requires the syllabus_versioning feature flag and permission to manage course content. Version numbers can be passed to the Restore course syllabus version API. |
teacher_limit | integer | No | — | The maximum number of teacher enrollments to show. If the course contains more teachers than this, instead of giving the teacher enrollments, the count of teachers will be given under a teacher_count key. |
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 GET /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 GET /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.get-single-course-courses",
"initial_data": {
"base_url": "value",
"id": "value"
}
}