- Created by Natalia Yudnikova, last modified on Apr 28, 2022
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 27 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
GetMetaData
For getting of all provided APIs you need to send following request:
Headers:
no header
[ { "name": "GetMetaData", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns controllers actions", "returns": "JSON array" }, { "name": "Describe", "parameters": "String name", "verb": "GET", "authenticate": false, "description": "Describes object properties", "returns": "" }, { "name": "Authenticate", "parameters": "", "verb": "GET", "authenticate": true, "description": "Returns access and refresh tokens", "returns": "JSON object" }, { "name": "RefreshAccessToken", "parameters": "String refreshToken", "verb": "GET", "authenticate": true, "description": "Returns access and refresh tokens", "returns": "JSON object" }, { "name": "DeleteToken", "parameters": "String refreshToken", "verb": "DELETE", "authenticate": true, "description": "Deletes a token by refresh token", "returns": "boolean" }, { "name": "Applications", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns Canvas applications", "returns": "JSON Array" }, { "name": "WorkflowTemplates", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns list of workflow templates", "returns": "JSON array" }, { "name": "Clients", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns list of clients", "returns": "JSON array" }, { "name": "RegApplications", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns account registerred applications", "returns": "JSON Array" }, { "name": "Workflows", "parameters": "", "verb": "GET", "authenticate": false, "description": "Returns list of registered workflows", "returns": "JSON array" }, { "name": "Workflow", "parameters": "Guid id", "verb": "GET", "authenticate": false, "description": "Returns registered workflow by id", "returns": "JSON" }, { "name": "RegApplication", "parameters": "[FromBody]AddRegApplicationApiDto regApp", "verb": "POST", "authenticate": false, "description": "Registers a new application and returns Id", "returns": "Guid" }, { "name": "Workflow", "parameters": "[FromBody]AddWorkflowApiDto workflow", "verb": "POST", "authenticate": false, "description": "Registers a new workflow based on template and returns Id", "returns": "Guid" }, { "name": "DeleteWorkflow", "parameters": "Guid id", "verb": "GET", "authenticate": false, "description": "Deletes workflow by Id", "returns": "Guid" }, { "name": "RunWorkflow", "parameters": "[FromBody]RunMetadataApiDto metadata", "verb": "POST", "authenticate": false, "description": "Runs workflow", "returns": "Guid" }, { "name": "WorkflowScheduler", "parameters": "[FromBody]UpdateWorkfowSchedulerApiDto scheduler", "verb": "POST", "authenticate": false, "description": "Updates the workflow scheduler", "returns": "" }, { "name": "Account", "parameters": "[FromBody]AddAccountApiDto data", "verb": "POST", "authenticate": false, "description": "Account registration", "returns": "" } ]
Describe
For getting of description about APIs parameters you can use following request:
Header:
no header
[ { "typeName": "Guid", "propertyName": "WorkflowTemplateId", "assemblyQualifiedName": "System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" }, { "typeName": "String", "propertyName": "Name", "assemblyQualifiedName": "System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" }, { "typeName": "String", "propertyName": "Description", "assemblyQualifiedName": "System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" }, { "typeName": "Dictionary`2", "propertyName": "Applications", "assemblyQualifiedName": "System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" }, { "typeName": "IEnumerable`1", "propertyName": "Chain", "assemblyQualifiedName": "System.Collections.Generic.IEnumerable`1[[ConnectMyApps.Canvas.Services.Dtos.ChainDto, ConnectMyApps.Canvas.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" } ]
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:
Headers:
Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7
{ "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" }
Returned if the Consumer or SecretKey are incorrect or missing.
Refresh token
For refreshing of access token you need to send following request:
Headers:
Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7
{ "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" }
Returned if the Consumer or SecretKey are incorrect or missing.
Returned if refresh token is not found
Delete authentication tokens
For deleting of authentication tokens you need to send following request:
Headers:
Consumer:5D1AEF05263B497182992E324517FFFD0FED85FBEC2342B19CE02AB5ED62D6ED
SecretKey:a5ae515d-d53b-478c-90bd-060c616d37b7
true
Returned if the Consumer or SecretKey are incorrect or missing.
Returned if refresh token is not found
Applications
Returns list of all third-part applications supported by CMA
Headers:
Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE
[ { "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 }, ... ]
Returned if the Authorization is incorrect or missing.
- No labels