Runs
Run a workflow to get insights in your lightning actions.
A run is an specific execution of workflow containing details of the execution.
📖
See the full documentation here.
API
You can request a workflow run through the API.
This is a GraphQL API so you can fetch as much or as little information as desired from the different queries and mutations.
Queries
getWorkflows > workflows > find_many($filter, $page)
Get many workflow runs, filters and pagination are available.
Query
query GetManyWorkflowRuns($filter: GetWorkflowRunsFilter, $page: PageInput) {
getWorkflows {
workflows {
find_many(filter: $filter, page: $page) {
id
list {
created_at
finished_at
finished_jobs
id
input {
id
name
value
}
requested_by {
id
name
}
status
template {
amount_workflows
created_at
description
diagram {
edges {
id
job_id
source
target
}
id
nodes {
id
job_id
x
y
}
}
id
input {
id
name
}
jobs {
id
job_id
name
}
name
scope
}
total_jobs
}
pagination {
limit
offset
}
total_count
}
}
}
}
getWorkflows > workflows > find_one($id)
Get one workflow run by id
Query
query GetWorkflowRun($id: String!) {
getWorkflows {
workflows {
find_one(id: $id) {
created_at
finished_at
id
input {
id
name
value
}
jobs {
depends_on
id
job_id
job_name
run {
created_at
finished_at
id
status
}
type
}
status
step_details {
id
list {
id
message
status
}
}
template {
amount_workflows
created_at
description
diagram {
edges {
id
job_id
source
target
}
id
nodes {
id
job_id
x
y
}
}
id
input {
id
name
}
jobs {
id
job_id
name
}
name
scope
}
template_id
webhook_events {
created_at
id
request
response
status_code
}
webhook_url
}
}
}
}
Mutations
workflows > createRun
Request a workflow run, given a template, inputs and optional webhook.
Mutation
To run a workflow, run the following mutation:
mutation CreateRun($input: WorkflowRunInput!) {
workflows {
createRun(input: $input) {
workflow_run_id
}
}
}
Example input:
{
"input": {
"template_id": "ae17894e-9dfd-4dd3-ae8f-6f3d2c5e7ea7",
"workflow_input": [
{
"name": "PUBKEY",
"value": "03006fcf3312dae8d068ea297f58e2bd00ec1ffe214b793eda46966b6294a53ce6"
}
],
"webhook_url": "https://my-wehook.com/"
}
}