Validate a workflow definition
curl --request POST \
--url https://api.altostrat.io/workflows/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Daily Network Health Check",
"authorization_id": "auth_01H...",
"nodes": [
{
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": {
"componentId": "manual_trigger"
}
}
],
"edges": [
{
"id": "e1-2",
"source": "n1",
"target": "n2",
"sourceHandle": "true"
}
],
"description": "<string>",
"is_active": true,
"schedule_type": "manual",
"schedule_value": "0 4 * * *"
}
'import requests
url = "https://api.altostrat.io/workflows/validate"
payload = {
"name": "Daily Network Health Check",
"authorization_id": "auth_01H...",
"nodes": [
{
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": { "componentId": "manual_trigger" }
}
],
"edges": [
{
"id": "e1-2",
"source": "n1",
"target": "n2",
"sourceHandle": "true"
}
],
"description": "<string>",
"is_active": True,
"schedule_type": "manual",
"schedule_value": "0 4 * * *"
}
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({
name: 'Daily Network Health Check',
authorization_id: 'auth_01H...',
nodes: [
{
id: 'n1',
type: 'manual_trigger',
position: {x: 150, y: 250},
data: {componentId: 'manual_trigger'}
}
],
edges: [{id: 'e1-2', source: 'n1', target: 'n2', sourceHandle: 'true'}],
description: '<string>',
is_active: true,
schedule_type: 'manual',
schedule_value: '0 4 * * *'
})
};
fetch('https://api.altostrat.io/workflows/validate', 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://api.altostrat.io/workflows/validate",
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([
'name' => 'Daily Network Health Check',
'authorization_id' => 'auth_01H...',
'nodes' => [
[
'id' => 'n1',
'type' => 'manual_trigger',
'position' => [
'x' => 150,
'y' => 250
],
'data' => [
'componentId' => 'manual_trigger'
]
]
],
'edges' => [
[
'id' => 'e1-2',
'source' => 'n1',
'target' => 'n2',
'sourceHandle' => 'true'
]
],
'description' => '<string>',
'is_active' => true,
'schedule_type' => 'manual',
'schedule_value' => '0 4 * * *'
]),
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://api.altostrat.io/workflows/validate"
payload := strings.NewReader("{\n \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\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://api.altostrat.io/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altostrat.io/workflows/validate")
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 \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"errors": [
"<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"
}Workflows
Validate a workflow definition
Validates a workflow graph before you create or update it. Use this to catch missing triggers, invalid node configuration, and graph errors.
POST
/
workflows
/
validate
Validate a workflow definition
curl --request POST \
--url https://api.altostrat.io/workflows/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Daily Network Health Check",
"authorization_id": "auth_01H...",
"nodes": [
{
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": {
"componentId": "manual_trigger"
}
}
],
"edges": [
{
"id": "e1-2",
"source": "n1",
"target": "n2",
"sourceHandle": "true"
}
],
"description": "<string>",
"is_active": true,
"schedule_type": "manual",
"schedule_value": "0 4 * * *"
}
'import requests
url = "https://api.altostrat.io/workflows/validate"
payload = {
"name": "Daily Network Health Check",
"authorization_id": "auth_01H...",
"nodes": [
{
"id": "n1",
"type": "manual_trigger",
"position": {
"x": 150,
"y": 250
},
"data": { "componentId": "manual_trigger" }
}
],
"edges": [
{
"id": "e1-2",
"source": "n1",
"target": "n2",
"sourceHandle": "true"
}
],
"description": "<string>",
"is_active": True,
"schedule_type": "manual",
"schedule_value": "0 4 * * *"
}
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({
name: 'Daily Network Health Check',
authorization_id: 'auth_01H...',
nodes: [
{
id: 'n1',
type: 'manual_trigger',
position: {x: 150, y: 250},
data: {componentId: 'manual_trigger'}
}
],
edges: [{id: 'e1-2', source: 'n1', target: 'n2', sourceHandle: 'true'}],
description: '<string>',
is_active: true,
schedule_type: 'manual',
schedule_value: '0 4 * * *'
})
};
fetch('https://api.altostrat.io/workflows/validate', 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://api.altostrat.io/workflows/validate",
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([
'name' => 'Daily Network Health Check',
'authorization_id' => 'auth_01H...',
'nodes' => [
[
'id' => 'n1',
'type' => 'manual_trigger',
'position' => [
'x' => 150,
'y' => 250
],
'data' => [
'componentId' => 'manual_trigger'
]
]
],
'edges' => [
[
'id' => 'e1-2',
'source' => 'n1',
'target' => 'n2',
'sourceHandle' => 'true'
]
],
'description' => '<string>',
'is_active' => true,
'schedule_type' => 'manual',
'schedule_value' => '0 4 * * *'
]),
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://api.altostrat.io/workflows/validate"
payload := strings.NewReader("{\n \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\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://api.altostrat.io/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altostrat.io/workflows/validate")
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 \"name\": \"Daily Network Health Check\",\n \"authorization_id\": \"auth_01H...\",\n \"nodes\": [\n {\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 ],\n \"edges\": [\n {\n \"id\": \"e1-2\",\n \"source\": \"n1\",\n \"target\": \"n2\",\n \"sourceHandle\": \"true\"\n }\n ],\n \"description\": \"<string>\",\n \"is_active\": true,\n \"schedule_type\": \"manual\",\n \"schedule_value\": \"0 4 * * *\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true,
"errors": [
"<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
Body
application/json
Was this page helpful?