Skip to navigation

Run Task

Beta

Run a task and wait for the result.

Executes a serverless function script or flow synchronously. Server handles polling internally.

When Tool Studio is disabled in the environment, returns HTTP 403 with detail.code ENVIRONMENT_FEATURE_DISABLED and detail.key task_studio_toolkit before creating or running a job. This restriction also applies to administrators.

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-Athena-Session-CredentialstringOptional

Request

This endpoint expects an object.
task_idstringRequired

The unique identifier (path) of the task. Example: ‘f/public/databricks_describe_table’

argumentsmap from strings to anyOptional
Arguments to pass to the task
task_typeenumOptionalDefaults to script

Type: ‘script’ or ‘flow’

Allowed values:

Response

Successful Response
successboolean
Whether execution succeeded
errorstring or nullOptional
Error message if failed
error_typestring or nullOptional

Error type: ‘timeout’, ‘execution_error’, ‘not_found’, ‘validation_error’

job_idstring or nullOptional
Job ID for debugging
resultanyOptional
The task result

Errors

422
Unprocessable Entity Error