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 26 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.

Authentication request:

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

Headers:

Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7

 Response (status 200)
{
  "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzYzI4YjFkYy05ZDA1LTQ5ZDgtYTMyNC1kNGI2N2IxYTg3MmQiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODA4MiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY4OTgxLCJhdWQiOiJjbWEtdXNlcnMifQ.SllrAi0m1DR__9tYuSZJ4-qTk3pnxEi2G5vs6_cSvCE",
  "accessTokenExpiresDateTime": "2022-04-27T14:16:21.9458102+00:00",
  "refresh_token": "6ed6d7ba271d43a0843f8f363fe27279",     
  "refreshTokenExpiresDateTime": "2022-04-28T14:01:21.9458102+00:00"
}
 Response (status 401)

Returned if the Consumer or SecretKey are incorrect or missing.

Refresh token

For refreshing of access token you need to send following request:

 GET https://<base-url>/RefreshAccessToken?refreshToken=6ed6d7ba271d43a0843f8f363fe27279

Headers:

Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7

 Response (status 200)
{
    "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE",
    "accessTokenExpiresDateTime": "2022-04-27T14:26:09.3528117+00:00",
    "refresh_token": "886be8d80a65477b8ce9b4b643fe6994",
    "refreshTokenExpiresDateTime": "2022-04-28T14:16:09.3528117+00:00"
}
 Response (status 401)

Returned if the Consumer or SecretKey are incorrect or missing.

 Response (status 404)

Returned if refresh token is not found

Delete authentication tokens

For deleting of authentication tokens you need to send following request:

 DELETE https://<base-url>/DeleteToken?refreshToken=6ed6d7ba271d43a0843f8f363fe27279

Headers:

Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7

 Response (status 200)
true
 Response (status 401)

Returned if the Consumer or SecretKey are incorrect or missing.

 Response (status 404)

Returned if refresh token is not found

Applications

Returns list of all third-part applications supported by CMA

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

Headers:

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

 Response (status 200)

[
    {
        "id": "3c2da999-deca-4d16-b9a5-004bc1d5e0f9",
        "name": "Arrow",
        "shortName": "ARSP",
        "description": "Cloud delivery and administration",
        "vendorUrl": "https://www.arrow.com/ecs/no/loesninger/sky/arrowsphere/",
        "credentialFields": "[\r\n  {\r\n    \"ShortName\": \"apiKey\",\r\n    \"Name\": \"API key\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Your Arrowsphere API key.\",\r\n    \"Hidden\": false\r\n  },\r\n  {\r\n    \"ShortName\": \"environment\",\r\n    \"Name\": \"Environment\",\r\n    \"Type\": \"select\",\r\n    \"Value\": \"\",\r\n    \"Options\": \"live|Live Environment,test|Test Environment\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Choose which Arrowsphere environment you wish to use, live or test.\",\r\n    \"Hidden\": false\r\n  }\r\n]",
        "tag": "Cloud",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    },
    {
        "id": "07ffd13d-ba57-4d1b-9c46-03c5c919eed0",
        "name": "Talentsoft",
        "shortName": "TASO",
        "description": "HR",
        "vendorUrl": "https://www.talentsoft.com/",
        "credentialFields": "[\r\n  {\r\n    \"ShortName\": \"baseUrl\",\r\n    \"Name\": \"Base url\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Talentsoft API url.\",\r\n    \"Hidden\": false\r\n  },\r\n  {\r\n    \"ShortName\": \"client_id\",\r\n    \"Name\": \"Client ID\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Talentsoft client ID.\",\r\n    \"Hidden\": false\r\n  },\r\n  {\r\n    \"ShortName\": \"client_secret\",\r\n    \"Name\": \"Client secret\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Talentsoft client secret.\",\r\n    \"Hidden\": false\r\n  }\r\n]",
        "tag": "Hr, Premium",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    },
    {
        "id": "2ad9b4c5-d40d-46ac-8cd2-0dae50337693",
        "name": "Planday",
        "shortName": "PLAN",
        "description": "Workforce managment",
        "vendorUrl": "https://www.planday.com/",
        "credentialFields": "[\r\n  {\r\n    \"ShortName\": \"appid\",\r\n    \"Name\": \"Application Id\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Planday application Id\",\r\n    \"Hidden\": false\r\n  },\r\n  {\r\n    \"ShortName\": \"token\",\r\n    \"Name\": \"Token\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Token\",\r\n    \"Hidden\": false\r\n  }\r\n]",
        "tag": "Planday API",
        "sessionTimeMins": 45,
        "sessionSlidingExpiry": false
    },
    {
        "id": "720b3e57-c399-4531-8aa7-0f27b3ea99fa",
        "name": "SalesScreen",
        "shortName": "SASC",
        "description": "Sales visualization",
        "vendorUrl": "http://www.dogu.no",
        "credentialFields": "[\r\n  {\r\n    \"ShortName\": \"key\",\r\n    \"Name\": \"Company key\",\r\n    \"Type\": \"text\",\r\n    \"Value\": \"\",\r\n    \"Optional\": false,\r\n    \"Desc\": \"Your SalesScreen API company key.\",\r\n    \"Hidden\": false\r\n  }\r\n]",
        "tag": "Sales",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    },
    ...
]
 Response (status 401)

Returned if the Authorization is incorrect or missing.

  • No labels