> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/tasks-2/task-executions.md).

# TaskExecutions

## Introduction

`TaskExecutions` represent concrete task instances for users or departments.

Executions are usually created from [TaskAssignments](/api-reference/tasks-2/task-assignments.md) and [TaskTemplates](/api-reference/tasks-2/task-templates.md).

The `deny_reason` and `delayed_reason` fields use the shared [Rich Text](/introduction/rich-text.md) HTML format.

## Model Definition

**Alias**

`taskExecution`

**Relations**

| Key                  | Relation                                                             | Type       | Relation Field(s)                        |
| -------------------- | -------------------------------------------------------------------- | ---------- | ---------------------------------------- |
| `taskProgressFields` | [TaskProgressFields](/api-reference/tasks-2/task-progress-fields.md) | Has many   | `task_progress_fields.task_execution_id` |
| `taskAssignment`     | [TaskAssignment](/api-reference/tasks-2/task-assignments.md)         | Belongs to | `task_assignment_id`                     |
| `taskTemplate`       | [TaskTemplate](/api-reference/tasks-2/task-templates.md)             | Belongs to | `task_template_id`                       |
| `taskStatus`         | `TaskStatus`                                                         | Belongs to | `task_status_id`                         |
| `user`               | [User](/api-reference/users.md)                                      | Belongs to | `user_id`                                |
| `department`         | [Department](/api-reference/departments.md)                          | Belongs to | `department_id`                          |
| `lastActivityUser`   | [User](/api-reference/users.md)                                      | Belongs to | `last_activity_user_id`                  |
| `parent`             | [TaskExecution](/api-reference/tasks-2/task-executions.md)           | Belongs to | `parent_id`                              |
| `children`           | [TaskExecutions](/api-reference/tasks-2/task-executions.md)          | Has many   | `parent_id`                              |

**Computed Properties**

* `hash` - Stable encoded representation used by execution links.
* `url` and `static_url` - Link to the execution page.
* `visibility_start_time`, `execution_start_time`, and `execution_end_time` - Time-window boundaries calculated from the assignment.
* `achieved_points` and `max_points` - Grade totals calculated from progress fields and child executions.

**Capabilities**

* [Targetables](/introduction/resource-capabilities/targetables.md) - Visibility and execution access derive from the parent assignment's users, departments, assignment mode, and active time window.
* [Entity Permissions](/introduction/resource-capabilities/entity-permissions.md) - Execution grants are managed internally; these endpoints do not accept client-controlled Entity Permissions.
* [URL Context](/introduction/resource-capabilities/url-context.md) - Execution URLs resolve to access-checked context information using the assignment or template title.
* [Translations](/introduction/resource-capabilities/translations.md) - The `deny_reason` and `delayed_reason` fields are translatable.

## Task Status Indicators

Possible values for `task_status_id`:

* `open`
* `in_progress`
* `in_progress_delayed`
* `done`
* `done_delayed`
* `denied`
* `missed`

## Admin: List

List executions accessible through administrable assignments, including soft-deleted records.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/tasks-2/executions`

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tasks-2/executions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 812,
    "user_id": 144,
    "department_id": 7,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "task_status_id": "open",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-07 09:00:00",
    "deleted_at": null
  },
  {
    "id": 813,
    "user_id": null,
    "department_id": 8,
    "task_assignment_id": 559,
    "task_template_id": 204,
    "task_status_id": "done_delayed",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-06 14:00:00",
    "deleted_at": null
  }
]
```

## Admin: Show

Show one execution, including a soft-deleted record or a temporary calculated execution.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/tasks-2/executions/{taskExecution}`

**Route Parameters**

| Parameter       | Type                  | Description                               |
| --------------- | --------------------- | ----------------------------------------- |
| `taskExecution` | `integer` \| `string` | Execution ID or temporary execution hash. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tasks-2/executions/812', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 812,
  "user_id": 144,
  "department_id": 7,
  "task_assignment_id": 558,
  "task_template_id": 203,
  "task_status_id": "open",
  "lang_id": "en-US",
  "for_execution_date": "2026-08-07 09:00:00",
  "deleted_at": null
}
```

## Admin: List by TaskAssignment

