Skip to content

Update the patch for a Pipeline

PUThttps://api.neuroscale.io/v2.0/pipelines/{pipeline-id}/patch

Path parameters

Name Type Description
pipeline-id String Unique identifier of the Pipeline.

The patch for a Pipeline represents a JSON-encoded directed acyclic graph (DAG) that defines the processing nodes, their inputs and outputs, their parameters, and their inter-dependencies (i.e. edges). In essence, it is a runtime-agnostic workflow definition that describes the flow of data in a Pipeline. They can be exchanged freely amongst systems, platforms and frameworks that can parse and understand the 'patch' format.

To update the patch for a Pipeline send a JSON-encoded object that conforms to the following JSON Schema:

Important!

To update the patch for a Pipeline, you must send the entire JSON-encoded object. You cannot perform a partial update of the patch; you must overwrite the entire patch at once.

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "NeuroScale Patch Format",
    "description": "Directed acyclic graph (DAG) of processing nodes, their inputs and outputs, their parameters, and their inter-dependencies (i.e. edges).",
    "type": "object",
    "properties": {
        "edges": {
            "description": "List of edges connecting the patch's processing nodes together to form a DAG.",
            "type": "array",
            "items": {
                "$ref": "#/definitions/edge"
            },
            "uniqueItems": True
        },
        "nodes": {
            "description": "Set of processing nodes belonging to the patch.",
            "type": "object",
            "items": {
                "$ref": "#/definitions/node"
            }
        }
    },
    "required": [
        "edges",
        "nodes"
    ],
    "definitions": {
        "edge": {
            "description": "Tuple representing a link from a source node/port to a destination node/port.",
            "type": "array",
            "items": {
                "type": "string",
                "minLength": 1
            },
            "minItems": 4,
            "maxItems": 4
        },
        "node": {
            "description": "A processing node.",
            "type": "object",
            "properties": {
                "class": {
                    "description": "Name of the node's class (e.g. FIRFilter).",
                    "type": "string",
                    "minLength": 1
                },
                "module": {
                    "description": "Name of the module in which the node's class resides (e.g. neuropype.nodes.filters).",
                    "type": "string",
                    "minLength": 1
                },
                "params": {
                    "description": "Editable parameters of the node and their values.",
                    "type": "object",
                    "items": {
                        "$ref": "#/definitions/node/definitions/param"
                    }
                }
            },
            "required": [
                "class",
                "module",
                "params"
            ],
            "definitions": {
                "param": {
                    "description": "Editable parameter of a processing node.",
                    "type": "object",
                    "properties": {
                        "value": {
                            "description": "Value of the parameter."
                        },
                        "type": {
                            "description": "Type of the parameter (e.g. EnumPort, IntPort, StringPort, etc.).",
                            "type": "string",
                            "minLength": 1
                        },
                        "customized": {
                            "description": "Whether or not the value of the parameter has changed from the default.",
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "value",
                        "type",
                        "customized"
                    ]
                }
            }
        }
    }
}

Authentication

Type: Access token
Required scopes: pipeline or update:pipeline

Responses

Example response — 200