Hex API (1.0.0)
Download OpenAPI specification:Download
API specification for the Hex External API
RunProject
Trigger a run of the latest published version of a project.
Authorizations:
path Parameters
projectId required | string <uuid> (ProjectId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a Hex project. This can be found in the Variables side bar of the Logic View of a project, or by visiting the Project, and copying the UUID after |
Request Body schema: application/json
inputParams | object Optionally specify input parameters for this project run. These should be structured as a dictionary of key/value pairs, where the key name matches the name of the variable in the Hex project. Only parameters that are added to the published app can be set via this request parameter. Any additional inputs will be ignored. If no input parameters are provided, the project will be run with the default input values. Note that if input parameters are provided, this run will not be able to update the cached values for the project, and the updateCache setting (below) will be ignored. |
dryRun | boolean Default: "false" When true, this endpoint will perform a dry run that does not run the project. This can be useful for validating the structure of an API call, and inspecting a dummy response, without running a project. |
updateCache | boolean Default: "false" When true, SQL cells will be run without cache, and the run will update the cached state of the published app with the latest run results. Note: this cannot be set to true if custom input parameters are provided. When false, SQL cells will use cache (if available), and the cached state of the published app will not be updated with the results of the run. |
Array of objects (ProjectRunNotification) Optionally specify a list of notification details that will be delivered once a project run completes. Notifications can be configured for delivery to Slack channels, Hex users, or Hex groups. |
Responses
Request samples
- Payload
{- "inputParams": {
- "text_input_1": "Hello World",
- "numeric_input_1": 123
}, - "dryRun": "false",
- "updateCache": "false",
- "notifications": [
- {
- "type": "ALL",
- "includeSuccessScreenshot": "true",
- "slackChannelIds": [
- "C0000000"
], - "userIds": [
- "uuid-user-1",
- "uuid-user-2"
]
}, - {
- "type": "FAILURE",
- "includeSuccessScreenshot": "false",
- "userIds": [
- "uuid-user-1"
], - "groupIds": [
- "uuid-group-1"
]
}
]
}
Response samples
- 201
- 400
- 403
- 422
- 503
{- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
- "runUrl": "string",
- "runStatusUrl": "string",
- "traceId": "string",
- "projectVersion": 0,
- "notifications": [
- {
- "type": "SUCCESS",
- "recipientType": "USER",
- "includeSuccessScreenshot": true,
- "recipient": {
- "id": "C0123456",
- "name": "data-team",
- "isPrivate": false
}
}
]
}
GetRunStatus
Get the status of a project run.
Authorizations:
path Parameters
projectId required | string <uuid> (ProjectId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a Hex project. This can be found in the Variables side bar of the Logic View of a project, or by visiting the Project, and copying the UUID after |
runId required | string <uuid> (InputRunId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a run of a Hex project. This ID is part of the response returned by the RunProject endpoint. The GetProjectRuns endpoint can also be used to find the specific runs for a project. |
Responses
Response samples
- 200
- 400
- 403
- 422
{- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "projectVersion": 0,
- "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
- "runUrl": "string",
- "status": "PENDING",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "elapsedTime": 0,
- "traceId": "string",
- "notifications": [
- {
- "type": "SUCCESS",
- "recipientType": "USER",
- "includeSuccessScreenshot": true,
- "recipient": {
- "id": "C0123456",
- "name": "data-team",
- "isPrivate": false
}
}
]
}
CancelRun
Cancel a project run.
Authorizations:
path Parameters
projectId required | string <uuid> (ProjectId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a Hex project. This can be found in the Variables side bar of the Logic View of a project, or by visiting the Project, and copying the UUID after |
runId required | string <uuid> (InputRunId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a run of a Hex project. This ID is part of the response returned by the RunProject endpoint. The GetProjectRuns endpoint can also be used to find the specific runs for a project. |
Responses
Response samples
- 400
- 403
- 422
{- "details": "string",
- "traceId": "string",
- "reason": "string"
}
GetProjectRuns
Get the status of the API-triggered runs of a project.
Authorizations:
path Parameters
projectId required | string <uuid> (ProjectId) ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Unique ID for a Hex project. This can be found in the Variables side bar of the Logic View of a project, or by visiting the Project, and copying the UUID after |
query Parameters
limit | integer <int32> (PageSize) [ 1 .. 100 ] Default: "25" Number of results to fetch per page for paginated requests |
offset | integer <int32> (Offset) >= 0 Default: "0" Offset for paginated requests |
statusFilter | string (ProjectRunStatus) Enum: "PENDING" "RUNNING" "ERRORED" "COMPLETED" "KILLED" "UNABLE_TO_ALLOCATE_KERNEL" Current status of a project run |
Responses
Response samples
- 200
- 400
- 403
- 422
{- "runs": [
- {
- "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
- "projectVersion": 0,
- "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
- "runUrl": "string",
- "status": "PENDING",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "elapsedTime": 0,
- "traceId": "string",
- "notifications": [
- {
- "type": "SUCCESS",
- "recipientType": "USER",
- "includeSuccessScreenshot": true,
- "recipient": {
- "id": "C0123456",
- "name": "data-team",
- "isPrivate": false
}
}
]
}
], - "nextPage": "string",
- "previousPage": "string",
- "traceId": "string"
}