Reference: Tasks
URL Endpoint
https://api.adaptiveinsights.com/api/rest/tasks/v1/<tenant>/tasks?instanceCode=<instanceCode>
Version: v1
Category | Integration task trigger, and retrieve task details including task run. |
Description | JSON based HTTP operations on integration tasks. |
Permissions Required to Invoke | Data Designer, Integration Operator |
Parameters Required on Request | GET, POST: integration task id, integration task run id |
Supported HTTP VERB(s)
HTTP Verb | Single Resource | Collection Resource | Description |
|---|---|---|---|
GET | Supported | Supported | Retrieve task information. Retrieve task run details. |
POST | Supported | Not Supported | Trigger an integration task. |
GET <TASK DETAILS>
Retrieve Task Details
- Request URI
- /api/rest/v1/{tenant}/tasks: Retrieves the details of integration tasks defined in the instance.Retrieves all integration tasks of the tenant.Sample Request URI:https://api.adaptiveinsights.com/api/rest/tasks/v1/<tenant>/tasks?instanceCode=<instanceCode>Sample Request HeaderAuthorization: Basic or Token basedSample Request BodyN/APath ParametersNameDescriptiontenantThe customer instance codeQuery ParametersNameDescriptionRequiredlimitThe number of integration tasks to include in the result.
- type: number
- min: 1
- max: 100
- example: limit=50
NoffsetThe number of tasks to skip before starting to include tasks in the results.- min: 0
- example: offset=0
NtaskTypeFilter the retrieved tasks by their task type.- Integration
- example: taskType=integration
NResponseList of tasksSample successful tasks GET ResponseHTTP/1.1 200 Ok Content-Type: application/json { "count": 3, "data": [ { "id": "integration4", "taskType": "integration", "name": "An Integration Task" }, { "id": "integration111", "taskType": "integration", "name": "Another Integration Task" }, { "id": "integration43", "taskType": "integration", "name": "Also Another Integration Task" } ] }Response PayloadnamedescriptioncountThe total number of customer integration tasks (not just those included in this response).Type: numberdataA collection of integration tasks.- Type: Array
- Type definition:
- Id: The integration task’s unique identifier.
- Name: The integration task’s name.
Unsuccessful Response
Where the response payload isSample bad tasks request response{ "type" : "validation-error", "title": "invalid request", "errors" : [ { "message" : "must be a non-negative integer", "parameter" : "offset" }, { "message" : "must be positive integer no greater than 100", "parameter" : "limit" }, { "message" : "must be a valid task type", "parameter" : "kind" } ] }Response PayloadNameDescriptiontypeThe type of error.titleText describing the error.errorsA collection of errors found in the request.- Type: array
- Type definition:
- message: A message describing the error.
- parameter: The parameter to which the error is related.
POST
Trigger Task Run
- Request URI
- Trigger a run of the task represented by the passed task identifier./{taskId}/runsSample Request URI:https://api.adaptiveinsights.com/api/rest/tasks/v1/{tenant}/tasks/integration111/runs?instanceCode=<instanceCode>In this example, the taskId is integration111.Sample Request HeaderAuthorization: Basic or Token basedContent-Type: application/jsonSample Request BodyRequest body required. It must not be empty.Request Body{ }Path ParameterNameDescriptionRequiredtaskIdThe task id of the task being triggered.YSample ResponseSuccessful Trigger Task Run ResponseHTTP/1.1 201 Created Content-Type: application/json { "id": "taskrun456", "status": "Completed" }
GET <TASK RUN DETAILS>
Retrieve Task Run Details
- Request URI
- Retrieve the details of the task run represented by the passed task identifier./{taskId}/runs/{taskRunId}Sample Request URI:https://api.adaptiveinsights.com/api/rest/tasks/v1/{tenant}/tasks/integration111/runs/taskrun456?instanceCode=<instanceCode>In this example, we use these IDs:IDValuetaskIdintegration111taskRunIdtaskrun456Path ParametersNameDescriptiontaskIdThe unique identifier of the integration task that was run.taskRunIdThe unique identifier of the task run.Sample ResponseSuccessful Get Task Run Response{ "id": "taskrun456", "status": "Completed" }Response PayloadNameDescriptionidThe unique identifier of this integration task run.statusThe task run’s status, either:
- None
- Pending
- InProgress
- Canceling
- Canceled
- Completed
- Failed