Skip to content
SoulFire LogoSoulFire

Validate script

POST
/v1/instances/{instance_id}/scripts:validate

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.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The instance context for validation.

Formatuuid

Request Body

application/json
  1. body

Request to validate a script graph without saving it.

nodes*array<>

The nodes to validate.

edges*array<>

The edges to validate.

Response Body

Response containing validation diagnostics.

application/json
  1. response

Response containing validation diagnostics.

diagnostics*array<>

All diagnostics (errors and warnings) for the script graph.

Example Request
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?