Hex Run

Hex Run

Certified

Run a Hex project and wait for completion

Starts the latest published version of a Hex project through the Hex API (https://learn.hex.tech/docs/api/api-reference) and, by default, polls until the run reaches a terminal state. Set wait to false to start the run and return immediately with its ID.

If the task is retried after a worker restart, it reattaches to the run it already started instead of starting a duplicate: the run ID is persisted to the flow's namespace KV store keyed by this task run, and is looked up again on every attempt before deciding whether to call the start endpoint.

yaml
type: io.kestra.plugin.hex.projects.Run

Run a Hex project and wait for it to complete.

yaml
id: run_hex_project
namespace: company.team

tasks:
  - id: run_dashboard_refresh
    type: io.kestra.plugin.hex.projects.Run
    apiToken: "{{ secret('HEX_API_TOKEN') }}"
    projectId: "00000000-0000-0000-0000-000000000000"

Start a Hex project run with input parameters, without waiting for it to finish.

yaml
id: start_hex_project
namespace: company.team

tasks:
  - id: start_ingestion
    type: io.kestra.plugin.hex.projects.Run
    apiToken: "{{ secret('HEX_API_TOKEN') }}"
    projectId: "00000000-0000-0000-0000-000000000000"
    inputParams:
      run_date: "{{ trigger.date | date('yyyy-MM-dd') }}"
    wait: false
Properties

Hex API token

Bearer token for the Hex API. Generate one from your Hex workspace's API key settings and store it as a Kestra secret.

Hex project ID

The ID of the Hex project to run.

Defaulthttps://app.hex.tech/api/v1

Hex API base URL

Base endpoint for all requests. Defaults to https://app.hex.tech/api/v1; override only for a self-hosted Hex region.

Input parameters

Values for the project's input cells, as a map of parameter name to value. Only parameters already declared as input cells in the Hex project can be set this way.

DefaultPT1H

Maximum wait duration

Upper bound for waiting when wait is true, after which the task fails with a timeout. Default is 1 hour.

Reference (ref) of the pluginDefaults to apply to this task.

DefaultPT5S

Poll frequency

Interval between run status checks while waiting for completion. Default is 5 seconds. Keep this conservative: the Hex API allows roughly 30 status requests per minute.

Defaulttrue

Wait for completion

When true (default), poll the run until it reaches a terminal state. When false, start the run (or reattach to one already in flight) and return immediately with its current status.

Formatduration

Elapsed time

Duration of the run, taken from Hex's reported elapsed time or, if absent, computed from startTime/endTime.

Formatdate-time

End time

When the run reached a terminal state. Null while the run has not completed yet.

Project version

Published version of the Hex project that was run.

Hex run ID

Identifier of the Hex project run.

Run URL

Link to view this run in the Hex UI.

Formatdate-time

Start time

When the run started executing.

Run status

Status reported by Hex, e.g. PENDING, RUNNING, COMPLETED, ERRORED, KILLED, or UNABLE_TO_ALLOCATE_KERNEL. When wait is false, this is a snapshot taken right after the run was started or reattached, so it is typically not yet terminal.

Trace ID

Identifier Hex uses to correlate this run internally, useful when contacting Hex support.