Hex

App · Analytics · 20 actions

Run Hex projects, check their runs, edit notebook cells and manage sharing, groups and collections.

Actions

ActionWhat it does
Add a cell to a Hex projectAdd a code, SQL or Markdown cell to a project's draft.
Cancel a Hex runCancel a pending or running project run.
Create a Hex collectionCreate a collection for organising projects.
Create a Hex groupCreate a user group, optionally with members.
Create a Hex projectCreate a new, empty draft project owned by you.
Delete a Hex cellDelete a cell from a project's draft.
Get a Hex cellGet one cell from a project's draft.
Get a Hex projectGet a project's details, schedules and analytics.
Get a Hex run's statusGet the status and timing of a project run.
Get the connected Hex userReturn the user the API token belongs to and their workspace.
List a Hex project's cellsList the cells in a project's draft, with the contents of code, SQL and Markdown cells.
List a Hex project's runsList a project's runs, optionally by status or trigger.
List Hex collectionsList collections, by name.
List Hex data connectionsList the data connections you can use.
List Hex groupsList the workspace's user groups.
List Hex projectsList projects you can see, with optional filters by owner, creator, collection, status and category.
List Hex usersList the users in the Hex workspace.
Run a Hex projectStart a run of a project's latest published version.
Share a Hex project with usersGive users access to a project, change their access, or remove it with No access.
Update a Hex cellReplace a code, SQL or Markdown cell's source, or change a SQL cell's data connection, in the project's draft.

Add a cell to a Hex project

Add a code, SQL or Markdown cell to a project's draft. It is not published until you publish the project in Hex.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Cell typecell_typetextRequired
What kind of cell to add.One of: CODE, SQL, MARKDOWN. Default: CODE.
SourcesourcetextRequired
The cell's code, SQL query or Markdown text.
Labellabeltext
An optional label for the cell.
Data connection (SQL)data_connection_idtext
For a SQL cell: the connection to query.
Query dataframes (SQL)is_dataframe_sqltrue/false
For a SQL cell: query other cells' results instead of a data connection.
Result dataframe name (SQL)output_dataframetext
For a SQL cell: name for the result dataframe.
Insert after cellinsert_after_cell_idtext
Place it after this cell. Default: at the end.
Inside section cellparent_cell_idtext
Place it inside this section cell.
Position in sectionchild_positiontext
Where in the section to place it.One of: LAST, FIRST.

Outputs

cellTypetext
contentsobject
dataConnectionIdtext
idtext
labeltext
projectIdtext
staticIdtext
Example output
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}

Cancel a Hex run

Cancel a pending or running project run.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Runrun_idtextRequired
The run to cancel.

Outputs

cancelledtrue/false
projectIdtext
runIdtext
Example output
{
  "cancelled": true,
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11"
}

Create a Hex collection

Create a collection for organising projects.

Inputs

NamenametextRequired
The collection's name.
Descriptiondescriptiontext
An optional description.

Outputs

creatorobject
descriptiontext
idtext
nametext
sharingobject
Example output
{
  "creator": {
    "email": "jordan@example.com",
    "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
  },
  "description": "Finance dashboards",
  "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
  "name": "Finance",
  "sharing": {
    "groups": [],
    "users": [],
    "workspace": {
      "members": "NONE"
    }
  }
}

Create a Hex group

Create a user group, optionally with members. Admins only.

Inputs

NamenametextRequired
The group's name.
Membersmember_user_idslist
Users to add (up to 100).

Outputs

idtext
membersobject
nametext
Example output
{
  "id": "3f2e1d0c-9b8a-4765-8432-10fedcba9876",
  "members": {
    "users": [
      {
        "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
      }
    ]
  },
  "name": "Analysts"
}

Create a Hex project

Create a new, empty draft project owned by you.

Inputs

TitletitletextRequired
The project's title.
Descriptiondescriptiontext
An optional description.

Outputs

analyticsobject
archivedAttext
categorieslist
createdAttext
creatorobject
descriptiontext
idtext
lastEditedAttext
lastPublishedAttext
ownerobject
reviewsobject
scheduleslist
sharingobject
statusobject
titletext
trashedAttext
typetext
Example output
{
  "analytics": {
    "appViews": {
      "allTime": 0,
      "lastFourteenDays": 0,
      "lastSevenDays": 0,
      "lastThirtyDays": 0
    },
    "lastViewedAt": null,
    "publishedResultsUpdatedAt": null
  },
  "archivedAt": null,
  "categories": [],
  "createdAt": "2026-09-20T09:12:00Z",
  "creator": {
    "email": "jordan@example.com"
  },
  "description": "Revenue by region",
  "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "lastEditedAt": "2026-09-20T09:12:00Z",
  "lastPublishedAt": null,
  "owner": {
    "email": "jordan@example.com"
  },
  "reviews": {
    "required": false
  },
  "schedules": [],
  "status": null,
  "title": "Weekly revenue",
  "trashedAt": null,
  "type": "PROJECT"
}

