The Leap Workflows API allows developers to run workflows, fetch workflow runs, and provide other utility functions related to workflow runs. Please use the X-Api-Key for authenticated requests.
- In Xcode, select File > Add Packages⦠and enter
https://github.com/leap-ai/leap-workflows-swift-sdk
as the repository URL. - Select the latest version number from our tags page.
- Add the Leap product to the target of your app.
- Add this line to your
Cartfile
:
github "leap-ai/leap-workflows-swift-sdk"
- Follow the Carthage installation instructions.
- In the future, to update to the latest version of the SDK, run the following command:
carthage update leap-workflows-swift-sdk
- Add
source 'https://github.com/CocoaPods/Specs.git'
to yourPodfile
- Add
pod 'Leap', '~> 0.1.0'
to yourPodfile
Your Podfile
should look like:
# Podfile
source 'https://github.com/CocoaPods/Specs.git'
target 'Example' do
pod 'Leap', '~> 0.1.0'
end
- Run
pod install
β― pod install
Analyzing dependencies
Downloading dependencies
Installing Leap 0.1.0
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
- In the future, to update to the latest version of the SDK, run:
pod update Leap
import Leap
let leap = LeapClient(
apiKey: "X_API_KEY"
// Defining the base path is optional and defaults to https://api.workflows.tryleap.ai
// basePath: "https://api.workflows.tryleap.ai"
)
let bulkRunId = "bulkRunId_example"
let getBulkResponse = try await leap.bulkWorkflowRuns.getBulk(
bulkRunId: bulkRunId
)
This endpoint retrieves the details of a specific bulk workflow run using its bulk_run_id
.
let bulkRunId = "bulkRunId_example"
let getBulkResponse = try await leap.bulkWorkflowRuns.getBulk(
bulkRunId: bulkRunId
)
The ID of the bulk run to retrieve.
/v1/runs/bulk/{bulk_run_id}
GET
π Back to Table of Contents
This endpoint lets the user run a specified workflow with the provided csv in bulk.
let workflowId = "workflowId_example"
let inputCsvUrl = "inputCsvUrl_example"
let webhookUrl = "webhookUrl_example"
let runBulkResponse = try await leap.bulkWorkflowRuns.runBulk(
workflowId: workflowId,
inputCsvUrl: inputCsvUrl,
webhookUrl: webhookUrl
)
The ID of the workflow to be run in bulk.
A CSV file containing the input data for the bulk run. Each row should contain the input data for a single run.
The URL to which the bulk run results should be sent to on completion.
/v1/runs/bulk
POST
π Back to Table of Contents
This endpoint retrieves the details of a specific workflow run using its workflow_run_id
.
let workflowRunId = "workflowRunId_example"
let getWorkflowRunResponse = try await leap.workflowRuns.getWorkflowRun(
workflowRunId: workflowRunId
)
The ID of the workflow run to retrieve.
/v1/runs/{workflow_run_id}
GET
π Back to Table of Contents
This endpoint lets the user run a specified workflow with the provided workflow definition.
let workflowId = "workflowId_example"
let webhookUrl = "webhookUrl_example"
let input = "TODO"
let workflowResponse = try await leap.workflowRuns.workflow(
workflowId: workflowId,
webhookUrl: webhookUrl,
input: input
)
The ID of the workflow to be run.
The URL to which the workflow results should be sent to on completion.
Variables that the workflow can use globally and their values.
/v1/runs
POST
π Back to Table of Contents
This TypeScript package is automatically generated by Konfig