PUT - Merge Task execution
Merge task executions
Request
- Method:
PUT - Endpoint:
/task-executions/{scheduledTaskId} - Base URL:
https://api.targpatrol.com/api/v1 - Operation ID:
merge-task-execution
Authorization
This endpoint requires an external API key.
x-api-key: {your_external_api_key}
Parameters
| Name | In | Required | Schema | Description |
|---|---|---|---|---|
scheduledTaskId | path | yes | string | resource unique id |
Request Body
Required: yes
Content-Type: application/json
Schema: TaskExecutionRequest
Schema
{
"$ref": "#/components/schemas/TaskExecutionRequest"
}
Example: example-1
{
"assigneeIds": [
"4f9e4741-3069-4a03-8386-5f3ee45791aa"
],
"locationId": "03864752-f177-47ff-b0a1-99d75b02d954",
"name": "task 1",
"description": null,
"startAt": "2023-03-06T18:00:00.000Z",
"endAt": "2023-03-06T21:00:00.000Z",
"priority": "MAJOR",
"orderStepsRequired": true,
"strictTimeRequired": false,
"deadlined": false,
"tags": [
"task 1"
],
"stepGroups": [
{
"id": "574d8506-79cc-4b6d-a5de-c3be73235fd1",
"name": "Ground floor",
"description": "Steps that should be completed on the ground floor.",
"color": "#EAAA08",
"order": 0,
"collapsedByDefault": false
}
],
"steps": [
{
"id": "61aac9c7-e128-428c-a9b5-40d9593013ec",
"pointId": "9facfd8e-1fe3-4449-80be-1003bcf238a2",
"stepGroupId": "574d8506-79cc-4b6d-a5de-c3be73235fd1",
"name": "step 1",
"order": 0,
"actions": [
{
"id": "ff56c5d4-8932-44f0-9d7c-50ff66ab9cb5",
"name": "action 1",
"type": "BOOLEAN",
"order": 0
},
{
"id": null,
"name": "action 2",
"type": "TEXT",
"order": 1
}
]
}
]
}
Responses
200 OK
Content-Type: application/json
Schema: TaskExecutionInfoResponse
Schema
{
"$ref": "#/components/schemas/TaskExecutionInfoResponse"
}
Example: example-1
{
"id": "e30fc67c-f946-414a-b4f9-423eabb90534",
"scheduledTaskId": "d6f4c4ff-f402-45b2-b7d7-b009fd16e44d",
"performerId": "8fa4464d-5c26-49a2-934c-84226ec83caa",
"assigneeIds": [
"3467d855-5478-41a9-b192-5e41b9cbd87d",
"f3e03f65-d557-405d-ac89-a4d3054b8578"
],
"name": "Task 1",
"state": "IN_PROGRESS",
"status": "SUCCESS",
"startAt": "2023-03-07T05:00:00.000Z",
"endAt": "2023-03-07T10:00:00.000Z",
"startedAt": "2023-03-07T05:00:00.000Z",
"endedAt": "2023-03-07T10:00:00.000Z",
"errorCount": 0,
"warningCount": 0,
"priority": "NORMAL",
"seriesId": "c0211758-6c24-4fd5-b932-7a0afc7c08a4",
"assigned": true,
"deadlined": false,
"published": true,
"edited": false,
"stepCount": 10,
"executedStepCount": 3
}
400 Bad request
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "invalid input data",
"code": "input.data.invalid",
"timestamp": "2023-03-06T18:38:28.788Z",
"details": [
{
"message": "multiple resources not allowed",
"code": "multiple.resources.not.allowed"
}
]
}
401 Unauthorized
406 Not Acceptable
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "mismatch in the types of content",
"code": "not.acceptable",
"timestamp": "2023-03-07T05:57:59.315Z"
}
500 Internal Server Error
Content-Type: application/json
Schema: ErrorResponse
Schema
{
"$ref": "#/components/schemas/ErrorResponse"
}
Example: example-1
{
"message": "internal server error",
"code": "internal.server.error",
"timestamp": "2023-03-07T05:57:59.315Z"
}