Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

The Canvas REST API enables your organization to interact with Canvas programmatically. Use this API to register new accounts and build integration workflows between third-party applications.

This page documents the REST resources available in Canvas, including the HTTP response codes and example requests and responses.

Base URL for environments:

DEV - https://canvastest.connectmyapps.com/api

PRD - https://canvas.connectmyapps.com/api

Authentication

For enabling of access to your organization you need to set <API access> flag ON and copy provided Secret and Consumer keys. Do not share provided keys with anybody and keep them in safe place because they are not saved in Canvas and you will not be able to get them anymore.

Request

GET https://<base-url>/Authenticate

Headers:

Accept:application/json
Content-Type:application/json
Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7

Response

{
    "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4ZTNmMTc2NC1hNmU3LTRjNDMtODE4NS1hYmQ3NjlkZTY3MTUiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA1NDczNSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDU1NjM1LCJhdWQiOiJjbWEtdXNlcnMifQ.tD2ttJQVilvHvZGPdK38wW8g5TG7FNkiM6yH8eK0ang",
    "accessTokenExpiresDateTime": "2022-04-27T10:33:55.1774282+00:00",
    "refresh_token": "07112d7bfcf44c09b2341249448a5ca4",
    "refreshTokenExpiresDateTime": "2022-04-28T10:18:55.1774282+00:00"
}

Refresh token

Request

GET https://<base-url>/RefreshAccessToken?token=07112d7bfcf44c09b2341249448a5ca4

Headers:

Accept:application/json
Content-Type:application/json
Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7

Response

{
    "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4ZTNmMTc2NC1hNmU3LTRjNDMtODE4NS1hYmQ3NjlkZTY3MTUiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA1NDczNSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDU1NjM1LCJhdWQiOiJjbWEtdXNlcnMifQ.tD2ttJQVilvHvZGPdK38wW8g5TG7FNkiM6yH8eK0ang",
    "accessTokenExpiresDateTime": "2022-04-27T10:33:55.1774282+00:00",
    "refresh_token": "07112d7bfcf44c09b2341249448a5ca4",
    "refreshTokenExpiresDateTime": "2022-04-28T10:18:55.1774282+00:00"
}

  • No labels