List calculated and persisted executions for an assignment and date range, including executions retained from previous assignment revisions.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/administration/tasks-2/assignments/{taskAssignmentWithTrashed}/executions`

**Route Parameters**

| Parameter                   | Type      | Description                            |
| --------------------------- | --------- | -------------------------------------- |
| `taskAssignmentWithTrashed` | `integer` | Current or soft-deleted assignment ID. |

**Request Keys**

| Key              | Type       | Description              |
| ---------------- | ---------- | ------------------------ |
| `period_start`\* | `datetime` | Start of the date range. |
| `period_end`\*   | `datetime` | End of the date range.   |

Keys with `*` are required.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/administration/tasks-2/assignments/558/executions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-07 00:00:00',
        'period_end' => '2026-08-08 23:59:59'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 812,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "task_status_id": "open",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-07 09:00:00"
  },
  {
    "id": 814,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "task_status_id": "done",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-08 09:00:00"
  }
]
```

## List by Date Range

List visible `TaskExecutions` within a date range.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions`

**Request Keys**

| Key            | Type       | Default | Description          |
| -------------- | ---------- | ------- | -------------------- |
| `period_start` | `datetime` | -       | Start of date range. |
| `period_end`   | `datetime` | -       | End of date range.   |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-07 00:00:00',
        'period_end' => '2026-08-07 23:59:59'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 812,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "lang_id": "en-US",
    "task_status_id": "open",
    "for_execution_date": "2026-08-07 09:00:00",
    "achieved_points": 0,
    "max_points": 0
  },
  {
    "id": 813,
    "task_assignment_id": 559,
    "task_template_id": 204,
    "lang_id": "en-US",
    "task_status_id": "in_progress",
    "for_execution_date": "2026-08-07 14:00:00",
    "achieved_points": 40,
    "max_points": 100
  }
]
```

## List by Assignment and Date Range

List visible `TaskExecutions` for one assignment within a date range.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/assignments/{taskAssignment}/executions`

**Route Parameters**

| Parameter        | Type      | Description        |
| ---------------- | --------- | ------------------ |
| `taskAssignment` | `integer` | TaskAssignment ID. |

**Request Keys**

| Key            | Type       | Default | Description          |
| -------------- | ---------- | ------- | -------------------- |
| `period_start` | `datetime` | -       | Start of date range. |
| `period_end`   | `datetime` | -       | End of date range.   |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/assignments/558/executions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-07 00:00:00',
        'period_end' => '2026-08-08 23:59:59'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 812,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "lang_id": "en-US",
    "task_status_id": "open"
  },
  {
    "id": 814,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "lang_id": "en-US",
    "task_status_id": "done",
    "for_execution_date": "2026-08-08 09:00:00"
  }
]
```

## Count

Count visible `TaskExecutions`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/count`

**Request Keys**

| Key              | Type       | Description                      |
| ---------------- | ---------- | -------------------------------- |
| `period_start`\* | `datetime` | Start of the counted date range. |
| `period_end`\*   | `datetime` | End of the counted date range.   |

Keys with `*` are required.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/count', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-07 00:00:00',
        'period_end' => '2026-08-07 23:59:59'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
12
```

## List Missed Executions

List missed and delayed in-progress executions relevant to the authenticated user.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/missed`

**Request Keys**

| Key                      | Type       | Default            | Description                                                  |
| ------------------------ | ---------- | ------------------ | ------------------------------------------------------------ |
| `period_start`           | `datetime` | User creation time | Start of the inspected range.                                |
| `period_end`             | `datetime` | Current time       | End of the inspected range.                                  |
| `latest_recursions_only` | `boolean`  | `true`             | Return only the latest recurrence for recurring assignments. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/missed', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-01 00:00:00',
        'period_end' => '2026-08-06 23:59:59',
        'latest_recursions_only' => false
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 790,
    "task_assignment_id": 550,
    "task_template_id": 200,
    "task_status_id": "missed",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-03 08:00:00"
  },
  {
    "id": 798,
    "task_assignment_id": 553,
    "task_template_id": 201,
    "task_status_id": "in_progress_delayed",
    "lang_id": "en-US",
    "for_execution_date": "2026-08-05 16:00:00"
  }
]
```

## Count Missed Executions

Count executions returned by the missed-executions query.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/missed/count`

**Request Keys**

| Key                      | Type       | Default            | Description                                                 |
| ------------------------ | ---------- | ------------------ | ----------------------------------------------------------- |
| `period_start`           | `datetime` | User creation time | Start of the inspected range.                               |
| `period_end`             | `datetime` | Current time       | End of the inspected range.                                 |
| `latest_recursions_only` | `boolean`  | `true`             | Count only the latest recurrence for recurring assignments. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/missed/count', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'period_start' => '2026-08-01 00:00:00',
        'period_end' => '2026-08-06 23:59:59',
        'latest_recursions_only' => false
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
2
```

## Show

