arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

unsubscribe

This method is to cancel a subscription that was previously created by the subscribe method.

hashtag
Parameters

Name

Type

Required

Description

The parameter streams must contain one or more values, chosen from this list: "eeg", "mot", "dev", "pow", "met", "com", "fac", "sys". See for details.

hashtag
Result

The result is an object that includes these fields:

In case of success, you get an object with these fields:

In case of failure, you get an object with these fields:

hashtag
Examples

Unsubscribe successfully from the performance metrics and motion streams.

cortexToken

string

yes

A token returned by .

session

string

yes

A session id returned by .

streams

array of strings

yes

The data streams you want to unsubscribe to.

Name

Type

Description

success

array of objects

For each stream you successfully unsubscribed to, this array contains an object with the name of the stream.

failure

array of objects

For each stream you failed to unsubscribed to, this array contains an object that describes the error.

Name

Type

Description

streamName

string

The name of the stream.

Name

Type

Description

streamName

string

The name of the stream.

code

number

The error code.

message

string

The error message.

Data Subscription
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "unsubscribe",
    "params": {
        "cortexToken": "xxx",
        "session": "c6b52ab2-8828-412c-b1b9-9c48842dc0c2",
        "streams": ["met","mot"]
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "failure":[],
        "success":[
            {"streamName":"met"},
            {"streamName":"mot"}
        ]
    }
}
authorize
createSession