Skip to main content

PATCH - Patch update Task Execution

Patch update task execution

Request

  • Method: PATCH
  • Endpoint: /task-executions/{scheduledTaskId}
  • Base URL: https://api.targpatrol.com/api/v1
  • Operation ID: patch-update-task-execution

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: TaskExecutionPatchRequest

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

Example: example-1

{
"startAt": "2023-03-06T18:00:00.000Z",
"endAt": "2023-03-06T21:00:00.000Z"
}

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