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.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://127.0.0.1:38765/v1/instances/:instance_id/scripts" \  -H "Content-Type: application/json" \  -d '{}'
{
  "script": {
    "id": "string",
    "name": "string",
    "description": "string",
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "position": {
          "x": 0.1,
          "y": 0.1
        },
        "data": {
          "property1": {
            "null_value": "NULL_VALUE",
            "number_value": 0.1,
            "string_value": "string",
            "bool_value": true,
            "struct_value": {
              "fields": {
                "property1": {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {}
                  },
                  "list_value": {
                    "values": [
                      {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    ]
                  }
                },
                "property2": {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {}
                  },
                  "list_value": {
                    "values": [
                      {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    ]
                  }
                }
              }
            },
            "list_value": {
              "values": [
                {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {
                      "property1": {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      },
                      "property2": {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    }
                  },
                  "list_value": {
                    "values": []
                  }
                }
              ]
            }
          },
          "property2": {
            "null_value": "NULL_VALUE",
            "number_value": 0.1,
            "string_value": "string",
            "bool_value": true,
            "struct_value": {
              "fields": {
                "property1": {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {}
                  },
                  "list_value": {
                    "values": [
                      {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    ]
                  }
                },
                "property2": {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {}
                  },
                  "list_value": {
                    "values": [
                      {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    ]
                  }
                }
              }
            },
            "list_value": {
              "values": [
                {
                  "null_value": "NULL_VALUE",
                  "number_value": 0.1,
                  "string_value": "string",
                  "bool_value": true,
                  "struct_value": {
                    "fields": {
                      "property1": {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      },
                      "property2": {
                        "null_value": "NULL_VALUE",
                        "number_value": 0.1,
                        "string_value": "string",
                        "bool_value": true,
                        "struct_value": {
                          "fields": {}
                        },
                        "list_value": {
                          "values": []
                        }
                      }
                    }
                  },
                  "list_value": {
                    "values": []
                  }
                }
              ]
            }
          }
        },
        "muted": true,
        "collapsed": true,
        "width": 0.1,
        "height": 0.1,
        "contained_nodes": [
          "string"
        ],
        "label": "string",
        "resolved_type": "PORT_TYPE_ANY",
        "parent_frame_id": "string"
      }
    ],
    "edges": [
      {
        "id": "string",
        "source": "string",
        "source_handle": "string",
        "target": "string",
        "target_handle": "string",
        "edge_type": "EDGE_TYPE_EXECUTION"
      }
    ],
    "instance_id": "string",
    "paused": true,
    "quotas": {
      "max_execution_count": 0,
      "max_execution_time_ms": 0,
      "max_concurrent_triggers": 0,
      "max_state_store_entries": 0,
      "disable_timeouts": true
    }
  },
  "diagnostics": [
    {
      "node_id": "string",
      "edge_id": "string",
      "message": "string",
      "severity": "DIAGNOSTIC_ERROR"
    }
  ]
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}

How is this page?