Hevo Hook

Last updated on Feb 20, 2026

Edge Pipeline is now available for Public Review. You can explore and evaluate its features and share your feedback.

HevoHook is the primary interface between Airflow and Hevo’s APIs. The following parameters are available when creating a hook for the Hevo Pipeline. You can also use these parameters in Hevo Operators, Sensors, and Triggers.

Parameters

The HevoHook accepts the following parameters:

Name Type Default Description
pipeline_id INT None The unique identifier of the Hevo Pipeline to be monitored by the downstream tasks, such as HevoOperator and HevoSensor.
connection_id STR hevo_airflow_conn_id The ID of the connection created in Airflow for Hevo API credentials and connection details.
retry_limit INT 3 The maximum number of connection attempts before displaying an error.

Set the value to a positive integer.
retry_delay INT 2 The time (in seconds) to wait before retrying the connection.

Set the value to a positive integer.
timeout INT 30 The maximum duration (in seconds) allowed to receive a response from the API call.

Set the value to a positive integer.
extra_headers DICT[STR, STR] None Any additional headers required for API requests.

These headers take precedence over the headers configured at the connection level.

Note: If the header configured here is also included in another API request, the value in that request overrides the one configured here.
extra_kwargs DICT[STR, Any] None Optional settings, such as proxy configurations or SSL settings, passed to Airflow’s Asynchronous I/O engine (aiohttp) to customize HTTP requests.
retryable_status_codes LIST[INT] [500-599] A list of HTTP status codes that trigger an automatic retry if the initial API request fails.

Refer to Retry Behavior for information on the codes and the actions.

Types of Hooks

Hevo provides the following hooks for interacting with the Pipeline, job management, and Pipeline object APIs. Each hook provides methods to run these APIs. The methods that the hook provides can be categorized into:

  • Async: These methods can be used in async contexts, such as triggers. The method names in this category are suffixed with _async.

  • Sync: These methods can be used in sync contexts, such as operators, sensors, and poke. The method names in this category are suffixed with _sync. Sync methods internally invoke the corresponding async method.

HevoPipelineHook

This hook interacts with the Hevo Pipeline and job management APIs and provides methods for:

  • Validating Pipelines and checking their status

  • Triggering Pipeline syncs

  • Discovering jobs and monitoring their status

  • Retrieving job completion status.

The following table lists the methods provided by this hook and the Hevo APIs they call. Each row lists the name of the async method followed by its sync variant:

Methods Hevo External API Description
- get_pipeline_async

- get_pipeline_sync
/api/v1/pipelines/{pipeline_id} Retrieves details, such as status, Source, and Destination configurations, for the specified Pipeline.
- trigger_pipeline_sync_async

- trigger_pipeline_sync
/api/v1/pipelines/{pipeline_id}/actions/sync-now Triggers a sync operation for the specified Pipeline.
- find_active_job_by_type_async

- find_active_job_by_type_sync
/api/v1/pipelines/{pipeline_id}/jobs Finds and returns the first active (IN_PROGRESS) job for the specified Pipeline and job type.
- get_job_completion_status_async

- get_job_completion_status_sync
/api/v1/pipelines/{pipeline_id}/jobs/{job_id} Fetches job details from the API and maps them to:

- JobCompletionStatus.COMPLETED: Job completed successfully.

- JobCompletionStatus.COMPLETED_WITH_FAILURES: Job finished with some failures.

- JobCompletionStatus.FAILED: Job failed, canceled, skipped, or deferred with failure.

- JobCompletionStatus.PENDING: Job is still running.
- update_pipeline_async

- update_pipeline_sync
/api/v1/pipelines/{pipeline_id} Modifies the specified fields for the given Pipeline.
- update_pipeline_sources_async

- update_pipeline_sources_sync
/api/v1/pipelines/{pipeline_id}/sources Modifies only the Source-specific settings in the Pipeline.
- disable_pipeline_async

- disable_pipeline_sync
/api/v1/pipelines/{pipeline_id}/actions/disable Stops the Pipeline from running scheduled syncs. Manual syncs are also rejected until the Pipeline is re-enabled.
- enable_pipeline_async

- enable_pipeline_sync
/api/v1/pipelines/{pipeline_id}/actions/enable Resumes operations for the specified Pipeline, allowing scheduled and manual syncs to run.
- resync_pipeline_async

- resync_pipeline_sync
/api/by pelines/{pipeline_id}/actions/resync Restarts historical load for all active objects in the Pipeline.
- cancel_job_async

- cancel_job_sync
/api/v1/pipelines/{pipeline_id}/jobs/{job_id}/actions/cancel Stops a running job and changes its status to CANCELED.
- get_job_objects_async

- get_job_objects_sync
/api/v1/pipelines/{pipeline_id}/jobs/{job_id}/objects Retrieves the list of objects processed by the specified job.

HevoObjectHook

This hook interacts with Hevo Pipeline objects’ APIs and provides methods for:

  • Listing objects in a Pipeline

  • Retrieving the details for an object

  • Refreshing object schemas from the Source

  • Resyncing specific objects.

The following table lists the methods and the Hevo APIs that each method calls. Each row lists the name of the async method followed by its sync variant.

Methods Hevo External API Description
- list_objects_async

- list_objects_sync
/api/v1/pipelines/{pipeline_id}/objects Retrieves the list of all objects in a Pipeline, including their status and configuration.
- get_object_async

- get_object_sync
/api/v1/pipelines/{pipeline_id}/objects/{object_id} Retrieves details, including schema, configuration, and sync status, for a specific object.
- refresh_schema_async

- refresh_schema_sync
/api/v1/pipelines/{pipeline_id}/objects/actions/refresh-schema Fetches the latest schema from the Source and updates the schema for all Pipeline objects.
- resync_objects_async

- resync_objects_sync
/api/v1/pipelines/{pipeline_id}/objects/actions/resync Triggers a historical load for specified objects, re-ingesting their data from the Source.

Retry Behavior

Refer to the following table for information on the errors and the retry policy:

Types of Errors Retry Policy Examples
Network Always retry - Connection failures

- Timeouts
HTTP Status Code Retried for codes specified in the retryable_status_codes parameter - [500, 502, 503, 504] - Retry only for specific server errors.

- [429, 500, 502, 503] - Retry for rate limiting (429) and server-specific errors.

- [] - Only retry network errors; do not retry application-level HTTP status code-based errors.
4xx

Note: Most 4xx responses, except 429, are permanent failures and require a change to the API request body.
Do not retry by default, except for those specified in the retryable_status_codes parameter. - 400 - Bad request

- 401 - Unauthorized

- 404 - Not found

Example

The following example creates two instances of HevoPipelineHook with a custom retry configuration:

  • The first instance hook is configured to trigger retry attempts every 3 seconds up to 5 attempts for 429, 500, 502, 503, and 504 errors.

  • The second instance hook_no_retry triggers retry attempts only for network errors, such as connection failures and timeouts. HTTP status code-based errors are not retried.

from airflow.hevo.hooks.hevo_pipeline_hook import HevoPipelineHook
# Custom retry configuration
hook = HevoPipelineHook(
    pipeline_id=123,
    connection_id="hevo_production",
    retry_limit=5,
    retry_delay=3,
    timeout=60,
    retryable_status_codes=[429, 500, 502, 503, 504],  # Include rate limiting
    extra_headers={"X-Custom-Header": "value"}
)
# Disable status code retries (network errors only)
hook_no_retry = HevoPipelineHook(
    pipeline_id=456,
    retry_limit=3,
    retryable_status_codes=[]  # Only retry network errors
)

Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Feb-20-2026 NA New document.

Tell us what went wrong