SoulFire LogoSoulFire

Update script

Updates an existing script's metadata and/or node graph. Only specified fields are updated; others remain unchanged. Use update_nodes/update_edges flags to explicitly set empty lists.

PATCH
/v1/instances/{instance_id}/scripts/{script_id}

Updates an existing script's metadata and/or node graph. Only specified fields are updated; others remain unchanged. Use update_nodes/update_edges flags to explicitly set empty lists.

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

instance_id*string

The instance containing the script. Format: UUID string.

Formatuuid
script_id*string

The ID of the script to update. Format: UUID string.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to update an existing script.

name?|

Updated name for the script. If not set, the name remains unchanged.

description?|

Updated description for the script. If not set, the description remains unchanged.

nodes?array<>

Updated list of nodes. If provided, replaces the entire node list. If not provided, nodes remain unchanged.

edges?array<>

Updated list of edges. If provided, replaces the entire edge list. If not provided, edges remain unchanged.

updateNodes*boolean

Whether the nodes field should be updated (allows setting to empty list).

updateEdges*boolean

Whether the edges field should be updated (allows setting to empty list).

paused?|

Updated paused setting. If not set, the paused setting remains unchanged. If set to false and script was paused, the script will be restarted.

quotas*

Updated resource quotas for this script.

updateQuotas*boolean

Whether the quotas field should be updated (allows clearing quotas).

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "updateNodes": true,    "updateEdges": true,    "quotas": {      "disableTimeouts": true    },    "updateQuotas": 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?