AptlyStar

Hex

Run and manage Hex projects

使用说明

Integrate Hex into your workflow. Run projects, check run status, manage collections and groups, list users, and view data connections. Requires a Hex API token.

工具

hex_cancel_run

Cancel an active Hex project run.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project
runIdstring是The UUID of the run to cancel

输出

参数类型描述
successbooleanWhether the run was successfully cancelled
projectIdstringProject UUID
runIdstringRun UUID that was cancelled

hex_create_collection

Create a new collection in the Hex workspace to organize projects.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
namestring是Name for the new collection
descriptionstring否Optional description for the collection

输出

参数类型描述
idstringNewly created collection UUID
namestringCollection name
descriptionstringCollection description
creatorobjectCollection creator
↳ emailstringCreator email
↳ idstringCreator UUID

hex_get_collection

Retrieve details for a specific Hex collection by its ID.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
collectionIdstring是The UUID of the collection

输出

参数类型描述
idstringCollection UUID
namestringCollection name
descriptionstringCollection description
creatorobjectCollection creator
↳ emailstringCreator email
↳ idstringCreator UUID

hex_get_data_connection

Retrieve details for a specific data connection including type, description, and configuration flags.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
dataConnectionIdstring是The UUID of the data connection

输出

参数类型描述
idstringConnection UUID
namestringConnection name
typestringConnection type (e.g., snowflake, postgres, bigquery)
descriptionstringConnection description
connectViaSshbooleanWhether SSH tunneling is enabled
includeMagicbooleanWhether Magic AI features are enabled
allowWritebackCellsbooleanWhether writeback cells are allowed

hex_get_group

Retrieve details for a specific Hex group.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
groupIdstring是The UUID of the group

输出

参数类型描述
idstringGroup UUID
namestringGroup name
createdAtstringCreation timestamp

hex_get_project

Get metadata and details for a specific Hex project by its ID.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project

输出

参数类型描述
idstringProject UUID
titlestringProject title
descriptionstringProject description
statusobjectProject status
↳ namestringStatus name (e.g., PUBLISHED, DRAFT)
typestringProject type (PROJECT or COMPONENT)
creatorobjectProject creator
↳ emailstringCreator email
ownerobjectProject owner
↳ emailstringOwner email
categoriesarrayProject categories
↳ namestringCategory name
↳ descriptionstringCategory description
lastEditedAtstringISO 8601 last edited timestamp
lastPublishedAtstringISO 8601 last published timestamp
createdAtstringISO 8601 creation timestamp
archivedAtstringISO 8601 archived timestamp
trashedAtstringISO 8601 trashed timestamp

hex_get_project_runs

Retrieve API-triggered runs for a Hex project with optional filtering by status and pagination.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project
limitnumber否Maximum number of runs to return (1-100, default: 25)
offsetnumber否Offset for paginated results (default: 0)
statusFilterstring否Filter by run status: PENDING, RUNNING, ERRORED, COMPLETED, KILLED, UNABLE_TO_ALLOCATE_KERNEL

输出

参数类型描述
runsarrayList of project runs
↳ projectIdstringProject UUID
↳ runIdstringRun UUID
↳ runUrlstringURL to view the run
↳ statusstringRun status (PENDING, RUNNING, COMPLETED, ERRORED, KILLED, UNABLE_TO_ALLOCATE_KERNEL)
↳ startTimestringRun start time
↳ endTimestringRun end time
↳ elapsedTimenumberElapsed time in seconds
↳ traceIdstringTrace ID
↳ projectVersionnumberProject version number
totalnumberTotal number of runs returned
traceIdstringTop-level trace ID

hex_get_queried_tables

Return the warehouse tables queried by a Hex project, including data connection and table names.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project
limitnumber否Maximum number of tables to return (1-100)

输出

参数类型描述
tablesarrayList of warehouse tables queried by the project
↳ dataConnectionIdstringData connection UUID
↳ dataConnectionNamestringData connection name
↳ tableNamestringTable name
totalnumberTotal number of tables returned

hex_get_run_status

Check the status of a Hex project run by its run ID.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project
runIdstring是The UUID of the run to check

输出

参数类型描述
projectIdstringProject UUID
runIdstringRun UUID
runUrlstringURL to view the run
statusstringRun status (PENDING, RUNNING, COMPLETED, ERRORED, KILLED, UNABLE_TO_ALLOCATE_KERNEL)
startTimestringISO 8601 run start time
endTimestringISO 8601 run end time
elapsedTimenumberElapsed time in seconds
traceIdstringTrace ID for debugging
projectVersionnumberProject version number

hex_list_collections

List all collections in the Hex workspace.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
limitnumber否Maximum number of collections to return (1-500, default: 25)
sortBystring否Sort by field: NAME

输出

