Get a workflow
curl --request GET \
--url https://inference.studio.lyzr.ai/api/workflows/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://inference.studio.lyzr.ai/api/workflows/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://inference.studio.lyzr.ai/api/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inference.studio.lyzr.ai/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://inference.studio.lyzr.ai/api/workflows/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://inference.studio.lyzr.ai/api/workflows/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://inference.studio.lyzr.ai/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"flow_id": "<string>",
"flow_name": "Document Processing Flow",
"flow_data": {
"name": "Minimal Example",
"nodes": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"name": "Trigger",
"type": "lyzr-nodes-base.trigger",
"typeVersion": 1,
"parameters": {},
"position": [
240,
300
]
},
{
"id": "a1b2c3d4-0000-0000-0000-000000000002",
"name": "Set",
"type": "lyzr-nodes-base.set",
"typeVersion": 3.4,
"parameters": {
"assignments": {
"assignments": [
{
"id": "f1",
"name": "greeting",
"type": "string",
"value": "=Hello {{ $json.name }}"
}
]
}
},
"position": [
480,
300
]
}
],
"connections": {
"Trigger": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {}
},
"version": 123,
"is_owner": true,
"user_id": "<string>",
"org_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Workflows
Get Workflow
Returns a workflow by ID. The caller must own the workflow or have it shared with them.
GET
/
workflows
/
{id}
Get a workflow
curl --request GET \
--url https://inference.studio.lyzr.ai/api/workflows/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://inference.studio.lyzr.ai/api/workflows/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://inference.studio.lyzr.ai/api/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inference.studio.lyzr.ai/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://inference.studio.lyzr.ai/api/workflows/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://inference.studio.lyzr.ai/api/workflows/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://inference.studio.lyzr.ai/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"flow_id": "<string>",
"flow_name": "Document Processing Flow",
"flow_data": {
"name": "Minimal Example",
"nodes": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"name": "Trigger",
"type": "lyzr-nodes-base.trigger",
"typeVersion": 1,
"parameters": {},
"position": [
240,
300
]
},
{
"id": "a1b2c3d4-0000-0000-0000-000000000002",
"name": "Set",
"type": "lyzr-nodes-base.set",
"typeVersion": 3.4,
"parameters": {
"assignments": {
"assignments": [
{
"id": "f1",
"name": "greeting",
"type": "string",
"value": "=Hello {{ $json.name }}"
}
]
}
},
"position": [
480,
300
]
}
],
"connections": {
"Trigger": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {}
},
"version": 123,
"is_owner": true,
"user_id": "<string>",
"org_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Tenant API key. Required on every endpoint.
Path Parameters
Workflow ID
Response
OK
Example:
"Document Processing Flow"
Workflow graph definition as JSON (nodes, connections, and node configuration). See the flow_data reference for the full structure and the node types reference for every node type.
Example:
{
"name": "Minimal Example",
"nodes": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"name": "Trigger",
"type": "lyzr-nodes-base.trigger",
"typeVersion": 1,
"parameters": {},
"position": [240, 300]
},
{
"id": "a1b2c3d4-0000-0000-0000-000000000002",
"name": "Set",
"type": "lyzr-nodes-base.set",
"typeVersion": 3.4,
"parameters": {
"assignments": {
"assignments": [
{
"id": "f1",
"name": "greeting",
"type": "string",
"value": "=Hello {{ $json.name }}"
}
]
}
},
"position": [480, 300]
}
],
"connections": {
"Trigger": {
"main": [
[
{ "node": "Set", "type": "main", "index": 0 }
]
]
}
},
"settings": {}
}
Computed per response so the UI can distinguish owned rows from shared rows without seeing the owner's key. Not persisted.
⌘I