Skip to main content

PUT - Merge Task execution series

Merge Task execution series

Request

  • Method: PUT
  • Endpoint: /task-executions/{scheduledTaskId}/series
  • Base URL: https://api.targpatrol.com/api/v1
  • Operation ID: merge-task-execution-series

Authorization

This endpoint requires an external API key.

x-api-key: {your_external_api_key}

Parameters

NameInRequiredSchemaDescription
scheduledTaskIdpathyesstringresource unique id

Request Body

Required: yes Content-Type: application/json Schema: TaskExecutionSeriesRequest

Schema
{
"$ref": "#/components/schemas/TaskExecutionSeriesRequest"
}

Example: example-1

{
"seriesId": "475c2d64-b564-4f17-9833-ac3793ee43b4",
"recurrence": {
"rule": "FREQ=DAILY;UNTIL=20230309T210000Z",
"exception": "20230307T210000Z,20230309T210000Z"
},
"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,
"published": 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": [
{
"seriesId": "a5f2b3e4-3e38-4a37-9177-a6340b291bf0",
"pointId": "9facfd8e-1fe3-4449-80be-1003bcf238a2",
"stepGroupId": "574d8506-79cc-4b6d-a5de-c3be73235fd1",
"name": "step 1",
"order": 0,
"actions": [
{
"seriesId": "f359914d-20d2-4bfc-9a3f-87cec4f5ebe0",
"name": "action 1",
"type": "BOOLEAN",
"order": 0
},
{
"seriesId": "198d2b6a-3974-48d7-bc0e-f0a88b49e10c",
"name": "action 2",
"type": "TEXT",
"order": 1
}
]
}
]
}

Responses

200 OK

Content-Type: application/json Schema: TaskExecutionMergeSeriesResponse

Schema
{
"$ref": "#/components/schemas/TaskExecutionMergeSeriesResponse"
}

Example: example-1

{
"updatingSeriesId": "475c2d64-b564-4f17-9833-ac3793ee43b4",
"createdSeriesId": "d6f4c4ff-f402-45b2-b7d7-b009fd16e44d"
}

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"
}

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"
}