Learn how to get started running workflows via API
To use the Leap Workflows API, you’ll need an API key. You can get one by signing up for a free account at app.tryleap.ai.
Before you can run a workflow via the API, you’ll need to publish it first:
After publishing your workflow you’ll need to retrieve the workflow_id
and the trigger_id
you want to use.
Here’s a quick example of how you can publish and retrieve these values:
Get started with these key endpoints:
When running a workflow through the API, it follows an asynchronous pattern:
First, you call the Run Workflow endpoint which immediately returns a workflow run id
. The workflow execution happens asynchronously in the background.
Then, you use the Get Workflow Run endpoint using the id
returned from the Run Workflow endpoint to check on the status and retrieve the results. A common pattern is to poll this endpoint every few seconds until the workflow run is complete.
Here’s a typical flow:
/v2/runs
with your workflow configurationid
immediately/v2/runs/{workflow_run_id}
periodically to check status and get resultsThis asynchronous approach allows you to handle long-running workflows efficiently without keeping connections open for extended periods.
Learn how to get started running workflows via API
To use the Leap Workflows API, you’ll need an API key. You can get one by signing up for a free account at app.tryleap.ai.
Before you can run a workflow via the API, you’ll need to publish it first:
After publishing your workflow you’ll need to retrieve the workflow_id
and the trigger_id
you want to use.
Here’s a quick example of how you can publish and retrieve these values:
Get started with these key endpoints:
When running a workflow through the API, it follows an asynchronous pattern:
First, you call the Run Workflow endpoint which immediately returns a workflow run id
. The workflow execution happens asynchronously in the background.
Then, you use the Get Workflow Run endpoint using the id
returned from the Run Workflow endpoint to check on the status and retrieve the results. A common pattern is to poll this endpoint every few seconds until the workflow run is complete.
Here’s a typical flow:
/v2/runs
with your workflow configurationid
immediately/v2/runs/{workflow_run_id}
periodically to check status and get resultsThis asynchronous approach allows you to handle long-running workflows efficiently without keeping connections open for extended periods.