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.
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.
Preferred API authentication. Use a JWT with the api audience.
In: header
Path Parameters
The instance to create the script in. Format: UUID string.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to create a new script.
The human-readable name for the script.
Optional description of what the script does.
Initial nodes for the script graph. Can be empty to create a blank script.
Initial edges for the script graph. Can be empty to create a blank script.
Whether the script should be created in paused state. If false (default), the script starts running immediately after creation.
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?
