Validate DAG without saving
POST
/api/v1/workflows/{id}/validate
const url = 'https://dashboard.justcrawl.io/api/v1/workflows/example/validate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"dag":{"nodes":[{"id":"example","type":"entry","config":{}}],"edges":[{"id":"example","from":"example","to":"example","type":"default"}]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Unused — present only to satisfy Express routing. Pass any non-empty string.
Request Body required
Section titled “Request Body required ” Media type application/json
object
dag
required
object
nodes
required
Array<object>
object
id
required
string
type
required
string
config
object
edges
required
Array<object>
object
id
required
string
from
required
string
to
required
string
type
required
string
Responses
Section titled “ Responses ”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"}