>> Hello and welcome to the fast track canvas admin series.
In this four minute video will be discuss the lessor known feature of the canvas live API.
This is intended to be a basic or introductory level video.
Let's start with the big picture.
Scripts are used to automate repetitive tasks.
They're often written in programming language such as Java Script, Ruby, Python, and Java,
many others and in those scripts there needs to be at least one line of code
that allows the script to communicate with the canvas server.
That line of code uses an application programing interface or API call to do something.
That something is to either get information, create something,
update something or delete something in canvas.
Because it's a program communicating with canvas and not need to click
through the graphical user interface you can do things really fast in canvas.
An API is often run as part of a program but it doesn't have to be.
If you're going to do something very frequently, like every hour or every day or every week,
you may want to put the API column part of a script that can be run automatically.
But if you're going to use the API column maybe once a term or once a year,
then it might not be worth the time to write a program for it.
Instead you can use a spread sheet to call the API to create the API call and then just copy
and paste into a terminal on a MAC or into your command prompt if you're using a PC.
If you're going to run the API call just once or twice, then it's helpful to run it
in the canvas live API web page which I will show you in just a minute.
This is what some people do just to see how the API call works before sitting
down to write a script or to put it in a spread sheet.
Now let's get into the API's themselves.
The full documentation can be found at API dot instructure dot com.
The live API is found at your site instructure dot com slash doc slash API slash live.
There are four types of API calls that are used in canvas.
They are get, post, put, and delete.
Get and delete are pretty self-explanatory.
Post creates things in canvas and put updates in canvas.
Now when I first learned about post and put I had a hard time remembering which does which
and so someone showed me that put and update both contain the letter U,
so put is update and post is create.
Now let's take a look at the live API.
When you head over to your site instructure dot com slash doc slash API slash live you will see
a long list of possible API's.
Notice that you just need to add test or beta in the URL to get to the live API
for those sites too and I strongly encourage you to play
around when you're just learning, start in test or start in beta.
That way you don't mess anything up on production.
There's also a box on the right where you can paste
in your token and then click on save token.
The page will then refresh and you can scroll down and play with any of the API's.
I'm going to open up the enrollments API and see what's available.
You can see that the API's are all colored coded based on their function,
meaning get, post, put or delete.
This is where you can begin to play around and see how they work.
Again I strongly suggest you do this in test
or beta so that way you don't mess anything up in production.
It's a great place to play and get to know the API's.
For more information here are a couple of good places to start.
I frequently recommend watching the session Hammer of the Gods
from Instructure Con twenty fifteen as well
as the documentation at API dot instructure dot com.
You can see examples of API calls used in scripts
at git hub dot com slash unsupported slash canvas and example of how API calls are used
in spreadsheets in a blog that I wrote
in the canvas community titled adjusting term access dates.
Thanks for watching.
Please comment below with any suggestion or requests for future fast track admin videos.