# Kestra

> Run your Kestra flows: execute flows with inputs and wait for them, restart, kill, pause, resume and replay executions, read their logs and outputs, save flows from YAML, set KV pairs, send to webhooks, and start a workflow when an execution fails, succeeds or is stuck.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/kestra

## Actions

### Create or update flow

Save a flow from its YAML, as Kestra's editor does: it's created, or the flow with the namespace and ID the YAML names is updated to a new revision.

**Inputs**

- Flow YAML (`source`, text, required): The whole flow, starting with its id and namespace, such as id: hello, namespace: company.team, then its tasks.

**Outputs**

- `created` (true/false): Whether it was made, there being none with that ID
- `description` (text): Its description; empty if none
- `disabled` (true/false): Whether it's disabled, so its triggers start nothing
- `id` (text): The flow's ID
- `inputs` (list): The inputs an execution takes
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the flow in Kestra
- `namespace` (text): Its namespace
- `outputs` (list): The IDs of the outputs it gives
- `revision` (number): Its revision: 1, then one more each time it's changed
- `source` (text): The flow's YAML
- `tasks` (list): The IDs of its tasks, in order
- `triggers` (list): Its triggers
- `updated` (text): When it was last changed (ISO 8601)
- `webhook_key` (text): The key of its Webhook trigger, which Send to webhook uses; empty if it has none

**Example output**

```json
{
  "created": false,
  "description": "Loads yesterday's orders into the warehouse.",
  "disabled": false,
  "id": "nightly_load",
  "inputs": [
    {
      "default": "2026-01-31",
      "description": "The day to load",
      "id": "date",
      "required": false,
      "type": "DATE"
    }
  ],
  "labels": {
    "team": "data"
  },
  "link": "https://kestra.example.com/ui/main/flows/edit/company.team/nightly_load",
  "namespace": "company.team",
  "outputs": [
    "rows_loaded"
  ],
  "revision": 4,
  "source": "id: nightly_load\nnamespace: company.team\ndescription: Loads yesterday's orders into the warehouse.\ninputs:\n  - id: date\n    type: DATE\n    defaults: 2026-01-31\ntasks:\n  - id: extract\n    type: io.kestra.plugin.core.log.Log\n    message: Extracting {{ inputs.date }}\n",
  "tasks": [
    "extract",
    "load"
  ],
  "triggers": [
    {
      "id": "daily",
      "type": "io.kestra.plugin.core.trigger.Schedule"
    }
  ],
  "updated": "2026-01-30T17:12:03.646Z",
  "webhook_key": ""
}
```

### Delete execution

Delete an execution that has ended, with its logs, metrics and files. One that isn't there is left as it is.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was none
- `execution_id` (text): The execution's ID

**Example output**

```json
{
  "deleted": true,
  "execution_id": "6sDiykZYUwoOx7RzWGsgeq"
}
```

### Delete flow

Delete a flow. Its past executions stay in Kestra. One that isn't there is left as it is.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was none
- `flow_id` (text): The flow's ID
- `namespace` (text): The flow's namespace

**Example output**

```json
{
  "deleted": true,
  "flow_id": "nightly_load",
  "namespace": "company.team"
}
```

### Delete KV pair

Delete a KV pair from a namespace's KV store. One that isn't there is left as it is.

**Inputs**

- Namespace (`namespace`, text, required): The namespace the KV pair is in, such as company.team.
- Key (`key`, text, required): The KV pair's key: letters, numbers, dots, dashes and underscores, such as last_loaded_date.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was none
- `key` (text): The key
- `namespace` (text): The namespace

**Example output**

```json
{
  "deleted": true,
  "key": "last_loaded_date",
  "namespace": "company.team"
}
```

### Disable flow

Disable a flow, so its schedules and other triggers start nothing until it's enabled. Executions already going carry on.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.

**Outputs**

