Test a single node
curl --request POST \
--url https://v1.api.altostrat.io/workflows/test-node \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node": {
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": {
"componentId": "manual_trigger"
}
},
"context": {
"n1": {
"trigger_type": "manual",
"run_id": "fl_run_example"
}
},
"authorization_id": "auth_01H..."
}
'import requests
url = "https://v1.api.altostrat.io/workflows/test-node"
payload = {
"node": {
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": { "componentId": "manual_trigger" }
},
"context": { "n1": {
"trigger_type": "manual",
"run_id": "fl_run_example"
} },
"authorization_id": "auth_01H..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
node: {
id: 'n1',
type: 'manual_trigger',
position: {x: 150, y: 250},
data: {componentId: 'manual_trigger'}
},
context: {n1: {trigger_type: 'manual', run_id: 'fl_run_example'}},
authorization_id: 'auth_01H...'
})
};
fetch('https://v1.api.altostrat.io/workflows/test-node', 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://v1.api.altostrat.io/workflows/test-node",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'node' => [
'id' => 'n1',
'type' => 'manual_trigger',
'position' => [
'x' => 150,
'y' => 250
],
'data' => [
'componentId' => 'manual_trigger'
]
],
'context' => [
'n1' => [
'trigger_type' => 'manual',
'run_id' => 'fl_run_example'
]
],
'authorization_id' => 'auth_01H...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/workflows/test-node"
payload := strings.NewReader("{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/workflows/test-node")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/workflows/test-node")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"output": {}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"status": "error",
"error": {
"message": "<string>"
}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Utilities
Test a single node
Executes a single workflow node in isolation with a provided context. This is a powerful debugging tool to test a node’s logic without running an entire workflow.
POST
/
workflows
/
test-node
Test a single node
curl --request POST \
--url https://v1.api.altostrat.io/workflows/test-node \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"node": {
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": {
"componentId": "manual_trigger"
}
},
"context": {
"n1": {
"trigger_type": "manual",
"run_id": "fl_run_example"
}
},
"authorization_id": "auth_01H..."
}
'import requests
url = "https://v1.api.altostrat.io/workflows/test-node"
payload = {
"node": {
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": { "componentId": "manual_trigger" }
},
"context": { "n1": {
"trigger_type": "manual",
"run_id": "fl_run_example"
} },
"authorization_id": "auth_01H..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
node: {
id: 'n1',
type: 'manual_trigger',
position: {x: 150, y: 250},
data: {componentId: 'manual_trigger'}
},
context: {n1: {trigger_type: 'manual', run_id: 'fl_run_example'}},
authorization_id: 'auth_01H...'
})
};
fetch('https://v1.api.altostrat.io/workflows/test-node', 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://v1.api.altostrat.io/workflows/test-node",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'node' => [
'id' => 'n1',
'type' => 'manual_trigger',
'position' => [
'x' => 150,
'y' => 250
],
'data' => [
'componentId' => 'manual_trigger'
]
],
'context' => [
'n1' => [
'trigger_type' => 'manual',
'run_id' => 'fl_run_example'
]
],
'authorization_id' => 'auth_01H...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/workflows/test-node"
payload := strings.NewReader("{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/workflows/test-node")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/workflows/test-node")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"node\": {\n \"id\": \"n1\",\n \"type\": \"manual_trigger\",\n \"position\": {\n \"x\": 150,\n \"y\": 250\n },\n \"data\": {\n \"componentId\": \"manual_trigger\"\n }\n },\n \"context\": {\n \"n1\": {\n \"trigger_type\": \"manual\",\n \"run_id\": \"fl_run_example\"\n }\n },\n \"authorization_id\": \"auth_01H...\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"output": {}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"status": "error",
"error": {
"message": "<string>"
}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
Standard JWT for user sessions obtained via Altostrat authentication.
Body
application/json
Show child attributes
Show child attributes
A mock context object, simulating the state of a workflow run before this node is executed.
Example:
{
"n1": {
"trigger_type": "manual",
"run_id": "fl_run_example"
}
}
The prefixed ID of an Authorization to use if the node requires it (e.g., altostrat_api).
Example:
"auth_01H..."
Was this page helpful?
⌘I