This page provides an instruction & guide for developers building a GPT Action for a specific application. Before you proceed, make sure to first familiarize yourself with the following information:
This particular GPT Action provides an overview of how to connect to Canvas (infrastructure.canvas.com), a widely used LMS tool for course material, grading and general education purposes.
Value: Users can now leverage ChatGPT's natural language capability to connect directly to Canvas
Example Use Cases:
Check out these links from the application before you get started:
Before you get started, make sure you go through the following steps in your application environment:
Once you've created a Custom GPT, copy the text below in the Instructions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
**Context** : You are a helpful friendly university level course helper designed to search across canvas courses to help students and educators, this GPT is intended to help students and teachers understand course material, take quiz's and tests from information stored in canvas.
**Instructions**
When asked to perform a task, use the available actions via the canvas.infrastructure.com API
You should be professional and verbose with answers, provide clear pedagogical experience for users.
Offer assistance with tasks around summarizing course material, understanding module and quiz information.
Ask for clarification when needed to ensure accuracy and completeness in fulfilling user requests. It should also respect user privacy and handle all data securely.
If a user uploads a file, help the user analyze the file before callin the canvas API.
Once you've created a Custom GPT, copy the text below in the Actions panel. Have questions? Check out Getting Started Example to see how this step works in more detail.
openapi: 3.1.0
info:
title: Canvas LMS API
description: >
This is the API of the Canvas LMS, providing access to various resources such as accounts, courses, users,
assignments, quizzes, files, and more.
version: 1.0.0
servers:
- url: https://canvas.instructure.com
description: Canvas LMS Production Server
paths:
/api/v1/accounts:
get:
summary: List accounts
operationId: listAccounts
responses:
"200":
description: A paginated list of accounts
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Account"
/api/v1/accounts/{account_id}:
get:
summary: Get a single account
operationId: getAccount
parameters:
- name: account_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Account details
content:
application/json:
schema:
$ref: "#/components/schemas/Account"
/api/v1/courses:
get:
summary: List courses
operationId: listCourses
responses:
"200":
description: A paginated list of courses
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Course"
/api/v1/courses/{course_id}:
get:
summary: Get a single course
operationId: getCourse
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Course details
content:
application/json:
schema:
$ref: "#/components/schemas/Course"
/api/v1/courses/{course_id}/assignments:
get:
summary: List assignments
operationId: listAssignments
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: A paginated list of assignments
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Assignment"
/api/v1/courses/{course_id}/assignments/{assignment_id}:
get:
summary: Get a single assignment
operationId: getAssignment
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
- name: assignment_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Assignment details
content:
application/json:
schema:
$ref: "#/components/schemas/Assignment"
/api/v1/courses/{course_id}/quizzes:
get:
summary: List quizzes
operationId: listQuizzes
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: A paginated list of quizzes
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Quiz"
/api/v1/courses/{course_id}/quizzes/{quiz_id}:
get:
summary: Get a single quiz
operationId: getQuiz
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
- name: quiz_id
in: path
required: true
schema:
type: integer
responses:
"200":
description: Quiz details
content:
application/json:
schema:
$ref: "#/components/schemas/Quiz"
/api/v1/courses/{course_id}/students/{student_id}/grades:
get:
summary: List grades for a student
operationId: listGrades
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
- name: student_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: A list of grades for the student
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Grade'
/api/v1/courses/{course_id}/students/{student_id}/grades/{grade_id}:
get:
summary: Get a single grade
operationId: getGrade
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
- name: student_id
in: path
required: true
schema:
type: integer
- name: grade_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Grade details
content:
application/json:
schema:
$ref: '#/components/schemas/Grade'
/api/v1/courses/{course_id}/syllabus:
get:
summary: Get course syllabus
operationId: getSyllabus
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Syllabus details
content:
application/json:
schema:
$ref: '#/components/schemas/Syllabus'
/api/v1/courses/{course_id}/modules:
get:
summary: List modules
operationId: listModules
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: A list of modules in the course
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Module'
/api/v1/courses/{course_id}/modules/{module_id}:
get:
summary: Get a single module
operationId: getModule
parameters:
- name: course_id
in: path
required: true
schema:
type: integer
- name: module_id
in: path
required: true
schema:
type: integer
responses:
'200':
description: Module details
content:
application/json:
schema:
$ref: '#/components/schemas/Module'
components:
schemas:
Account:
type: object
properties:
id:
type: integer
name:
type: string
workflow_state:
type: string
Course:
type: object
properties:
id:
type: integer
name:
type: string
account_id:
type: integer
start_at:
type: string
format: date-time
end_at:
type: string
format: date-time
Assignment:
type: object
properties:
id:
type: integer
name:
type: string
description:
type: string
due_at:
type: string
format: date-time
points_possible:
type: number
Quiz:
type: object
properties:
id:
type: integer
title:
type: string
description:
type: string
due_at:
type: string
format: date-time
points_possible:
type: number
Grade:
type: object
properties:
id:
type: integer
student_id:
type: integer
course_id:
type: integer
assignment_id:
type: integer
score:
type: number
grade:
type: string
Syllabus:
type: object
properties:
id:
type: integer
name:
type: string
account_id:
type: integer
start_at:
type: string
format: date-time
end_at:
type: string
format: date-time
syllabus_body:
type: string
syllabus_url:
type: string
Module:
type: object
properties:
id:
type: integer
name:
type: string
position:
type: integer
unlock_at:
type: string
format: date-time
require_sequential_progress:
type: boolean
state:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- bearerAuth: []
Note : this schema above does not contain all possible API endpoints, be sure to edit the schema to produce the appropriate actions from canvas API documentation
Below are instructions on setting up authentication with this 3rd party application. Have questions? Check out Getting Started Example to see how this step works in more detail.
Before you set up authentication in ChatGPT, please take the following steps in the application. Our sample integration below is utilizing a secret key, which is an easier method for testing. In production, it is more common to establish an OAuth connection to ensure permissions are respected from ChatGPT to Canvas, ensuring users the appropriate access.
In ChatGPT, click on "Authentication" and choose "API Key". Enter in the information below. API Key provides general access to the Canvas environment based on the users permissions that created the API key, to follow permission models in Canvas use the OAuth method described below.
OAuth Connection
If you want to implement OAuth, follow the guide here : https://canvas.instructure.com/doc/api/file.oauth.html - specific instructions can vary depending on the Canvas implementation.
Parameters for GPT Configuration
Once you've set up authentication in ChatGPT, follow the steps below in the application to test the Action.
Are there integrations that you’d like us to prioritize? Are there errors in our integrations? File a PR or issue in our github, and we’ll take a look.