- `changed` (true/false): Whether it changed; false if it was already so
- `description` (text): Its description; empty if none
- `disabled` (true/false): Whether it's disabled, so its triggers start nothing
- `id` (text): The flow's ID
- `inputs` (list): The inputs an execution takes
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the flow in Kestra
- `namespace` (text): Its namespace
- `outputs` (list): The IDs of the outputs it gives
- `revision` (number): Its revision: 1, then one more each time it's changed
- `tasks` (list): The IDs of its tasks, in order
- `triggers` (list): Its triggers
- `updated` (text): When it was last changed (ISO 8601)
- `webhook_key` (text): The key of its Webhook trigger, which Send to webhook uses; empty if it has none

**Example output**

```json
{
  "changed": true,
  "description": "Loads yesterday's orders into the warehouse.",
  "disabled": true,
  "id": "nightly_load",
  "inputs": [
    {
      "default": "2026-01-31",
      "description": "The day to load",
      "id": "date",
      "required": false,
      "type": "DATE"
    }
  ],
  "labels": {
    "team": "data"
  },
  "link": "https://kestra.example.com/ui/main/flows/edit/company.team/nightly_load",
  "namespace": "company.team",
  "outputs": [
    "rows_loaded"
  ],
  "revision": 4,
  "tasks": [
    "extract",
    "load"
  ],
  "triggers": [
    {
      "id": "daily",
      "type": "io.kestra.plugin.core.trigger.Schedule"
    }
  ],
  "updated": "2026-01-30T17:12:03.646Z",
  "webhook_key": ""
}
```

### Enable flow

Enable a disabled flow, so its schedules and other triggers start executions again.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.

**Outputs**

- `changed` (true/false): Whether it changed; false if it was already so
- `description` (text): Its description; empty if none
- `disabled` (true/false): Whether it's disabled, so its triggers start nothing
- `id` (text): The flow's ID
- `inputs` (list): The inputs an execution takes
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the flow in Kestra
- `namespace` (text): Its namespace
- `outputs` (list): The IDs of the outputs it gives
- `revision` (number): Its revision: 1, then one more each time it's changed
- `tasks` (list): The IDs of its tasks, in order
- `triggers` (list): Its triggers
- `updated` (text): When it was last changed (ISO 8601)
- `webhook_key` (text): The key of its Webhook trigger, which Send to webhook uses; empty if it has none

**Example output**

```json
{
  "changed": true,
  "description": "Loads yesterday's orders into the warehouse.",
  "disabled": false,
  "id": "nightly_load",
  "inputs": [
    {
      "default": "2026-01-31",
      "description": "The day to load",
      "id": "date",
      "required": false,
      "type": "DATE"
    }
  ],
  "labels": {
    "team": "data"
  },
  "link": "https://kestra.example.com/ui/main/flows/edit/company.team/nightly_load",
  "namespace": "company.team",
  "outputs": [
    "rows_loaded"
  ],
  "revision": 4,
  "tasks": [
    "extract",
    "load"
  ],
  "triggers": [
    {
      "id": "daily",
      "type": "io.kestra.plugin.core.trigger.Schedule"
    }
  ],
  "updated": "2026-01-30T17:12:03.646Z",
  "webhook_key": ""
}
```

### Execute flow

Start an execution of a flow with the inputs and labels you give, as Kestra's Execute button does, and wait for it to end if you ask.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.
- Inputs (`inputs`, object): The flow's inputs by ID, such as {"date": "2026-01-31"}. Leave blank for the flow's defaults.
- Labels (`labels`, object): Labels to add to the execution, such as {"source": "lodol"}, to find it by later.
- Wait up to (minutes) (`wait_minutes`, number): Wait for it to end or pause, up to this many minutes (at most 15), and get its outputs. Leave blank or 0 to start it and carry on. From 0 to 15.

**Outputs**

- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `outputs` (object): The flow's outputs, once it has ended; empty before
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `timed_out` (true/false): Whether the wait ran out before it ended or paused
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did
- `waited_seconds` (number): How long the step waited, in seconds

**Example output**

