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 46 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

APIs for help

There are two APIs, which describes list of all provided APIs

GetMetaData

For getting of all provided APIs you need to send following request:

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

Headers:

no header

 Response (status 200)
[
    {
        "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:

 GET https://<base-url>/Describe?name=AddWorkflowApiDto

Header:

no header

 Response (status 200)
[
    {
        "typeName": "guid",
        "propertyName": "workflowTemplateId",
        "genericParameters": "",
        "isRequired": true
    },
    {
        "typeName": "string",
        "propertyName": "name",
        "genericParameters": "",
        "isRequired": true
    },
    {
        "typeName": "string",
        "propertyName": "description",
        "genericParameters": "",
        "isRequired": false
    },
    {
        "typeName": "dictionary",
        "propertyName": "applications",
        "genericParameters": "string,guid",
        "isRequired": true
    },
    {
        "typeName": "iEnumerable",
        "propertyName": "chain",
        "genericParameters": "chainApiDto",
        "isRequired": false
    }
]

APIs for authentication

There are three APIs for working with authentication tokens

Authentication

For enabling of access to your organization data by REST API 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

APIs for organization administration

Clients

Returns list of all accounts in your organization

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

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
[
    {
        "id": "41a31538-1120-4bdf-a6cb-675eeedd7d2d",
        "firstName": "Nathan",
        "lastName": "Bray",
        "email": "nathan.bray@connectmyapps.com",
        "organizationId": "00000000-0000-0000-0000-000000000000",
        "organizationName": "CMA Customer Bench",
        "roleId": "349889ad-4277-42d0-a268-5cd27230cfc5",
        "role": "User",
        "dateCreated": "2020-05-07T19:10:36.69"
    },
    {
        "id": "18cc3b9f-c14e-4c7d-892b-7cc5545abac0",
        "firstName": "Igor",
        "lastName": "Kostian",
        "email": "igor.kostian@connectmyapps.com",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "organizationName": "ConnectMyApps AS",
        "roleId": "9c525665-df99-4aee-9e52-1a55853db03b",
        "role": "Admin",
        "dateCreated": "2017-03-01T08:51:32.31"
    },
    {
        "id": "a305c3a2-cba5-4554-bb5d-ab7fcd5b4a4c",
        "firstName": "Luke",
        "lastName": "Buckley",
        "email": "luke.buckley@connectmyapps.com",
        "organizationId": "00000000-0000-0000-0000-000000000000",
        "organizationName": "CMA Customer Bench",
        "roleId": "9c525665-df99-4aee-9e52-1a55853db03b",
        "role": "Admin",
        "dateCreated": "2013-06-01T18:56:22.763"
    }
]

Application APIs

Applications

Returns list of all third-part applications supported by CMA

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

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
[
    {
        "id": "07ffd13d-ba57-4d1b-9c46-03c5c919eed0",
        "name": "Talentsoft",
        "shortName": "TASO",
        "description": "HR",
        "vendorUrl": "https://www.talentsoft.com/",
        "credentialFields": [
            {
                "ShortName": "baseUrl",
                "Name": "Base url",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Talentsoft API url.",
                "Hidden": false
            },
            {
                "ShortName": "client_id",
                "Name": "Client ID",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Talentsoft client ID.",
                "Hidden": false
            },
            {
                "ShortName": "client_secret",
                "Name": "Client secret",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Talentsoft client secret.",
                "Hidden": false
            }
        ],
        "credentialsJson": {
            "baseUrl": null,
            "client_id": null,
            "client_secret": null
        },
        "tag": "Hr, Premium",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    },
    {
        "id": "97cbc3b3-32c7-4e4a-b788-a332ea82aeff",
        "name": "Quinyx",
        "shortName": "QUIN",
        "description": "Workforce planning",
        "vendorUrl": "http://www.quinyx.com",
        "credentialFields": [
            {
                "ShortName": "apikey",
                "Name": "API key",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Your Quinyx API key",
                "Hidden": false
            },
            {
                "ShortName": "environment",
                "Name": "Environment",
                "Type": "select",
                "Value": "",
                "Options": "live|Live Environment,test|Test Environment",
                "Optional": false,
                "Desc": "Choose which Quinyx environment you wish to use, live or test.",
                "Hidden": false
            }
        ],
        "credentialsJson": {
            "apikey": null,
            "environment": null
        },
        "tag": "Scheduling,Planning,Premium",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    },
	...,
    {
        "id": "b5a4a9ed-a686-4b1e-af30-ffd84b7fb2e0",
        "name": "Talent Manager",
        "shortName": "HRTM",
        "description": "HR solution",
        "vendorUrl": "http://www.hr-manager.net",
        "credentialFields": [
            {
                "ShortName": "customeralias",
                "Name": "Customer alias",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Your customer alias.",
                "Hidden": false
            },
            {
                "ShortName": "apikey",
                "Name": "Your API key",
                "Type": "text",
                "Value": "",
                "Optional": false,
                "Desc": "Your API key.",
                "Hidden": false
            }
        ],
        "credentialsJson": {
            "customeralias": null,
            "apikey": null
        },
        "tag": "HR",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false
    }
]
 Response (status 401)

Returned if the Authorization is incorrect or missing.

RegApplications

Returns account registerred applications

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

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
[
    {
        "id": "1710ff47-f590-43db-b0de-015676e99615",
        "shortName": "QUIN",
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "applicationId": "97cbc3b3-32c7-4e4a-b788-a332ea82aeff",
        "name": "Quinyx",
        "tagText": "N-Quinyx",
        "description": "Workforce planning",
        "isAuthenticated": true,
        "isOAuthApp": false,
        "dateModified": "2022-04-19T15:56:22.1133746",
        "dateTimeUtcAuthenticated": "2022-04-19T15:56:22.0345429",
        "dateTimeForReAuth": "2022-04-19T15:56:22.0345429",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false,
        "faulted": false
    },
    {
        "id": "d2698be7-9f12-44b1-8e6d-0494436538a8",
        "shortName": "MSQL",
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "applicationId": "276511d9-f07f-4fa6-b109-fdb4d62b2429",
        "name": "Microsoft SQL On-premise",
        "tagText": "N-Microsoft SQL On-premise",
        "description": "Database engine",
        "isAuthenticated": true,
        "isOAuthApp": false,
        "dateModified": "2021-09-06T13:30:11.2590869",
        "dateTimeUtcAuthenticated": "2021-04-14T10:27:22.1672672",
        "dateTimeForReAuth": "2021-04-14T10:27:22.1672672",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false,
        "faulted": false
    },
    {
        "id": "dbdd41cf-28de-4d2d-9771-7105c2165bcf",
        "shortName": "CMAF",
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "applicationId": "9b6a04b3-c91f-4255-9033-6ac7b7a6f935",
        "name": "File Hub",
        "tagText": "File Hub",
        "description": "File automation",
        "isAuthenticated": true,
        "isOAuthApp": false,
        "dateModified": "2022-04-20T14:00:27.1912258",
        "dateTimeUtcAuthenticated": null,
        "dateTimeForReAuth": null,
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false,
        "faulted": false
    },
    {
        "id": "a067c363-7339-4fed-b1ad-efafd7603986",
        "shortName": "FTP",
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "applicationId": "5f814909-01ea-4395-96ee-5ba7614128fc",
        "name": "FTP Server",
        "tagText": "N-FTP Server",
        "description": "File upload and download",
        "isAuthenticated": true,
        "isOAuthApp": false,
        "dateModified": "2022-02-01T15:33:49.9987294",
        "dateTimeUtcAuthenticated": "2022-02-01T15:33:49.9919226",
        "dateTimeForReAuth": "2022-02-01T15:33:49.9919226",
        "sessionTimeMins": 0,
        "sessionSlidingExpiry": false,
        "faulted": false
    },
]

RegApplication

Registers a new application and returns Id

 POST https://<base-url>/RegApplication

Body JSON structure:

AddRegApplicationApiDto

Body example 1:

{
    "applicationId": "97cbc3b3-32c7-4e4a-b788-a332ea82aeff",
    "tagText": "Quinyx 2022-04-28",
    "credentialsJson": "{\"apikey\":\"01d6-3e54-cff2-c7d8\",\"environment\": \"test\"}"
}

Body example 2:

{
    "applicationId": "5f814909-01ea-4395-96ee-5ba7614128fc",
    "tagText": "FTP 2022-05-03",
    "credentialsJson": "{\"username\": null,\"password\": null,\"port\": null,\"address\": null,\"secure\": true}"
}

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
"eea37d64-5a93-478c-8216-6231c0a37f0a"
 Response (status 401)

Status Code: 401; Unauthorized

 Response (status 400)
Authentication Error: You must enter a value for User name.
You must enter a value for Password.
You must enter a value for Port.
You must enter a value for Server address.

Workflow APIs

WorkflowTemplates

Returns list of workflow templates provided by CMA and your organization

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

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
[
    {
        "id": "bbe52876-aca2-4ece-ba31-11e0d98ddc19",
        "name": "Quinyx Employee Export Into FTP(CSV)",
        "description": "Quinyx Employee Export Into FTP(CSV)",
        "dateCreated": "2020-08-14T17:12:29.7856246",
        "dateModified": "2022-03-17T13:54:07.0394189",
        "state": "Published",
        "version": "0.1.7",
        "draftIsCommitted": false,
        "dateCommitted": "2021-02-26T16:51:29.3588575",
        "organizationId": null,
        "applications": [
            "QUIN",
            "FTP"
        ],
        "chain": [
            {
                "uniqueBlockId": "02d1424a-da90-4c12-9c28-96162e624bd7",
                "blockName": "API - Get Employees",
                "variables": {
                    "apiKeys": [],
                    "badgeNo": null
                }
            },
            {
                "uniqueBlockId": "25782580-aabe-4a03-be1c-bc45dacd7e60",
                "blockName": "FTP Upload",
                "variables": {
                    "filename": "NY_Employees_{date:yyyy-MM-dd-HH-mm}",
                    "fileformat": "csv",
                    "filepath": "/"
                }
            }
        ]
    },
    {
        "id": "3b76ca61-bca9-4995-90ba-7190c1dd567b",
        "name": "MyStore Customers Send email",
        "description": "MyStore Customers Send email",
        "dateCreated": "2021-11-08T11:39:58.814",
        "dateModified": "2021-11-09T15:14:14.836809",
        "state": "Published",
        "version": "0.0.7",
        "draftIsCommitted": true,
        "dateCommitted": "2021-11-09T15:14:18.6103605",
        "organizationId": null,
        "applications": [
            "MYST2",
            "CMAF"
        ],
        "chain": [
            {
                "uniqueBlockId": "729e4eb5-8022-43bb-b75b-524b1cb5f5b5",
                "blockName": "MyStore Get Customers",
                "variables": {}
            },
            {
                "uniqueBlockId": "a510ddbf-2350-4ab6-9014-c81d0aa3f013",
                "blockName": "Send email",
                "variables": {
                    "subject": "MyStore Customers",
                    "fileName": "AllCustomers",
                    "note": "Please see your customers in MyStore"
                }
            }
        ]
    },
    {
        "id": "018fda95-a62f-4f0b-af12-3cfcd9146def",
        "name": "Transferring of Orders & Customers",
        "description": "Transferring of Orders & Customers",
        "dateCreated": "2020-08-14T17:22:57.2244016",
        "dateModified": "2020-12-10T13:02:23.1685229",
        "state": "Draft",
        "version": null,
        "draftIsCommitted": null,
        "dateCommitted": null,
        "organizationId": null,
        "applications": [
            "MYST2",
            "FIKE"
        ],
        "chain": [
            {
                "uniqueBlockId": "a43e433d-9def-4062-9e89-6ff01824f980",
                "blockName": "MyStore Get orders",
                "variables": {
                    "status": "2",
                    "age": null
                }
            },
            {
                "uniqueBlockId": "d362db53-c46f-4cf8-8bee-9a105ecde130",
                "blockName": "Get all contacts",
                "variables": {
                    "testValue": "name"
                }
            },
            {
                "uniqueBlockId": "6cf1b697-4145-4659-985c-4c9b76a57710",
                "blockName": "Post orders & customers",
                "variables": {
                    "shippingtext": "Shipping"
                }
            }
        ]
    }
]

Workflows

Returns list of registered workflows

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

Headers:

ManagedAccountId:a4ba9a9b-ce81-4f06-81c6-032bf7d648f5

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
[
    {
        "id": "ef7a56e6-448f-4787-b58d-47b063d6e983",
        "name": "Quinyx Employee Export Into FTP(CSV)",
        "description": "Quinyx Employee Export Into FTP(CSV)",
        "status": "Ready",
        "isScheduled": false,
        "schedulerFrequency": "{ \"cronSchedule\": \"0 0 * ? * *\"}",
        "workflowTemplateId": "bbe52876-aca2-4ece-ba31-11e0d98ddc19",
        "isCustomizedStructure": true,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2022-02-22T15:29:22.3525209",
        "dateModified": "2022-04-13T06:30:56.2625076",
        "dateLastRun": "2022-04-12T10:35:32.731+00:00",
        "dateNextSchedule": null,
        "regApplicationIds": [
            "1710ff47-f590-43db-b0de-015676e99615",
            "fa2ee993-03cf-4baf-a8a0-684e92e74ded"
        ],
        "currentBlock": 5
    },
    {
        "id": "b459cf22-ad18-44bf-80dc-6e8b78be1cc5",
        "name": "Order transferring",
        "description": "Transfer orders from MyStore into Tripletex invoices with payments",
        "status": "Ready",
        "isScheduled": false,
        "schedulerFrequency": "{\"cronSchedule\":\"0 0 0/1 ? * * *\"}",
        "workflowTemplateId": null,
        "isCustomizedStructure": false,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2022-03-24T18:08:22.2543998",
        "dateModified": "2022-04-12T10:36:56.478261",
        "dateLastRun": "2022-04-12T10:36:57.877+00:00",
        "dateNextSchedule": "2022-04-05T17:00:00+00:00",
        "regApplicationIds": [
            "281686d9-aedd-4359-89b4-8f878ad43b35",
            "03548816-f945-4bb2-b66e-950dff826fb8"
        ],
        "currentBlock": 3
    },
    {
        "id": "a78cee1b-adca-4777-9261-f86e4640e7db",
        "name": "QuinyxRandom",
        "description": "random",
        "status": "Ready",
        "isScheduled": true,
        "schedulerFrequency": "{\"cronSchedule\":\"0 0 2,6 ? * TUE *\"}",
        "workflowTemplateId": null,
        "isCustomizedStructure": false,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2021-04-02T08:33:15.3238045",
        "dateModified": "2022-04-12T10:19:50.2024988",
        "dateLastRun": "2022-04-26T06:00:28.976+00:00",
        "dateNextSchedule": "2022-05-03T02:00:00+00:00",
        "regApplicationIds": [
            "1710ff47-f590-43db-b0de-015676e99615"
        ],
        "currentBlock": 3
    },
    {
        "id": "4fb07016-6a38-4031-83d7-2cd70af024d9",
        "name": "BigResponse",
        "description": "BigResponse",
        "status": "Ready",
        "isScheduled": false,
        "schedulerFrequency": "{ \"cronSchedule\": \"0 0 * ? * *\"}",
        "workflowTemplateId": null,
        "isCustomizedStructure": false,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2021-10-29T14:12:42.4563685",
        "dateModified": "2022-02-01T09:58:53.506504",
        "dateLastRun": "2021-11-26T16:35:57.573+00:00",
        "dateNextSchedule": null,
        "regApplicationIds": [],
        "currentBlock": 0
    },
    {
        "id": "8d85eb13-9663-4ac7-8502-46c5d38f9c1e",
        "name": "SpecialSymbols",
        "description": "SpecialSymbols",
        "status": "Ready",
        "isScheduled": false,
        "schedulerFrequency": "{ \"cronSchedule\": \"0 0 * ? * *\"}",
        "workflowTemplateId": null,
        "isCustomizedStructure": false,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2021-09-15T14:55:20.4327369",
        "dateModified": "2022-02-01T09:56:16.9089015",
        "dateLastRun": "2021-09-15T14:59:02.95+00:00",
        "dateNextSchedule": null,
        "regApplicationIds": [
            "dbdd41cf-28de-4d2d-9771-7105c2165bcf"
        ],
        "currentBlock": 1
    },
    {
        "id": "f01eccf9-f56c-420a-9da3-e938291514e8",
        "name": "Random",
        "description": "Random",
        "status": "Ready",
        "isScheduled": false,
        "schedulerFrequency": "{\"cronSchedule\":\"0 0 0/1 ? * * *\"}",
        "workflowTemplateId": null,
        "isCustomizedStructure": false,
        "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
        "organizationId": "00000000-0000-0000-0000-000000000001",
        "dateCreated": "2021-03-31T09:09:31.1665459",
        "dateModified": "2021-11-26T16:37:10.8509085",
        "dateLastRun": "2021-11-26T16:37:12.128+00:00",
        "dateNextSchedule": "2021-09-20T11:00:00+00:00",
        "regApplicationIds": [
            "1c08aaa2-52ae-4e74-bb9d-108f6f36b8a8"
        ],
        "currentBlock": 4
    }
]

Workflow

Returns registered workflow by id

 GET https://<base-url>/Workflow/b459cf22-ad18-44bf-80dc-6e8b78be1cc5

Headers:

ManagedAccountId:6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
{
    "id": "b459cf22-ad18-44bf-80dc-6e8b78be1cc5",
    "name": "Order transferring",
    "description": "Transfer orders from MyStore into Tripletex invoices with payments",
    "status": "Ready",
    "isScheduled": false,
    "schedulerFrequency": "{\"cronSchedule\":\"0 0 0/1 ? * * *\"}",
    "workflowTemplateId": null,
    "isCustomizedStructure": false,
    "accountId": "6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1",
    "organizationId": "00000000-0000-0000-0000-000000000001",
    "dateCreated": "2022-03-24T18:08:22.2543998",
    "dateModified": "2022-04-12T10:36:56.478261",
    "dateLastRun": "2022-04-12T10:36:57.877+00:00",
    "dateNextSchedule": "2022-04-05T17:00:00+00:00",
    "regApplicationIds": [
        "281686d9-aedd-4359-89b4-8f878ad43b35",
        "03548816-f945-4bb2-b66e-950dff826fb8"
    ],
    "currentBlock": 3
}

Workflow

Registers a new workflow based on template

 POST https://<base-url>/Workflow

Body JSON structure:

AddWorkflowApiDto

Body example:

{   
   "workflowTemplateId": "bbe52876-aca2-4ece-ba31-11e0d98ddc19",
   "name": "Test Quinyx Employee Export Into FTP(CSV)",
   "applications": {"QUIN":"e3320a16-4b20-4e33-840f-2f5d28e3e1ca", "FTP":"0741b73d-2b13-4a4a-a0c2-2ffad9548e06"},
   "chain":[
            {
                "uniqueBlockId": "02d1424a-da90-4c12-9c28-96162e624bd7",
                "variables": {
                    "apiKeys": ["cc92-510a-86df-b276"],
                    "badgeNo": null
                }
            }
        ]
}       

Headers:

ManagedAccountId:6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
"0fdfd78c-258f-49ed-9e8c-faef9d6598fa"
 Response (status 401)

Status Code: 401; Unauthorized

 Response (status 500)
{
    "State": 500,
    "Msg": "Unknown workflow template 1be52876-aca2-4ece-ba31-11e0d98ddc19"
}

DeleteWorkflow

Removes workflow by Id

 GET https://<base-url>/DeleteWorkflow/7b2dee52-5781-49bf-9895-d6d2b2b43e2c

Headers:

ManagedAccountId:6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
true
 Response (status 401)

Status Code: 401; Unauthorized

RunWorkflow

Runs workflow

 POST https://<base-url>/Workflow

Body JSON structure:

RunMetadataApiDto

Body example 1 for running by default:

{   
   "workflowId": "0fdfd78c-258f-49ed-9e8c-faef9d6598fa"
}            

Body example 2 for running from start till block #2:

{   
   "workflowId": "0fdfd78c-258f-49ed-9e8c-faef9d6598fa",
   "runTillBlock": 2
}            

Body example 3 for running of blocks between #2 and #4:

{   
   "workflowId": "0fdfd78c-258f-49ed-9e8c-faef9d6598fa",
   "runFromBlock": 2,
   "runTillBlock": 4 
}             

Headers:

ManagedAccountId:6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
Workflow will now run
 Response (status 401)

Status Code: 401; Unauthorized

WorkflowScheduler

Runs workflow

 POST https://<base-url>/WorkflowScheduler

Body JSON structure:

UpdateWorkfowSchedulerApiDto

Body example:

{   
   "workflowId": "0fdfd78c-258f-49ed-9e8c-faef9d6598fa",
   "isScheduled": true,
   "scheduleFrequency": "{\"cronSchedule\":\"0 0/5 * ? * * *\"}"
}          

Headers:

ManagedAccountId:6fa122e4-0d4c-4a1d-8869-7c0a86a37bf1

Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMDAxZDFlZS1jOWUxLTRhMDctOTZkNi1hNTMyNGEzMjczY2UiLCJpc3MiOiJodHRwOi8vY2FudmFzdGVzdC5jb25uZWN0bXlhcHBzLmNvbSIsImlhdCI6MTY1MTA2ODk2OSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoibmF0YWxpYS55dWRuaWtvdmFAb3V0bG9vay5jb20iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNmZhMTIyZTQtMGQ0Yy00YTFkLTg4NjktN2MwYTg2YTM3YmYxIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJMb2dnZWRTdXBwb3J0ZWRCeUNtYSI6IlRydWUiLCJNYW5hZ2VkU3VwcG9ydGVkQnlDbWEiOiJUcnVlIiwiZXhwIjoxNjUxMDY5NTY5LCJhdWQiOiJjbWEtdXNlcnMifQ.v2Tbnw4bKuQSMAjtj36eVjrcMoE1vH93C6axpN9Y4wE

ManagedAccountId - is an optional header. You need to use it if you want to manage some account and get data to which account has access

 Response (status 200)
Workflow Scheduler enabled

or

Workflow Scheduler disabled
 Response (status 401)

Status Code: 401; Unauthorized

  • No labels