Skip to content

Validate DAG without saving

POST
/api/v1/workflows/{id}/validate
curl --request POST \
--url https://dashboard.justcrawl.io/api/v1/workflows/example/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dag": { "nodes": [ { "id": "example", "type": "entry", "config": {} } ], "edges": [ { "id": "example", "from": "example", "to": "example", "type": "default" } ] } }'

Run the workflow validator against a candidate DAG without persisting it. Used by the dashboard editor to surface structural errors live while the user is editing. The path {id} is required by Express routing but is not used to look up a row — validation runs purely against the body’s dag field.

id
required
string

Unused — present only to satisfy Express routing. Pass any non-empty string.

Media type application/json
object
dag
required
object
nodes
required
Array<object>
object
id
required
string
type
required
string
Allowed values: entry service split result failed
config
object
edges
required
Array<object>
object
id
required
string
from
required
string
to
required
string
type
required
string
Allowed values: default success fail split

Validation result. valid true means the DAG would pass server-side checks on save/publish; valid false means it would 400. errors is an array of structured validation errors when valid is false.

Media type application/json
object
valid
boolean
errors
Array<object>
object
Example generated
{
"valid": true,
"errors": [
{}
]
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Missing or invalid authentication token

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}