```json
{
  "duration_seconds": 0.0,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "outputs": {},
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "CREATED",
  "state_since": "2026-01-31T06:00:00.817Z",
  "task_runs": [],
  "timed_out": false,
  "trigger_type": "",
  "waited_seconds": 0
}
```

### Get execution

Get an execution's state, inputs, labels and task runs, with the tasks that failed.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "duration_seconds": 71.628,
  "end_date": "2026-01-31T06:01:12.445Z",
  "failed_tasks": [],
  "finished": true,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "SUCCESS",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### Get execution logs

Get an execution's log, its last lines oldest first, with the last error it logged.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.
- Lowest level (`min_level`, text): Leave out lines below this level. Defaults to Info. One of: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`. Default: `INFO`.
- Task (`task_id`, text): Only the lines of the task with this ID, such as load. Leave blank for every task.
- How many lines (`limit`, number): The most lines to get, the last ones, 1 to 2000. Defaults to 200. From 1 to 2000.

**Outputs**

- `count` (number): How many lines there are
- `error` (text): What went wrong: the first error line of the last task that logged errors; empty if none
- `execution_id` (text): The execution's ID
- `lines` (list): The log lines, oldest first
- `link` (text): A link to the execution in Kestra
- `log` (text): The lines as text, one a line
- `truncated` (true/false): Whether earlier lines were left out

**Example output**

```json
{
  "count": 2,
  "error": "Connection refused: warehouse:5432",
  "execution_id": "6sDiykZYUwoOx7RzWGsgeq",
  "lines": [
    {
      "level": "INFO",
      "message": "Extracted 1250 rows",
      "task_id": "extract",
      "timestamp": "2026-01-31T06:00:01.690Z"
    },
    {
      "level": "ERROR",
      "message": "Connection refused: warehouse:5432",
      "task_id": "load",
      "timestamp": "2026-01-31T06:00:41.359Z"
    }
  ],
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "log": "2026-01-31T06:00:01.690Z INFO extract: Extracted 1250 rows\n2026-01-31T06:00:41.359Z ERROR load: Connection refused: warehouse:5432",
  "truncated": false
}
```

### Get execution outputs

Get the outputs an execution's flow gives, and those of each task, such as a row count or a file's address.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `execution_id` (text): The execution's ID
- `link` (text): A link to the execution in Kestra
- `outputs` (object): The flow's outputs, by output ID
- `state` (text): The execution's state
- `task_outputs` (object): Each task's outputs, by task ID (the last run of each)
- `tasks` (list): Each task run that gave outputs

**Example output**

```json
{
  "execution_id": "6sDiykZYUwoOx7RzWGsgeq",
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "outputs": {
    "rows_loaded": 1250
  },
  "state": "SUCCESS",
  "task_outputs": {
    "count": {
      "value": "1250"
    }
  },
  "tasks": [
    {
      "outputs": {
        "value": "1250"
      },
      "task_id": "count",
      "task_run_id": "1rQlFhrSg4G3dzOYiYPgYY"
    }
  ]
}
```

### Get flow

Get a flow with its YAML source, its inputs and outputs, its triggers and its webhook key.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.

**Outputs**

- `description` (text): Its description; empty if none
- `disabled` (true/false): Whether it's disabled, so its triggers start nothing
- `id` (text): The flow's ID
- `inputs` (list): The inputs an execution takes
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the flow in Kestra
- `namespace` (text): Its namespace
- `outputs` (list): The IDs of the outputs it gives
- `revision` (number): Its revision: 1, then one more each time it's changed
- `source` (text): The flow's YAML
- `tasks` (list): The IDs of its tasks, in order
- `triggers` (list): Its triggers
- `updated` (text): When it was last changed (ISO 8601)
- `webhook_key` (text): The key of its Webhook trigger, which Send to webhook uses; empty if it has none

**Example output**

```json
{
  "description": "Loads yesterday's orders into the warehouse.",
  "disabled": false,
  "id": "nightly_load",
  "inputs": [
    {
      "default": "2026-01-31",
      "description": "The day to load",
      "id": "date",
      "required": false,
      "type": "DATE"
    }
  ],
  "labels": {
    "team": "data"
  },
  "link": "https://kestra.example.com/ui/main/flows/edit/company.team/nightly_load",
  "namespace": "company.team",
  "outputs": [
    "rows_loaded"
  ],
  "revision": 4,
  "source": "id: nightly_load\nnamespace: company.team\ndescription: Loads yesterday's orders into the warehouse.\ninputs:\n  - id: date\n    type: DATE\n    defaults: 2026-01-31\ntasks:\n  - id: extract\n    type: io.kestra.plugin.core.log.Log\n    message: Extracting {{ inputs.date }}\n",
  "tasks": [
    "extract",
    "load"
  ],
  "triggers": [
    {
      "id": "daily",
      "type": "io.kestra.plugin.core.trigger.Schedule"
    }
  ],
  "updated": "2026-01-30T17:12:03.646Z",
  "webhook_key": ""
}
```

### Get KV pair

Get the value of a KV pair in a namespace's KV store, which flows read with kv().

**Inputs**

- Namespace (`namespace`, text, required): The namespace the KV pair is in, such as company.team.
- Key (`key`, text, required): The KV pair's key: letters, numbers, dots, dashes and underscores, such as last_loaded_date.

**Outputs**

- `key` (text): The key
- `namespace` (text): The namespace it's in
- `revision` (number): Its revision: 1, then one more each time it's set
- `type` (text): What Kestra keeps it as: STRING, NUMBER, BOOLEAN, DATETIME, DATE, DURATION or JSON
- `updated` (text): When it was last set (ISO 8601)
- `value` (object): Its value: text, a number, a switch, a date, a list or an object
- `value_text` (text): Its value as text: text as it is, anything else as JSON

**Example output**

```json
{
  "key": "last_loaded_date",
  "namespace": "company.team",
  "revision": 3,
  "type": "DATE",
  "updated": "2026-01-31T06:01:12.445Z",
  "value": "2026-01-31",
  "value_text": "2026-01-31"
}
```

### Kill execution

Kill an execution that hasn't ended, with the subflows it started. One that has ended is left as it is.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `changed` (true/false): Whether it changed; false if there was nothing to do
- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "changed": true,
  "duration_seconds": 71.628,
  "end_date": "2026-01-31T06:01:12.445Z",
  "failed_tasks": [],
  "finished": true,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "KILLED",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### List flows

List flows by namespace and ID, with each one's inputs, outputs, triggers and whether it's disabled.

**Inputs**

- Namespace (`namespace`, text): Only this namespace and those inside it, such as company for company.team too. Leave blank for all.
- Search (`search`, text): Only flows whose ID, namespace or description has this text, such as load.
- How many (`limit`, number): The most flows to list, 1 to 200. Defaults to 25. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `flows` (list): The flows, by namespace and ID

**Example output**

```json
{
  "count": 1,
  "flows": [
    {
      "description": "Loads yesterday's orders into the warehouse.",
      "disabled": false,
      "id": "nightly_load",
      "inputs": [
        {
          "default": "2026-01-31",
          "description": "The day to load",
          "id": "date",
          "required": false,
          "type": "DATE"
        }
      ],
      "labels": {
        "team": "data"
      },
      "link": "https://kestra.example.com/ui/main/flows/edit/company.team/nightly_load",
      "namespace": "company.team",
      "outputs": [
        "rows_loaded"
      ],
      "revision": 4,
      "tasks": [
        "extract",
        "load"
      ],
      "triggers": [
        {
          "id": "daily",
          "type": "io.kestra.plugin.core.trigger.Schedule"
        }
      ],
      "updated": "2026-01-30T17:12:03.646Z",
      "webhook_key": ""
    }
  ]
}
```

### List namespaces

List Kestra's namespaces by name, those with flows and those holding them.

**Inputs**

- Search (`search`, text): Only namespaces whose name has this text, such as team.
- How many (`limit`, number): The most namespaces to list, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many are listed
- `namespaces` (list): The namespaces, by name

**Example output**

```json
{
  "count": 2,
  "namespaces": [
    "company",
    "company.team"
  ]
}
```

### Pause execution

Pause a running execution: tasks running now finish, and no new ones start until it's resumed. One that isn't running is left as it is.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `changed` (true/false): Whether it changed; false if there was nothing to do
- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "changed": true,
  "duration_seconds": 71.628,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "PAUSED",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### Replay execution

Start a new execution from an old one, with the same inputs, from its first task or the task you name, as Kestra's Replay does. The old one stays as it is.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.
- From task (`from_task`, text): The ID of the task to start from, such as load: the tasks before it keep their old results. Leave blank to run it all again.

**Outputs**

- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `replayed_from` (text): The ID of the execution it replays
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "duration_seconds": 71.628,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "4Dmf4LkSlaaJeEUkyVZVud",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/4Dmf4LkSlaaJeEUkyVZVud",
  "namespace": "company.team",
  "original_id": "4Dmf4LkSlaaJeEUkyVZVud",
  "parent_id": "",
  "replayed_from": "6sDiykZYUwoOx7RzWGsgeq",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "RUNNING",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### Restart execution

Run a failed or killed execution again from the tasks that didn't succeed, as Kestra's Restart button does, such as after fixing what made it fail. It keeps its ID and inputs.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.

**Outputs**

- `changed` (true/false): Whether it changed; false if there was nothing to do
- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "changed": true,
  "duration_seconds": 71.628,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "RESTARTED",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### Resume execution

Resume a paused execution, such as one waiting for an approval, with the inputs its Pause task asks for. One that isn't paused is left as it is.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.
- Inputs (`inputs`, object): What the Pause task asks for, by ID, such as {"approved": true}. Leave blank for one that only waits to be resumed.

**Outputs**

- `changed` (true/false): Whether it changed; false if there was nothing to do
- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "changed": true,
  "duration_seconds": 71.628,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "RUNNING",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "trigger_type": ""
}
```