参数类型描述
collectionsarrayList of collections
↳ idstringCollection UUID
↳ namestringCollection name
↳ descriptionstringCollection description
↳ creatorobjectCollection creator
↳ emailstringCreator email
↳ idstringCreator UUID
totalnumberTotal number of collections returned

hex_list_data_connections

List all data connections in the Hex workspace (e.g., Snowflake, PostgreSQL, BigQuery).

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
limitnumber否Maximum number of connections to return (1-500, default: 25)
sortBystring否Sort by field: CREATED_AT or NAME
sortDirectionstring否Sort direction: ASC or DESC

输出

参数类型描述
connectionsarrayList of data connections
↳ idstringConnection UUID
↳ namestringConnection name
↳ typestringConnection type (e.g., athena, bigquery, databricks, postgres, redshift, snowflake)
↳ descriptionstringConnection description
↳ connectViaSshbooleanWhether SSH tunneling is enabled
↳ includeMagicbooleanWhether Magic AI features are enabled
↳ allowWritebackCellsbooleanWhether writeback cells are allowed
totalnumberTotal number of connections returned

hex_list_groups

List all groups in the Hex workspace with optional sorting.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
limitnumber否Maximum number of groups to return (1-500, default: 25)
sortBystring否Sort by field: CREATED_AT or NAME
sortDirectionstring否Sort direction: ASC or DESC

输出

参数类型描述
groupsarrayList of workspace groups
↳ idstringGroup UUID
↳ namestringGroup name
↳ createdAtstringCreation timestamp
totalnumberTotal number of groups returned

hex_list_projects

List all projects in your Hex workspace with optional filtering by status.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
limitnumber否Maximum number of projects to return (1-100)
includeArchivedboolean否Include archived projects in results
statusFilterstring否Filter by status: PUBLISHED, DRAFT, or ALL

输出

参数类型描述
projectsarrayList of Hex projects
↳ idstringProject UUID
↳ titlestringProject title
↳ descriptionstringProject description
↳ statusobjectProject status
↳ namestringStatus name (e.g., PUBLISHED, DRAFT)
↳ typestringProject type (PROJECT or COMPONENT)
↳ creatorobjectProject creator
↳ emailstringCreator email
↳ ownerobjectProject owner
↳ emailstringOwner email
↳ lastEditedAtstringLast edited timestamp
↳ lastPublishedAtstringLast published timestamp
↳ createdAtstringCreation timestamp
↳ archivedAtstringArchived timestamp
totalnumberTotal number of projects returned

hex_list_users

List all users in the Hex workspace with optional filtering and sorting.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
limitnumber否Maximum number of users to return (1-100, default: 25)
sortBystring否Sort by field: NAME or EMAIL
sortDirectionstring否Sort direction: ASC or DESC
groupIdstring否Filter users by group UUID

输出

参数类型描述
usersarrayList of workspace users
↳ idstringUser UUID
↳ namestringUser name
↳ emailstringUser email
↳ rolestringUser role (ADMIN, MANAGER, EDITOR, EXPLORER, MEMBER, GUEST, EMBEDDED_USER, ANONYMOUS)
totalnumberTotal number of users returned

hex_run_project

Execute a published Hex project. Optionally pass input parameters and control caching behavior.

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project to run
inputParamsjson否JSON object of input parameters for the project (e.g., {"date": "2024-01-01"})
dryRunboolean否If true, perform a dry run without executing the project
updateCacheboolean否(Deprecated) If true, update the cached results after execution
updatePublishedResultsboolean否If true, update the published app results after execution
useCachedSqlResultsboolean否If true, use cached SQL results instead of re-running queries

输出

参数类型描述
projectIdstringProject UUID
runIdstringRun UUID
runUrlstringURL to view the run
runStatusUrlstringURL to check run status
traceIdstringTrace ID for debugging
projectVersionnumberProject version number

hex_update_project

Update a Hex project status label (e.g., endorsement or custom workspace statuses).

输入

参数类型必填描述
apiKeystring是Hex API token (Personal or Workspace)
projectIdstring是The UUID of the Hex project to update
statusstring是New project status name (custom workspace status label)

输出

参数类型描述
idstringProject UUID
titlestringProject title
descriptionstringProject description
statusobjectUpdated project status
↳ namestringStatus name (e.g., PUBLISHED, DRAFT)
typestringProject type (PROJECT or COMPONENT)
creatorobjectProject creator
↳ emailstringCreator email
ownerobjectProject owner
↳ emailstringOwner email
categoriesarrayProject categories
↳ namestringCategory name
↳ descriptionstringCategory description
lastEditedAtstringLast edited timestamp
lastPublishedAtstringLast published timestamp
createdAtstringCreation timestamp
archivedAtstringArchived timestamp
trashedAtstringTrashed timestamp

On this page