canvas-lms/doc/api
Bracken Mosbacker bf14f3b9ee add content passback extension to lti assignment launches
This creates an LTI extension to pass text or urls along
with the score when doing an LTI 1.1 outcome request.

Test Plan:
 * use a tool that supports this extension on an assignment
 * After doing the tool activity the submission should have the expected value

refs #mebipenny

Change-Id: I296df1e7c7d99af61724a904511f9bf63d5d2613
Reviewed-on: https://gerrit.instructure.com/12878
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-22 15:38:19 -06:00
..
docstring/html rename doc/templates/rest to doc/api 2011-12-30 09:00:27 -07:00
fulldoc/html API for adding files by URL 2012-08-15 16:38:50 -06:00
layout/html add data-api-endpoint attribute to urls returned by the api 2012-08-17 16:41:18 -06:00
method_details/html flag the following apis as beta 2012-06-13 16:52:05 -06:00
tags return user display info for collection items 2012-06-07 14:31:55 -06:00
topic/html calendar API documentation, fixes/tweaks 2012-07-16 08:54:11 -06:00
README.md officially support JSON PUT and POST requests in the API 2012-05-22 14:44:34 -06:00
assignment_tools.md add content passback extension to lti assignment launches 2012-08-22 15:38:19 -06:00
editor_button_tools.md extension tool launches default to settings from main tool 2012-06-26 12:10:36 -06:00
endpoint_attributes.md add data-api-endpoint attribute to urls returned by the api 2012-08-17 16:41:18 -06:00
file_uploads.md API for adding files by URL 2012-08-15 16:38:50 -06:00
link_selection_tools.md extension tool launches default to settings from main tool 2012-06-26 12:10:36 -06:00
navigation_tools.md extension tool launches default to settings from main tool 2012-06-26 12:10:36 -06:00
oauth.md allow sub-domains to match the redirect_uri on the developer key 2012-08-17 16:48:34 -06:00
object_ids.md rename doc/templates/rest to doc/api 2011-12-30 09:00:27 -07:00
pagination.md avoid page_views counts for users 2012-04-19 15:31:20 -06:00
sis_csv.md fixes #7915 adds time zone information to sis csv documentation 2012-04-16 17:18:26 -06:00
tools_intro.md rename doc/templates/rest to doc/api 2011-12-30 09:00:27 -07:00
tools_xml.md extension tool launches default to settings from main tool 2012-06-26 12:10:36 -06:00

README.md

Welcome to the Canvas LMS API Documentation

Canvas LMS includes a REST API for accessing and modifying data externally from the main application, in your own programs and scripts. This documentation describes the resources that make up the API.

To get started, you'll want to review the general basics, including the information below and the page on Authentication using OAuth2.

Schema

All API access is over HTTPS, against your normal canvas domain.

All API responses are in JSON format.

For POST and PUT requests, parameters are sent using standard HTML form encoding (the application/x-www-form-urlencoded content type).

POST and PUT requests may also optionally be sent in JSON format format. The content-type of the request must be set to application/json in this case. There is currently no way to upload a file as part of a JSON POST, the multipart form type must be used.

As an example, this HTML form request:

name=test+name&file_ids[]=1&file_ids[]=2&sub[name]=foo&sub[message]=bar

would translate into this JSON request:

{ "name": "test name", "file_ids": [1,2], "sub": { "name": "foo", "message": "bar" } }

With either encoding, all timestamps are sent and returned in ISO 8601 format (UTC time zone):

YYYY-MM-DDTHH:MM:SSZ

Authentication

API authentication is done with OAuth2. If possible, using the HTTP Authorization header is recommended. Sending the access token in the query string or POST parameters is also supported.

OAuth2 Token sent in header:

curl -H "Authorization: Bearer <ACCESS-TOKEN>" https://canvas.instructure.com/api/v1/courses

OAuth2 Token sent in query string:

curl https://canvas.instructure.com/api/v1/courses?access_token=<ACCESS-TOKEN>

Read more about OAuth2 and how to get access tokens.

API Terms of Service

Please carefully review The Canvas Cloud API Terms of Service before using the API.

SSL

Note that if you make an API call using HTTP instead of HTTPS, you will be redirected to HTTPS. However, at that point, the credentials have already been sent in clear over the internet. Please make sure that you are using HTTPS.

About this Documentation

This documentation is generated directly from the Canvas LMS code itself. You can generate this documentation yourself if you've set up a local Canvas environment following the instructions on Github, run the following command from your Canvas directory:

bundle exec rake doc:api