Skip to main content

GET - Get task executions by id

Get task executions by id

Request

  • Method: GET
  • Endpoint: /task-executions/{scheduledTaskId}
  • Base URL: https://api.targpatrol.com/api/v1
  • Operation ID: get-task-executions-by-id

Authorization

This endpoint requires an external API key.

x-api-key: {your_external_api_key}

Parameters

NameInRequiredSchemaDescription
scheduledTaskIdpathyesstringresource unique id

Responses

200 OK

Content-Type: application/json Schema: Array<TaskExecutionResponse>

Schema
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TaskExecutionResponse"
}
}

Example: example-1

[
{
"id": "42f17f21-3ca4-4026-b578-4db633486a75",
"scheduledTaskId": "242dcdf8-4de9-4d5a-9edf-596ca26c7a33",
"scheduledTaskHistoryId": 242,
"executedTaskId": "2f33ac6d-9ac3-4cc5-b4b6-a3e421e8a206",
"name": "task 1",
"description": null,
"locationId": "9ee9b6c4-9124-48a7-93ef-739f94d49b9a",
"locationHistoryId": 11,
"assigneeIds": [
{
"id": "ce2300e2-2515-41ec-862b-e96b6c6e2756",
"seen": true
}
],
"performerId": "ce2300e2-2515-41ec-862b-e96b6c6e2756",
"performerHistoryId": 45,
"status": "ERROR",
"state": "IN_PROGRESS",
"published": false,
"startAt": "2023-03-07T05:57:59.315Z",
"endAt": "2023-03-07T05:57:59.315Z",
"startedAt": "2023-03-07T05:57:59.315Z",
"endedAt": null,
"seriesId": null,
"recurrence": {
"rule": "FREQ=DAILY;UNTIL=20230309T210000Z",
"exception": "20230307T210000Z,20230309T210000Z"
},
"executedStepCount": 1,
"orderStepsRequired": false,
"strictTimeRequired": false,
"deadlined": false,
"priority": "NORMAL",
"tags": [],
"edited": false,
"deleted": false,
"editedAt": "2023-07-07T09:04:35.619Z",
"stepCount": 1,
"warningCount": 0,
"errorCount": 0,
"favorite": false,
"warnings": [],
"errors": [],
"steps": [
{
"id": "7ab2df67-d552-4c3a-b0fd-6057c9481caf",
"name": "name1",
"pointId": "cb7b6e14-43e3-4321-aa29-e6d9a557b228",
"pointHistoryId": 34,
"order": 0,
"actualOrder": 1,
"status": "SUCCESS",
"state'": "COMPLETED",
"keptOrder": true,
"executionWarnings": [],
"executionErrors": [],
"actions": [
{
"id": "875c1068-e1ac-4b45-a520-6006a19e7fb5",
"name": "action 1",
"type": "NUMBER",
"order": 0,
"actualOrder": 0,
"status": "ERROR",
"state": "COMPLETED",
"completedAt": "2023-03-07T05:58:59.315Z",
"hasMedia": null,
"executionWarnings": [],
"executionErrors": []
}
]
},
{
"id": "93695b6b-155f-4a84-8108-94ae0ef08564",
"name": "step 2",
"pointId": "5b277402-8e9a-4cd6-85f7-e019673926ff",
"pointHistoryId": 46,
"order": 1,
"actualOrder": null,
"status": null,
"state": null,
"startedAt": null,
"endedAt": null,
"keptOrder": true,
"actions": [],
"executionWarnings": [],
"executionErrors": []
}
]
}
]

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-07T05:57:59.315Z",
"details": [
{
"message": "invalid data type",
"code": "data.type.invalid",
"identifier": "id",
"args": [
"[UUID]"
]
}
]
}

401 Unauthorized

404 Not Found

Content-Type: application/json Schema: ErrorResponse

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

Example: example-1

{
"message": "resource wasn't found",
"code": "not.found",
"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"
}