### Search executions

List executions, the latest first, by namespace, flow, state, label and when they started.

**Inputs**

- Namespace (`namespace`, text): Only this namespace and those inside it, such as company for company.team too. Leave blank for all.
- Flow (`flow_id`, text): Only executions of the flow with this ID. Leave blank for every flow.
- States (`states`, list): Only executions in one of these states. Leave empty for all. One or more of: `CREATED`, `QUEUED`, `RUNNING`, `PAUSED`, `BREAKPOINT`, `RESTARTED`, `RETRYING`, `KILLING`, `SUCCESS`, `WARNING`, and 5 more.
- Started since (`since`, date and time): Only executions that started at or after this time.
- Started before (`until`, date and time): Only executions that started at or before this time.
- Labels (`labels`, object): Only executions with all of these labels, such as {"source": "lodol"}.
- How many (`limit`, number): The most executions to list, 1 to 200. Defaults to 25. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `executions` (list): The executions, the latest first

**Example output**

```json
{
  "count": 2,
  "executions": [
    {
      "duration_seconds": 71.628,
      "end_date": "2026-01-31T06:01:12.445Z",
      "failed_tasks": [],
      "finished": true,
      "flow_id": "nightly_load",
      "flow_revision": 4,
      "id": "6sDiykZYUwoOx7RzWGsgeq",
      "inputs": {
        "date": "2026-01-31"
      },
      "labels": {
        "source": "lodol"
      },
      "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
      "namespace": "company.team",
      "original_id": "6sDiykZYUwoOx7RzWGsgeq",
      "parent_id": "",
      "start_date": "2026-01-31T06:00:00.817Z",
      "state": "SUCCESS",
      "state_since": "2026-01-31T06:01:12.445Z",
      "task_runs": [
        {
          "attempts": 1,
          "duration_seconds": 40.614,
          "end_date": "2026-01-31T06:00:41.734Z",
          "id": "5BxMjYwgLkJVPxl8RyQZD0",
          "start_date": "2026-01-31T06:00:01.120Z",
          "state": "SUCCESS",
          "task_id": "extract",
          "value": ""
        }
      ],
      "trigger_type": ""
    },
    {
      "duration_seconds": 71.628,
      "end_date": "2026-01-31T06:01:12.445Z",
      "failed_tasks": [
        "load"
      ],
      "finished": true,
      "flow_id": "nightly_load",
      "flow_revision": 4,
      "id": "6sDiykZYUwoOx7RzWGsgeq",
      "inputs": {
        "date": "2026-01-31"
      },
      "labels": {
        "source": "lodol"
      },
      "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
      "namespace": "company.team",
      "original_id": "6sDiykZYUwoOx7RzWGsgeq",
      "parent_id": "",
      "start_date": "2026-01-31T06:00:00.817Z",
      "state": "FAILED",
      "state_since": "2026-01-31T06:01:12.445Z",
      "task_runs": [
        {
          "attempts": 1,
          "duration_seconds": 40.614,
          "end_date": "2026-01-31T06:00:41.734Z",
          "id": "5BxMjYwgLkJVPxl8RyQZD0",
          "start_date": "2026-01-31T06:00:01.120Z",
          "state": "FAILED",
          "task_id": "load",
          "value": ""
        }
      ],
      "trigger_type": ""
    }
  ]
}
```

