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
  • Description
  • Status
  • Examples
  1. Sessions

Session object

PreviousquerySessionsNextData Subscription

Last updated 5 years ago

A session is the link between your application and a headset.

You must create a session before you call to receive data from a headset. See .

Description

A session object includes these fields:

Name

Type

Description

id

string

The id of this session.

status

string

Can be "opened", "activated", or "closed".

owner

string

The EmotivID of the user.

license

string

The id of the license used by this session. Or an empty string if the session wasn't activated.

appId

string

The application id of your Cortex app.

started

string (ISO datetime)

When this session was created.

stopped

string (ISO datetime)

When this session was closed.

streams

array of strings

recordIds

array of strings

recording

boolean

True if a record is currently in progress for this session. False otherwise.

headset

object

Status

The status is linked to the license. If the session is activated, it will be debited from the quota of the user's license.

Status

Description

opened

activated

closed

This session is closed, you cannot use it anymore.

Examples

A session with an Epoc+ headset. It is not activated. We subscribed to the performance metrics and motion data.

{
    "id": "8bfc26de-754b-4c1f-9771-acfd1a7da02c",
    "status": "opened",
    "owner": "jon.snow",
    "license": "",
    "appId": "com.jon.snow.winterfell-app",
    "started": "2019-05-29T14:18:45.108+07:00",
    "stopped": "",
    "headset": {
        "status": "connected"
        "connectedBy": "dongle",
        "customName": "",
        "dongle": "6ff",
        "firmware": "625",
        "id": "EPOCPLUS-3B9AXXXX",
        "motionSensors": [
            "GYROX",
            "GYROY",
            "GYROZ",
            "ACCX",
            "ACCY",
            "ACCZ",
            "MAGX",
            "MAGY",
            "MAGZ"
        ],
        "sensors": [
            "AF3",
            "F7",
            "F3",
            "FC5",
            "T7",
            "P7",
            "O1",
            "O2",
            "P8",
            "T8",
            "FC6",
            "F4",
            "F8",
            "AF4"
        ],
        "settings": {
            "eegRate": 256,
            "eegRes": 16,
            "memsRate": 64,
            "memsRes": 16,
            "mode": "EPOCPLUS"
        }
    },
    "recordIds": [],
    "recording": false,
    "streams": ["met","mot"]
}

The data streams you subscribed to. See .

The ids of all the records created by this session. See .

A . It contains information about the headset linked to this session.

The session was created with , but it doesn't use a license. You can activate or close this session with .

The session was activated with a license. You can close this session with .

subscribe
createSession
subscribe
createRecord
headset object
createSession
updateSession
updateSession