Delete a Hex cell

Delete a cell from a project's draft.

Inputs

Projectproject_idtext
Only used to list the project's cells in the Cell field.
Cellcell_idtextRequired
The cell to delete. Choose a project first to pick from its cells.

Outputs

cellIdtext
deletedtrue/false
Example output
{
  "cellId": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "deleted": true
}

Get a Hex cell

Get one cell from a project's draft.

Inputs

Projectproject_idtext
Only used to list the project's cells in the Cell field.
Cellcell_idtextRequired
The cell. Choose a project first to pick from its cells.

Outputs

cellTypetext
contentsobject
dataConnectionIdtext
idtext
labeltext
projectIdtext
staticIdtext
Example output
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}

Get a Hex project

Get a project's details, schedules and analytics.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Include sharinginclude_sharingtrue/false
Add the project's sharing settings.

Outputs

analyticsobject
archivedAttext
categorieslist
createdAttext
creatorobject
descriptiontext
idtext
lastEditedAttext
lastPublishedAttext
ownerobject
reviewsobject
scheduleslist
sharingobject
statusobject
titletext
trashedAttext
typetext
Example output
{
  "analytics": {
    "appViews": {
      "allTime": 0,
      "lastFourteenDays": 0,
      "lastSevenDays": 0,
      "lastThirtyDays": 0
    },
    "lastViewedAt": null,
    "publishedResultsUpdatedAt": null
  },
  "archivedAt": null,
  "categories": [],
  "createdAt": "2026-09-20T09:12:00Z",
  "creator": {
    "email": "jordan@example.com"
  },
  "description": "Revenue by region",
  "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "lastEditedAt": "2026-09-20T09:12:00Z",
  "lastPublishedAt": null,
  "owner": {
    "email": "jordan@example.com"
  },
  "reviews": {
    "required": false
  },
  "schedules": [],
  "status": null,
  "title": "Weekly revenue",
  "trashedAt": null,
  "type": "PROJECT"
}

Get a Hex run's status

Get the status and timing of a project run.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Runrun_idtextRequired
The run, as returned by Run project.
Include state eventsexpanded_statstrue/false
Add the run's timeline of state changes.

Outputs

elapsedTimenumber
endTimetext
notificationslist
projectIdtext
projectVersiontext
runIdtext
runTriggertext
runUrltext
startTimetext
stateEventslist
statustext
traceIdtext
Example output
{
  "elapsedTime": 40000,
  "endTime": "2026-09-20T09:12:40Z",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "projectVersion": "3",
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runTrigger": "API",
  "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "startTime": "2026-09-20T09:12:00Z",
  "status": "COMPLETED",
  "traceId": "a1b2c3"
}

Get the connected Hex user

Return the user the API token belongs to and their workspace. A workspace token returns only the workspace.

Inputs

None.

Outputs

emailtext
idtext
lastLoginDatetext
nametext
orgobject
roletext
tokenobject
token_typetext
Example output
{
  "email": "jordan@example.com",
  "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
  "lastLoginDate": "2026-09-20T09:12:00Z",
  "name": "Jordan Avery",
  "org": {
    "id": "9e8d7c6b-5a4f-4e3d-2c1b-0a9f8e7d6c5b"
  },
  "role": "ADMIN",
  "token": {
    "exp": 1790000000
  },
  "token_type": "personal"
}

List a Hex project's cells

List the cells in a project's draft, with the contents of code, SQL and Markdown cells.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "cellType": "CODE",
      "contents": {
        "codeCell": {
          "source": "total = 1 + 1"
        },
        "markdownCell": null,
        "sqlCell": null
      },
      "dataConnectionId": null,
      "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
      "label": "Totals",
      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
    }
  ]
}

List a Hex project's runs

List a project's runs, optionally by status or trigger.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Statusstatustext
Only runs with this status.One of: PENDING, RUNNING, ERRORED, COMPLETED, KILLED, UNABLE_TO_ALLOCATE_KERNEL (Unable To Allocate Kernel).
Started byrun_triggertext
Only runs started this way.One of: ALL (Anything), API, SCHEDULED (Schedule), APP_REFRESH (App refresh).
Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Offsetoffsetnumber
Skip this many runs first, to page through.At least 0. Default: 0.