### Send to webhook

Send data to a flow's Webhook trigger, which starts an execution that reads it as trigger.body. The flow needs a Webhook trigger.

**Inputs**

- Namespace (`namespace`, text, required): The flow's namespace, such as company.team: pick one, or type it.
- Flow (`flow_id`, text, required): The flow's ID, such as hello_world: pick one of the namespace's flows, or type it.
- Data (`body`, object): What to send, such as {"order_id": 42}: a JSON object is sent as JSON, anything else as text.
- Webhook key (`key`, text): The trigger's key. Leave blank to read it from the flow; type it when the flow takes it from a secret.

**Outputs**

- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did

**Example output**

```json
{
  "duration_seconds": 0.0,
  "end_date": "",
  "failed_tasks": [],
  "finished": false,
  "flow_id": "orders_webhook",
  "flow_revision": 4,
  "id": "41LiubZcT17otzK1tFbsVD",
  "inputs": {},
  "labels": {},
  "link": "https://kestra.example.com/ui/main/executions/company.team/orders_webhook/41LiubZcT17otzK1tFbsVD",
  "namespace": "company.team",
  "original_id": "41LiubZcT17otzK1tFbsVD",
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "CREATED",
  "state_since": "2026-01-31T06:00:00.817Z",
  "task_runs": [],
  "trigger_type": "io.kestra.plugin.core.trigger.Webhook"
}
```

