SoulFire LogoSoulFire

Create script

Creates a new script in the specified instance. The script can be created with initial nodes and edges, or as a blank script to be edited later.

POST
/v1/instances/{instance_id}/scripts

Creates a new script in the specified instance. The script can be created with initial nodes and edges, or as a blank script to be edited later.

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

instance_id*string

The instance to create the script in. Format: UUID string.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to create a new script.

name*string

The human-readable name for the script.

description?string

Optional description of what the script does.

nodes*array<>

Initial nodes for the script graph. Can be empty to create a blank script.

edges*array<>

Initial edges for the script graph. Can be empty to create a blank script.

paused*boolean

Whether the script should be created in paused state. If false (default), the script starts running immediately after creation.

quotas?

Optional resource quotas for this script.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/scripts" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "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"      }    ],    "paused": true  }'
{  "script": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "description": "string",    "nodes": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "type": "string",        "position": {          "x": 0.1,          "y": 0.1        },        "data": {          "property1": null,          "property2": null        },        "muted": true,        "collapsed": true,        "width": 0.1,        "height": 0.1,        "containedNodes": [          "string"        ],        "label": "string",        "resolvedType": "PORT_TYPE_ANY",        "parentFrameId": "string"      }    ],    "edges": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "source": "string",        "sourceHandle": "string",        "target": "string",        "targetHandle": "string",        "edgeType": "EDGE_TYPE_EXECUTION",        "order": 0      }    ],    "instanceId": "64d2028c-ae87-4069-a624-66089d957ef9",    "paused": true,    "quotas": {      "maxExecutionCount": "string",      "maxExecutionTimeMs": "string",      "maxConcurrentTriggers": 0,      "maxStateStoreEntries": "string",      "disableTimeouts": true    }  },  "diagnostics": [    {      "nodeId": "string",      "edgeId": "string",      "message": "string",      "severity": "DIAGNOSTIC_ERROR"    }  ]}

How is this page?