Skip to content

Update an existing Instance

PATCHhttps://api.neuroscale.io/v2.0/instances/{instance-id}

Path parameters

Name Type Description
instance-id String Unique identifier of the Instance.

To update an Instance send a JSON-encoded object containing updated values for one or more of the following attributes:

Important!

Attributes shown in bold will trigger an automatic reset of the Instance if any of their values are changed during an update.

Name Type Description
description String Description of the Instance.
encoding String Encoding of messages sent and received by the Instance (value is either "json" or "msgpack"). See Understanding Instance Metadata and the NeuroScale Message Format for more information.
metadata Object / Hash Configuration of the Instance's input nodes and output nodes. See Understanding Instance Metadata and the NeuroScale Message Format for more information.
mode String Mode of the Instance (value is one of "predict", "simulate" or "train").
parameters Object / Hash Object of key-value pairs defining user-adjustable Pipeline parameters and their Instance-specific values.
properties Object / Hash User-editable object of key-value pairs that can be used to add arbitrary tags to the Instance (for personal use).
replace_nans Boolean Designates whether or not to replace NaNs in incoming/outgoing messages.
replace_nans_with Double The value to replace NaNs with in incoming/outgoing messages.
time_to_live Integer Time to live (in seconds) from last received incoming message (Instance will be automatically terminated if this value is exceeded).

Authentication

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

Responses

Example response — 200

{
    "created_at": 1445979369,
    "description": "Updated description of Instance",
    "encoding": "msgpack",
    "endpoints": {
        "count": 2,
        "data": [
            {
                "created_at": 1445979369,
                "id": "ep_o5YahbaaALiHe7SwqnkaYd",
                "instance": "in_pNSdRK7AL85ZqdD49qwQBg",
                "mode": "write",
                "object": "endpoint",
                "updated_at": 1445979369,
                "url": "mqtt://streaming.neuroscale.io:443/HQqa8gNM66RgJKnZ43SLWT/in"
            },
            {
                "created_at": 1445979369,
                "id": "ep_25jGWzHAcmzqVgvHB8RkH8",
                "instance": "in_pNSdRK7AL85ZqdD49qwQBg",
                "mode": "read",
                "object": "endpoint",
                "updated_at": 1445979369,
                "url": "mqtt://streaming.neuroscale.io:443/HQqa8gNM66RgJKnZ43SLWT/out"
            }
        ],
        "object": "list",
        "url": "/v1/instances/in_pNSdRK7AL85ZqdD49qwQBg/endpoints"
    },
    "id": "in_pNSdRK7AL85ZqdD49qwQBg",
    "metadata": {
        "nodes": {
            "in": [],
            "out": []
        }
    },
    "mode": "predict",
    "object": "instance",
    "parameters": {},
    "pipeline": "pl_xTg7suuqGzFCGcnmb6Xx7f",
    "properties": {
        "key_3": "value_3"
    },
    "replace_nans": false,
    "replace_nans_with": 0.0,
    "state": "configuring",
    "time_to_live": 7200,
    "updated_at": 1445979457,
    "user": "usr_ZTNc2sEjoq6JoEgPNFUg6g"
}