Cortex API
  • Getting Started
  • Connecting to the Cortex API
  • Overview of API flow
  • Authentication
    • getCortexInfo
    • getUserLogin
    • requestAccess
    • hasAccessRight
    • authorize
    • generateNewToken
    • getUserInformation
    • getLicenseInfo
  • Headsets
    • controlDevice
    • queryHeadsets
    • updateHeadset
    • updateHeadsetCustomInfo
    • syncWithHeadsetClock
    • Headset object
  • Sessions
    • createSession
    • updateSession
    • querySessions
    • Session object
  • Data Subscription
    • subscribe
    • unsubscribe
    • Data sample object
  • Records
    • createRecord
    • stopRecord
    • updateRecord
    • deleteRecord
    • exportRecord
    • queryRecords
    • getRecordInfos
    • configOptOut
    • requestToDownloadRecordData
    • Record object
  • Markers
    • injectMarker
    • updateMarker
    • Marker object
  • Subjects
    • createSubject
    • updateSubject
    • deleteSubjects
    • querySubjects
    • getDemographicAttributes
    • Subject object
  • BCI
    • queryProfile
    • getCurrentProfile
    • setupProfile
    • loadGuestProfile
    • getDetectionInfo
    • training
    • Readonly profile
  • Advanced BCI
    • getTrainedSignatureActions
    • getTrainingTime
    • facialExpressionSignatureType
    • facialExpressionThreshold
    • mentalCommandActiveAction
    • mentalCommandBrainMap
    • mentalCommandGetSkillRating
    • mentalCommandTrainingThreshold
    • mentalCommandActionSensitivity
  • Warning Objects
  • Error Codes
  • Troubleshooting Guide
  • Release Notes
  • cortexaccess tool
Powered by GitBook
On this page
  • Parameters
  • Result
  • Examples
  1. Data Subscription

unsubscribe

PrevioussubscribeNextData sample object

Last updated 6 years ago

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

Parameters

Name

Type

Required

Description

cortexToken

string

yes

session

string

yes

streams

array of strings

yes

The data streams you want to unsubscribe to.

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

Result

The result is an object that includes these fields:

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.

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

Name

Type

Description

streamName

string

The name of the stream.

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

Name

Type

Description

streamName

string

The name of the stream.

code

number

The error code.

message

string

The error message.

Examples

Unsubscribe successfully from the performance metrics and motion streams.

{
    "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"}
        ]
    }
}

A token returned by .

A session id returned by .

subscribe
Data Subscription
authorize
createSession