### Set KV pair

Set a KV pair in a namespace's KV store, such as a date to load from, making it if there's none.

**Inputs**

- Namespace (`namespace`, text, required): The namespace the KV pair is in, such as company.team.
- Key (`key`, text, required): The KV pair's key: letters, numbers, dots, dashes and underscores, such as last_loaded_date.
- Value (`value`, text, required): What to set it to. Kestra keeps 42 as a number, true as a switch, 2026-01-31 as a date and {"a": 1} as JSON, unless you save it as text.
- Save as (`value_type`, text): Whether Kestra reads what the value is, or keeps it as text. One of: `auto` (What it reads as), `text`. Default: `auto`.
- Expires after (hours) (`expires_in_hours`, number): Delete it after this many hours. Leave blank to keep it. At least 1.

**Outputs**

- `created` (true/false): Whether it was made, there being none with that key
- `key` (text): The key
- `namespace` (text): The namespace it's in
- `revision` (number): Its revision: 1, then one more each time it's set
- `type` (text): What Kestra keeps it as: STRING, NUMBER, BOOLEAN, DATETIME, DATE, DURATION or JSON
- `updated` (text): When it was last set (ISO 8601)
- `value` (object): Its value: text, a number, a switch, a date, a list or an object
- `value_text` (text): Its value as text: text as it is, anything else as JSON