Show one visible `TaskExecution`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/{taskExecution}`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/812', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 812,
  "task_assignment_id": 558,
  "task_template_id": 203,
  "lang_id": "en-US",
  "task_status_id": "open",
  "for_execution_date": "2026-08-07 09:00:00",
  "achieved_points": 0,
  "max_points": 0
}
```

## Create

Create a new `TaskExecution`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/tasks-2/executions`

**Request Keys**

| Key                    | Type       | Default | Description                                                              |
| ---------------------- | ---------- | ------- | ------------------------------------------------------------------------ |
| `task_assignment_id`\* | `integer`  | -       | Related [TaskAssignment](/api-reference/tasks-2/task-assignments.md) ID. |
| `task_template_id`\*   | `integer`  | -       | Related [TaskTemplate](/api-reference/tasks-2/task-templates.md) ID.     |
| `parent_id`            | `integer`  | `null`  | Parent TaskExecution ID for child executions.                            |
| `task_status_id`       | `string`   | `open`  | Initial status ID.                                                       |
| `for_execution_date`   | `datetime` | `null`  | Execution date/time.                                                     |

Keys with `*` are required.

**Behavior**

* `user_id` and `department_id` are derived from the authenticated user and the assignment's targeting; client-provided values cannot choose another recipient.
* `last_activity_user_id` is derived from authentication and the initial status.
* If an equivalent relevant execution already exists, the repository returns it instead of creating a duplicate.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/tasks-2/executions', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'task_assignment_id' => 558,
        'task_template_id' => 203
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "user_id": 144,
    "department_id": 7,
    "task_assignment_id": 558,
    "task_template_id": 203,
    "lang_id": "en-US",
    "task_status_id": "open"
  }
}
```

## Create from Composition

Create one execution for each permitted child assignment of a composition assignment.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/tasks-2/executions/composition`

**Request Keys**

| Key                    | Type      | Description                                                                               |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------- |
| `task_assignment_id`\* | `integer` | Composition-based parent [TaskAssignment](/api-reference/tasks-2/task-assignments.md) ID. |

Keys with `*` are required.

**Behavior**

* `user_id` and `department_id` are derived from the authenticated user and assignment targeting.
* Child assignments the real user cannot execute are skipped.
* Existing equivalent executions and children that cannot produce an execution are omitted from the returned collection.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/tasks-2/executions/composition', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'task_assignment_id' => 560
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": [
    {
      "id": 815,
      "user_id": 144,
      "department_id": 7,
      "task_assignment_id": 561,
      "task_template_id": 205,
      "task_status_id": "open",
      "lang_id": "en-US"
    },
    {
      "id": 816,
      "user_id": 144,
      "department_id": 7,
      "task_assignment_id": 562,
      "task_template_id": 206,
      "task_status_id": "open",
      "lang_id": "en-US"
    }
  ]
}
```

## Progress

Update the progress values of one `TaskExecution`.

**Definition**

<mark style="color:blue;">`PUT`</mark> `/api/tasks-2/executions/{taskExecution}/progress`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Request Keys**

| Key                                  | Type         | Default         | Description                                                                    |
| ------------------------------------ | ------------ | --------------- | ------------------------------------------------------------------------------ |
| `lang_id`                            | `string`     | system language | Language key stored with progress fields.                                      |
| `{field-key}`                        | `field type` | -               | Field value keyed by [TaskField](/api-reference/tasks-2/task-fields.md) `key`. |
| `{field-key}_additional_information` | `string`     | `null`          | Optional additional information for the field value.                           |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/tasks-2/executions/812/progress', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'lang_id' => 'en-US',
        'comment' => 'Started checklist'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "lang_id": "en-US",
    "task_status_id": "in_progress"
  }
}
```

## Finish

Finish one `TaskExecution`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/tasks-2/executions/{taskExecution}/progress/finish`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Request Keys**

| Key                                  | Type         | Default         | Description                                                                    |
| ------------------------------------ | ------------ | --------------- | ------------------------------------------------------------------------------ |
| `lang_id`                            | `string`     | system language | Language key stored with progress fields.                                      |
| `{field-key}`                        | `field type` | -               | Field value keyed by [TaskField](/api-reference/tasks-2/task-fields.md) `key`. |
| `{field-key}_additional_information` | `string`     | `null`          | Optional additional information for the field value.                           |
| `delayed_reason`                     | `string`     | `null`          | Delayed reason if delayed-state completion requires it.                        |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/tasks-2/executions/812/progress/finish', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'lang_id' => 'en-US',
        'comment' => 'Checklist completed'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "lang_id": "en-US",
    "task_status_id": "done"
  }
}
```

## Deny

Deny one `TaskExecution`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/tasks-2/executions/{taskExecution}/deny`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Request Keys**