Outputs

nextPagetext
previousPagetext
runslist
traceIdtext
Example output
{
  "nextPage": null,
  "previousPage": null,
  "runs": [
    {
      "elapsedTime": 40000,
      "endTime": "2026-09-20T09:12:40Z",
      "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "projectVersion": "3",
      "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
      "runTrigger": "API",
      "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
      "startTime": "2026-09-20T09:12:00Z",
      "status": "COMPLETED",
      "traceId": "a1b2c3"
    }
  ],
  "traceId": "a1b2c3"
}

List Hex collections

List collections, by name.

Inputs

Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "creator": {
        "email": "jordan@example.com",
        "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
      },
      "description": "Finance dashboards",
      "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
      "name": "Finance",
      "sharing": {
        "groups": [],
        "users": [],
        "workspace": {
          "members": "NONE"
        }
      }
    }
  ]
}

List Hex data connections

List the data connections you can use. Admins also see connection details and sharing.

Inputs

Sort bysort_bytext
Field to sort by.One of: NAME, CREATED_AT (Created At).
Sort directionsort_directiontext
Ascending or descending.One of: DESC (Descending), ASC (Ascending).
Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "description": "Production warehouse",
      "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
      "name": "Warehouse",
      "sensitivity": {
        "configured": false,
        "effective": false,
        "overrideReason": null
      },
      "type": "snowflake"
    }
  ]
}

List Hex groups

List the workspace's user groups.

Inputs

Sort bysort_bytext
Field to sort by.One of: CREATED_AT (Created At), NAME.
Sort directionsort_directiontext
Ascending or descending.One of: DESC (Descending), ASC (Ascending).
Limitlimitnumber
How many to return, 1-500.From 1 to 500. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "createdAt": "2026-09-20T09:12:00Z",
      "id": "3f2e1d0c-9b8a-4765-8432-10fedcba9876",
      "name": "Analysts"
    }
  ]
}

List Hex projects

List projects you can see, with optional filters by owner, creator, collection, status and category.

Inputs

In collectioncollection_idtext
Only projects in this collection.
Owner emailowner_emailtext
Only projects owned by this email address.
Creator emailcreator_emailtext
Only projects created by this email address.
Statusesstatuseslist
Only projects with one of these status names.
Categoriescategorieslist
Only projects with one of these category names.
Include archivedinclude_archivedtrue/false
Also list archived ones.
Include trashedinclude_trashedtrue/false
Also list trashed ones.
Include componentsinclude_componentstrue/false
Also list reusable components.
Include unlistedinclude_unlistedtrue/false
Also list projects not shared with you directly.
Include sharinginclude_sharingtrue/false
Add each project's sharing settings.
Sort bysort_bytext
Field to sort by.One of: CREATED_AT (Created At), LAST_EDITED_AT (Last Edited At), LAST_PUBLISHED_AT (Last Published At).
Sort directionsort_directiontext
Ascending or descending.One of: DESC (Descending), ASC (Ascending).
Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "analytics": {
        "appViews": {
          "allTime": 0,
          "lastFourteenDays": 0,
          "lastSevenDays": 0,
          "lastThirtyDays": 0
        },
        "lastViewedAt": null,
        "publishedResultsUpdatedAt": null
      },
      "archivedAt": null,
      "categories": [],
      "createdAt": "2026-09-20T09:12:00Z",
      "creator": {
        "email": "jordan@example.com"
      },
      "description": "Revenue by region",
      "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
      "lastEditedAt": "2026-09-20T09:12:00Z",
      "lastPublishedAt": null,
      "owner": {
        "email": "jordan@example.com"
      },
      "reviews": {
        "required": false
      },
      "schedules": [],
      "status": null,
      "title": "Weekly revenue",
      "trashedAt": null,
      "type": "PROJECT"
    }
  ]
}

List Hex users

List the users in the Hex workspace.

Inputs

In groupgroup_idtext
Only members of this group.
Only these usersuser_idslist
Return only these users.
Sort bysort_bytext
Field to sort by.One of: NAME, EMAIL.
Sort directionsort_directiontext
Ascending or descending.One of: DESC (Descending), ASC (Ascending).
Limitlimitnumber
How many to return, 1-100.From 1 to 100. Default: 25.
Next page cursoraftertext
To get the next page, the pagination.after value from the previous result. Leave blank for the first page.

Outputs

paginationobject
valueslist
Example output
{
  "pagination": {
    "after": null,
    "before": null
  },
  "values": [
    {
      "email": "jordan@example.com",
      "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
      "lastLoginDate": "2026-09-20T09:12:00Z",
      "name": "Jordan Avery",
      "role": "ADMIN"
    }
  ]
}

