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
  • Activate a session
  • Close a session
  1. Sessions

updateSession

PreviouscreateSessionNextquerySessions

Last updated 5 years ago

This method is to activate or close a session. See for details.

Parameters

Name

Type

Required

Description

cortexToken

string

yes

session

string

yes

status

string

yes

Must be "active" or "close".

Result

The result is a representing the updated session.

Examples

Activate a session

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "updateSession",
    "params": {
        "cortexToken": "xxx",
        "session": "38fef6d7-979b-420b-aa25-dd60ef5edc02",
        "status": "active"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "id": "38fef6d7-979b-420b-aa25-dd60ef5edc02",
        "status":"activated",
        ...
    }
}

Close a session

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "updateSession",
    "params": {
        "cortexToken": "xxx",
        "session": "38fef6d7-979b-420b-aa25-dd60ef5edc02",
        "status": "close"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "appId": "com.jon.snow.winterfell-app",
        "headset": {
            "connectedBy": "dongle",
            "customName": "",
            "dongle": "6ff",
            "firmware": "925",
            "id": "INSIGHT-5A68XXXX",
            "motionSensors": [
                "GYROX",
                "GYROY",
                "GYROZ",
                "ACCX",
                "ACCY",
                "ACCZ",
                "MAGX",
                "MAGY",
                "MAGZ"
            ],
            "sensors": [
                "AF3",
                "T7",
                "Pz",
                "T8",
                "AF4"
            ],
            "settings": {
                "eegRate": 128,
                "eegRes": 14,
                "memsRate": 128,
                "memsRes": 14,
                "mode": "UNKNOWN"
            },
            "status": "connected"
        },
        "id": "38fef6d7-979b-420b-aa25-dd60ef5edc02",
        "license": "xxx",
        "owner": "jon.snow",
        "recordIds": [
            "d8fe7658-71f1-4cd6-bb5d-f6775b03438f"
        ],
        "recording": false,
        "started": "2019-06-06T11:41:53.168+07:00",
        "status": "closed",
        "stopped": "2019-06-06T11:42:23.531+07:00",
        "streams": []
    }
}

The token returned by .

A session id returned by .

Sessions
session object
authorize
createSession