Hex
App · Analytics · 20 actions
Run Hex projects, check their runs, edit notebook cells and manage sharing, groups and collections.
Actions
| Action | What it does |
|---|---|
| Add a cell to a Hex project | Add a code, SQL or Markdown cell to a project's draft. |
| Cancel a Hex run | Cancel a pending or running project run. |
| Create a Hex collection | Create a collection for organising projects. |
| Create a Hex group | Create a user group, optionally with members. |
| Create a Hex project | Create a new, empty draft project owned by you. |
| Delete a Hex cell | Delete a cell from a project's draft. |
| Get a Hex cell | Get one cell from a project's draft. |
| Get a Hex project | Get a project's details, schedules and analytics. |
| Get a Hex run's status | Get the status and timing of a project run. |
| Get the connected Hex user | Return the user the API token belongs to and their workspace. |
| List a Hex project's cells | List the cells in a project's draft, with the contents of code, SQL and Markdown cells. |
| List a Hex project's runs | List a project's runs, optionally by status or trigger. |
| List Hex collections | List collections, by name. |
| List Hex data connections | List the data connections you can use. |
| List Hex groups | List the workspace's user groups. |
| List Hex projects | List projects you can see, with optional filters by owner, creator, collection, status and category. |
| List Hex users | List the users in the Hex workspace. |
| Run a Hex project | Start a run of a project's latest published version. |
| Share a Hex project with users | Give users access to a project, change their access, or remove it with No access. |
| 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. |
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Cell type
cell_typetextRequired - What kind of cell to add.One of:
CODE,SQL,MARKDOWN. Default:CODE. - Source
sourcetextRequired - The cell's code, SQL query or Markdown text.
- Label
labeltext - 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 cell
insert_after_cell_idtext - Place it after this cell. Default: at the end.
- Inside section cell
parent_cell_idtext - Place it inside this section cell.
- Position in section
child_positiontext - Where in the section to place it.One of:
LAST,FIRST.
Outputs
cellTypetextcontentsobjectdataConnectionIdtextidtextlabeltextprojectIdtextstaticIdtext
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Run
run_idtextRequired - The run to cancel.
Outputs
cancelledtrue/falseprojectIdtextrunIdtext
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
- Name
nametextRequired - The collection's name.
- Description
descriptiontext - An optional description.
Outputs
creatorobjectdescriptiontextidtextnametextsharingobject
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
- Name
nametextRequired - The group's name.
- Members
member_user_idslist - Users to add (up to 100).
Outputs
idtextmembersobjectnametext
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
- Title
titletextRequired - The project's title.
- Description
descriptiontext - An optional description.
Outputs
analyticsobjectarchivedAttextcategorieslistcreatedAttextcreatorobjectdescriptiontextidtextlastEditedAttextlastPublishedAttextownerobjectreviewsobjectscheduleslistsharingobjectstatusobjecttitletexttrashedAttexttypetext
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
- Project
project_idtext - Only used to list the project's cells in the Cell field.
- Cell
cell_idtextRequired - The cell to delete. Choose a project first to pick from its cells.
Outputs
cellIdtextdeletedtrue/false
Example output
{
"cellId": "0e7c1f5a-3b2d-4c8e-9f10-2a6b4d8c1e33",
"deleted": true
}Get a Hex cell
Get one cell from a project's draft.
Inputs
- Project
project_idtext - Only used to list the project's cells in the Cell field.
- Cell
cell_idtextRequired - The cell. Choose a project first to pick from its cells.
Outputs
cellTypetextcontentsobjectdataConnectionIdtextidtextlabeltextprojectIdtextstaticIdtext
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Include sharing
include_sharingtrue/false - Add the project's sharing settings.
Outputs
analyticsobjectarchivedAttextcategorieslistcreatedAttextcreatorobjectdescriptiontextidtextlastEditedAttextlastPublishedAttextownerobjectreviewsobjectscheduleslistsharingobjectstatusobjecttitletexttrashedAttexttypetext
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Run
run_idtextRequired - The run, as returned by Run project.
- Include state events
expanded_statstrue/false - Add the run's timeline of state changes.
Outputs
elapsedTimenumberendTimetextnotificationslistprojectIdtextprojectVersiontextrunIdtextrunTriggertextrunUrltextstartTimetextstateEventsliststatustexttraceIdtext
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
emailtextidtextlastLoginDatetextnametextorgobjectroletexttokenobjecttoken_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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Status
statustext - Only runs with this status.One of:
PENDING,RUNNING,ERRORED,COMPLETED,KILLED,UNABLE_TO_ALLOCATE_KERNEL(Unable To Allocate Kernel). - Started by
run_triggertext - Only runs started this way.One of:
ALL(Anything),API,SCHEDULED(Schedule),APP_REFRESH(App refresh). - Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Offset
offsetnumber - Skip this many runs first, to page through.At least 0. Default:
0.
Outputs
nextPagetextpreviousPagetextrunslisttraceIdtext
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
- Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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 by
sort_bytext - Field to sort by.One of:
NAME,CREATED_AT(Created At). - Sort direction
sort_directiontext - Ascending or descending.One of:
DESC(Descending),ASC(Ascending). - Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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 by
sort_bytext - Field to sort by.One of:
CREATED_AT(Created At),NAME. - Sort direction
sort_directiontext - Ascending or descending.One of:
DESC(Descending),ASC(Ascending). - Limit
limitnumber - How many to return, 1-500.From 1 to 500. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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 collection
collection_idtext - Only projects in this collection.
- Owner email
owner_emailtext - Only projects owned by this email address.
- Creator email
creator_emailtext - Only projects created by this email address.
- Statuses
statuseslist - Only projects with one of these status names.
- Categories
categorieslist - Only projects with one of these category names.
- Include archived
include_archivedtrue/false - Also list archived ones.
- Include trashed
include_trashedtrue/false - Also list trashed ones.
- Include components
include_componentstrue/false - Also list reusable components.
- Include unlisted
include_unlistedtrue/false - Also list projects not shared with you directly.
- Include sharing
include_sharingtrue/false - Add each project's sharing settings.
- Sort by
sort_bytext - Field to sort by.One of:
CREATED_AT(Created At),LAST_EDITED_AT(Last Edited At),LAST_PUBLISHED_AT(Last Published At). - Sort direction
sort_directiontext - Ascending or descending.One of:
DESC(Descending),ASC(Ascending). - Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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 group
group_idtext - Only members of this group.
- Only these users
user_idslist - Return only these users.
- Sort by
sort_bytext - Field to sort by.One of:
NAME,EMAIL. - Sort direction
sort_directiontext - Ascending or descending.One of:
DESC(Descending),ASC(Ascending). - Limit
limitnumber - How many to return, 1-100.From 1 to 100. Default:
25. - Next page cursor
aftertext - To get the next page, the pagination.after value from the previous result. Leave blank for the first page.
Outputs
paginationobjectvalueslist
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
- Project
project_idtextRequired - The published project to run. Pick one, or paste its id or Hex URL.
- Input values
input_paramsobject - Values for the app's inputs, keyed by the input's variable name.
- Update published app
update_published_resultstrue/false - Show this run's results in the published app.
- Use cached SQL results
use_cached_sql_resultstrue/false - Let SQL cells reuse cached results (Hex's default is on).
- Dry run
dry_runtrue/false - Only check the request; do not start a run.
- Saved view ID
view_idtext - Use the inputs saved in this view of the app.
- Notify on
notify_ontext - When to send the notification, if any recipients.One of:
ALL(Success or failure),SUCCESS,FAILURE. Default:ALL. - Notify users
notify_user_idslist - Users to notify about the run.
- Notify groups
notify_group_idslist - Groups to notify about the run.
- Notify Slack channel IDs
notify_slack_channel_idslist - Slack channel ids to notify (needs Hex's Slack app).
- Include screenshot
include_success_screenshottrue/false - Attach a screenshot of the app to success notifications.
- Notification subject
notification_subjecttext - Optional subject for the notification.
- Notification message
notification_messagetext - Optional message for the notification.
Outputs
notificationslistprojectIdtextprojectVersionnumberrunIdtextrunStatusUrltextrunUrltexttraceIdtext
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
- Project
project_idtextRequired - The Hex project. Pick one, or paste its id or Hex URL.
- Users
user_idslistRequired - The users whose access to set.
- Access
accesstextRequired - 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
errorslistprojectobject
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
- Project
project_idtext - Only used to list the project's cells in the Cell field.
- Cell
cell_idtextRequired - The cell to change. Choose a project first to pick from its cells.
- New source
sourcetext - 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 connection
detach_data_connectiontrue/false - For a SQL cell: remove its data connection.
Outputs
cellTypetextcontentsobjectdataConnectionIdtextidtextlabeltextprojectIdtextstaticIdtext
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"
}