| Key           | Type     | Default         | Description                                                |
| ------------- | -------- | --------------- | ---------------------------------------------------------- |
| `lang_id`     | `string` | system language | Language key for the translated denial reason.             |
| `deny_reason` | `string` | `null`          | Deny reason (required when assignment policy requires it). |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/tasks-2/executions/812/deny', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'lang_id' => 'en-US',
        'deny_reason' => '<p>Equipment unavailable.</p>'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "lang_id": "en-US",
    "task_status_id": "denied",
    "deny_reason": "<p>Equipment unavailable.</p>"
  }
}
```

## Reset

Reset one `TaskExecution`.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/tasks-2/executions/{taskExecution}/reset`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/tasks-2/executions/812/reset', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "lang_id": "en-US",
    "task_status_id": "in_progress"
  }
}
```

## Update State

Update the status of one `TaskExecution`.

**Definition**

<mark style="color:blue;">`PUT`</mark> `/api/tasks-2/executions/{taskExecution}/status`

**Route Parameters**

| Parameter       | Type      | Description       |
| --------------- | --------- | ----------------- |
| `taskExecution` | `integer` | TaskExecution ID. |

**Request Keys**

| Key                | Type     | Default | Description         |
| ------------------ | -------- | ------- | ------------------- |
| `task_status_id`\* | `string` | -       | New task status ID. |

Keys with `*` are required.

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/tasks-2/executions/812/status', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'task_status_id' => 'in_progress'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 812,
    "lang_id": "en-US",
    "task_status_id": "in_progress"
  }
}
```

## List Previous Workflow Nodes

List previous workflow nodes for one `TaskAssignment`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/{taskAssignment}/workflow-nodes/previous`

**Route Parameters**

| Parameter        | Type      | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| `taskAssignment` | `integer` | TaskAssignment ID used as workflow root. |

**Request Keys**

| Key      | Type      | Default | Description                                                   |
| -------- | --------- | ------- | ------------------------------------------------------------- |
| `levels` | `integer` | `0`     | Maximum levels to resolve (`0` resolves all previous levels). |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/558/workflow-nodes/previous', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => ['levels' => 2]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 9001,
    "type": "taskExecutionFinished",
    "level": 1,
    "dispatchable_id": 812,
    "dispatchable_type": "taskExecution"
  },
  {
    "id": 9000,
    "type": "formMessageSent",
    "level": 2,
    "dispatchable_id": 301,
    "dispatchable_type": "formMessage"
  }
]
```

## Show Previous Workflow Node

Show one previous workflow node for a `TaskAssignment`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/{taskAssignment}/workflow-nodes/previous/{level}`

**Route Parameters**

| Parameter        | Type      | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| `taskAssignment` | `integer` | TaskAssignment ID used as workflow root. |
| `level`          | `integer` | Previous workflow level to return.       |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/558/workflow-nodes/previous/1', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 9001,
  "type": "taskExecutionFinished",
  "level": 1,
  "dispatchable_id": 812,
  "dispatchable_type": "taskExecution"
}
```

## Show Previous Workflow Node Dispatchable

Show the dispatchable entity of one previous workflow node.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/tasks-2/executions/{taskAssignment}/workflow-nodes/previous/{level}/dispatchable`

**Route Parameters**

| Parameter        | Type      | Description                                             |
| ---------------- | --------- | ------------------------------------------------------- |
| `taskAssignment` | `integer` | TaskAssignment ID used as workflow root.                |
| `level`          | `integer` | Previous workflow level whose dispatchable is returned. |

**Request Keys**

| Key       | Type     | Default | Description                                |
| --------- | -------- | ------- | ------------------------------------------ |
| `include` | `string` | -       | Optional result-control include parameter. |
| `appends` | `string` | -       | Optional result-control appends parameter. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/tasks-2/executions/558/workflow-nodes/previous/1/dispatchable', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'query' => [
        'include' => 'taskTemplate:id,title|taskAssignment:id,title',
        'appends' => 'visibility_start_time'
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 812,
  "task_assignment_id": 558,
  "task_template_id": 203,
  "task_status_id": "done",
  "visibility_start_time": "2026-04-29 08:45:00",
  "task_template": {
    "id": 203,
    "title": "Safety Checklist"
  },
  "task_assignment": {
    "id": 558,
    "title": "Morning Shift"
  }
}
```