Run a Hex project

Start a run of a project's latest published version. The project must have been published in Hex.

Inputs

Projectproject_idtextRequired
The published project to run. Pick one, or paste its id or Hex URL.
Input valuesinput_paramsobject
Values for the app's inputs, keyed by the input's variable name.
Update published appupdate_published_resultstrue/false
Show this run's results in the published app.
Use cached SQL resultsuse_cached_sql_resultstrue/false
Let SQL cells reuse cached results (Hex's default is on).
Dry rundry_runtrue/false
Only check the request; do not start a run.
Saved view IDview_idtext
Use the inputs saved in this view of the app.
Notify onnotify_ontext
When to send the notification, if any recipients.One of: ALL (Success or failure), SUCCESS, FAILURE. Default: ALL.
Notify usersnotify_user_idslist
Users to notify about the run.
Notify groupsnotify_group_idslist
Groups to notify about the run.
Notify Slack channel IDsnotify_slack_channel_idslist
Slack channel ids to notify (needs Hex's Slack app).
Include screenshotinclude_success_screenshottrue/false
Attach a screenshot of the app to success notifications.
Notification subjectnotification_subjecttext
Optional subject for the notification.
Notification messagenotification_messagetext
Optional message for the notification.

Outputs

notificationslist
projectIdtext
projectVersionnumber
runIdtext
runStatusUrltext
runUrltext
traceIdtext
Example output
{
  "notifications": [],
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "projectVersion": 3,
  "runId": "78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runStatusUrl": "https://app.hex.tech/api/v1/projects/5a8591dd-4039-49df-9202-96385ba3eff8/runs/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "runUrl": "https://app.hex.tech/acme/hex/5a8591dd-4039-49df-9202-96385ba3eff8/run/78c33d7b-0a4f-4ef1-8d3e-5b7a6e2f0c11",
  "traceId": "a1b2c3"
}

Share a Hex project with users

Give users access to a project, change their access, or remove it with No access. Up to 25 users at a time.

Inputs

Projectproject_idtextRequired
The Hex project. Pick one, or paste its id or Hex URL.
Usersuser_idslistRequired
The users whose access to set.
AccessaccesstextRequired
The access level to give them.One of: NONE (No access (remove)), APP_ONLY (Can view app), CAN_VIEW (Can explore), CAN_EDIT (Can edit), FULL_ACCESS (Full access). Default: CAN_VIEW.

Outputs

errorslist
projectobject
Example output
{
  "errors": [],
  "project": {
    "analytics": {
      "appViews": {
        "allTime": 0,
        "lastFourteenDays": 0,
        "lastSevenDays": 0,
        "lastThirtyDays": 0
      },
      "lastViewedAt": null,
      "publishedResultsUpdatedAt": null
    },
    "archivedAt": null,
    "categories": [],
    "createdAt": "2026-09-20T09:12:00Z",
    "creator": {
      "email": "jordan@example.com"
    },
    "description": "Revenue by region",
    "id": "5a8591dd-4039-49df-9202-96385ba3eff8",
    "lastEditedAt": "2026-09-20T09:12:00Z",
    "lastPublishedAt": null,
    "owner": {
      "email": "jordan@example.com"
    },
    "reviews": {
      "required": false
    },
    "schedules": [],
    "status": null,
    "title": "Weekly revenue",
    "trashedAt": null,
    "type": "PROJECT"
  }
}

Update a Hex cell

Replace a code, SQL or Markdown cell's source, or change a SQL cell's data connection, in the project's draft.

Inputs

Projectproject_idtext
Only used to list the project's cells in the Cell field.
Cellcell_idtextRequired
The cell to change. Choose a project first to pick from its cells.
New sourcesourcetext
The new code, SQL or Markdown. Blank keeps it.
Result dataframe name (SQL)output_dataframetext
For a SQL cell: rename its result dataframe.
Data connection (SQL)data_connection_idtext
For a SQL cell: the connection to query.
Detach data connectiondetach_data_connectiontrue/false
For a SQL cell: remove its data connection.

Outputs

cellTypetext
contentsobject
dataConnectionIdtext
idtext
labeltext
projectIdtext
staticIdtext
Example output
{
  "cellType": "CODE",
  "contents": {
    "codeCell": {
      "source": "total = 1 + 1"
    },
    "markdownCell": null,
    "sqlCell": null
  },
  "dataConnectionId": null,
  "id": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
  "label": "Totals",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "staticId": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a"
}

On this page