**Example output**

```json
{
  "created": false,
  "key": "last_loaded_date",
  "namespace": "company.team",
  "revision": 3,
  "type": "DATE",
  "updated": "2026-01-31T06:01:12.445Z",
  "value": "2026-01-31",
  "value_text": "2026-01-31"
}
```

### Wait for execution

Wait until an execution ends (succeeds, fails, ends with warnings or is killed) or pauses for someone, up to 15 minutes, then get it with its outputs. One still going when the wait is up carries on in Kestra.

**Inputs**

- Execution (`execution_id`, text, required): The execution's ID: pick a recent one, or use the id of an earlier step, such as Execute flow's.
- Wait up to (minutes) (`max_wait_minutes`, number): How long to wait, 1 to 15 minutes. Defaults to 5. From 1 to 15.

**Outputs**

- `duration_seconds` (number): How long it has run, in seconds
- `end_date` (text): When it ended (ISO 8601); empty until it does
- `failed_tasks` (list): The IDs of the tasks that failed
- `finished` (true/false): Whether it has ended: succeeded, failed, ended with warnings, or was killed or cancelled
- `flow_id` (text): The flow's ID
- `flow_revision` (number): The revision of the flow it runs
- `id` (text): The execution's ID
- `inputs` (object): The inputs it runs with
- `labels` (object): Its labels, as label: value
- `link` (text): A link to the execution in Kestra
- `namespace` (text): The flow's namespace, such as company.team
- `original_id` (text): The execution it was first, if it was restarted
- `outputs` (object): The flow's outputs, once it has ended; empty before
- `parent_id` (text): The execution that started it as a subflow; empty if none
- `start_date` (text): When it started (ISO 8601)
- `state` (text): Its state: CREATED, QUEUED, RUNNING, PAUSED, RESTARTED, KILLING, SUCCESS, WARNING, FAILED, KILLED, CANCELLED, RETRIED or SKIPPED
- `state_since` (text): When it came into its state (ISO 8601)
- `task_runs` (list): Its task runs, in the order they started
- `timed_out` (true/false): Whether the wait ran out before it ended or paused
- `trigger_type` (text): What started it, such as io.kestra.plugin.core.trigger.Schedule; empty when a person or the API did
- `waited_seconds` (number): How long the step waited, in seconds

**Example output**

```json
{
  "duration_seconds": 71.628,
  "end_date": "2026-01-31T06:01:12.445Z",
  "failed_tasks": [],
  "finished": true,
  "flow_id": "nightly_load",
  "flow_revision": 4,
  "id": "6sDiykZYUwoOx7RzWGsgeq",
  "inputs": {
    "date": "2026-01-31"
  },
  "labels": {
    "source": "lodol"
  },
  "link": "https://kestra.example.com/ui/main/executions/company.team/nightly_load/6sDiykZYUwoOx7RzWGsgeq",
  "namespace": "company.team",
  "original_id": "6sDiykZYUwoOx7RzWGsgeq",
  "outputs": {
    "rows_loaded": 1250
  },
  "parent_id": "",
  "start_date": "2026-01-31T06:00:00.817Z",
  "state": "SUCCESS",
  "state_since": "2026-01-31T06:01:12.445Z",
  "task_runs": [
    {
      "attempts": 1,
      "duration_seconds": 40.614,
      "end_date": "2026-01-31T06:00:41.734Z",
      "id": "5BxMjYwgLkJVPxl8RyQZD0",
      "start_date": "2026-01-31T06:00:01.120Z",
      "state": "SUCCESS",
      "task_id": "extract",
      "value": ""
    }
  ],
  "timed_out": false,
  "trigger_type": "",
  "waited_seconds": 72
}
```
