Presentation Title
PRE-CON: API 101: Introduction to APIs
Summary
The Canvas API is crazy powerful and can be used to perform a bunch of actions and automate otherwise mundane processes.
Details
I consider myself pretty tech savvy but I've never dabbled into APIs so I was very interested to learn more about the capabilities of the Canvas API. Prior to the session, participants had to download an API development app, Postman (free download).
Session Presenters
Deactivated user, Instructure Trainer
@crowley , Technical Consultant
Why use an API?
Examples of API Use:
Example:
“Hey Siri, what time does Walmart Pharmacy open today?”
There are 4 parts of an API call:
Example in Canvas:
“Hey Canvas, tell me what users are enrolled in BIO 101 100M SU19?”
View the API features at your institution:
https://[institution.beta].instructure.com/api/v1/accounts/self/features
Only use the beta instance of your Canvas account until you are comfortable enough to make changes to the production environment. Making changes to the API has the potential to make very large and possibly destructive changes to your Canvas environment! - How do I access the Canvas beta environment as an admin?
Methods:
What if you don’t know the course ID?
sis_account_id
sis_course_id
sis_login_ID
Canvas API Documentation: api.instructure.com
When using a GET API call, you’ve already authenticated in your browser.
When using POST, PUT, DELETE, you can’t use a browser so you need another way to authenticate using a TOKEN.
API Token Security Best Practices:
It’s better to create a separate token in Production, Test, & Beta Canvas instances.
Account > Settings > Generate New Token
Admin > Settings > Reports > Provisioning Report > Courses (only use a specific Term) > Run Report
Can use the Provisioning Report from above to get the unique course ID to replicate the same action on all courses.
canvas_course_id
Use double curly brackets in Postman app on the new value for the Path Variable:
{{canvas_course_id}}
Conclusion
This was probably one of my favorite sessions at InstructureCon 2019 and was an eye-opening view into the power behind the Canvas API. I have a few ideas for how I can apply what I learned into my daily tasks as a Canvas admin at my institution and I'm very thankful to have an opportunity to attend this pre-con!
By the end of this session, I was able to create a new Canvas course with the API, how exciting?! :smileycool:
I'm also looking forward to the video recording to be available so I can review it when I have questions.
What are some of the ways you are using the Canvas API in your day-to-day work? I'd love to learn more!
Banner photo by Safar Safarov on Unsplash
Nice recap of a great InstCon session, @gnordberg ! I loved the live role-playing of different API calls.
Very cool @RebeccaMoulder , thanks for sharing!
Assuming since this is Pre-Con there isn't a recording of this available...bc I would love to see this...even for a price!