Cortex API
Search…
createRecord
This method is to create a new record.
You must create and activate a session before you call this method. See createSession for details.

Parameters

Name
Type
Required
Description
cortexToken
string
yes
A token returned by authorize.
session
string
yes
A session id returned by createSession.
title
string
yes
The title of the record. Must be 200 characters or less.
description
string
no
The description of the record.
subjectName
string
no
The name of a subject created by createSubject. The subject is the person wearing the headset during the record. If you omit this field, then Cortex assumes that the current user is using the headset.
tags
array of strings
no
A list of tags you can associate to this record. You can use queryRecords to search the records by tags.
experimentId
number (integer)
no
An experiment id you can associate to this record. If you omit this parameter then the experimentId of the record will be zero.
This parameter was added in Cortex 2.2.1

Result

The result is an object containing two fields:
Name
Type
Description
record
object
A record object that represents the created record.
sessionId
string
The id of the session this record is linked to.

Examples

Request
Response
1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"method": "createRecord",
5
"params": {
6
"cortexToken": "xxx",
7
"session": "1067dc90-eb17-489b-9514-69cb79ac696c",
8
"title": "Cortex Examples C++"
9
}
10
}
Copied!
1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"result": {
5
"record": {
6
"uuid": "222eb845-bc44-4a01-bf28-07445a7c7e8a",
7
"applicationId": "com.jon.snow.winterfell-app",
8
"applicationVersion": "1.0",
9
"description": "",
10
"endDatetime": "",
11
"experimentId": 0,
12
"licenseId": "xxx",
13
"licenseScope": ["pm","eeg"],
14
"ownerId": "76c3468a-d9c0-428d-81b4-bdac5d63860e",
15
"startDatetime": "2019-05-31T11:06:24.398560+07:00",
16
"tags": [],
17
"title": "Cortex Examples C++"
18
},
19
"sessionId": "1067dc90-eb17-489b-9514-69cb79ac696c"
20
}
21
}
Copied!
Last modified 1yr ago
Copy link