Validate script
POST
Validates a script graph without saving it. Returns all diagnostics (errors and warnings) for the given nodes and edges. Useful for live validation in the editor without requiring a save.
header
AuthorizationBearer <JWT>Preferred API authentication. Use a JWT with the api audience.
instance_id*stringThe instance context for validation.
Format
uuidapplication/json- body
Request to validate a script graph without saving it.
nodes*array<>The nodes to validate.
edges*array<>The edges to validate.
Response containing validation diagnostics.
application/json- response
Response containing validation diagnostics.
diagnostics*array<>All diagnostics (errors and warnings) for the script graph.
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/scripts:validate' \
-H 'Content-Type: application/json' \
-d '{
"nodes": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"type": "string",
"position": {
"x": 0.1,
"y": 0.1
},
"muted": true,
"collapsed": true,
"parentFrameId": "string"
}
],
"edges": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"source": "string",
"sourceHandle": "string",
"target": "string",
"targetHandle": "string",
"edgeType": "EDGE_TYPE_EXECUTION"
}
]
}'Example Response
{
"diagnostics": [
{
"nodeId": "string",
"edgeId": "string",
"message": "string",
"severity": "DIAGNOSTIC_ERROR"
}
]
}Was this page helpful?
