Comment on page
deleteRecord
This method is to delete one or more records.
The records will be deleted from the local computer, but also from the EMOTIV account of the user in the cloud, and from any computer where the user is logged in.
Your application cannot delete a record that was created by another application.
Deleting a record is irreversible. There is no way to recover a deleted record.
Name | Type | Required | Description |
cortexToken | string | yes | |
records | array of strings | yes | An array of record ids. |
The result is an object that includes these fields:
Name | Type | Description |
success | array of objects | For each record you successfully deleted, this array contains an object that includes the record id. |
failure | array of objects | For each record that couldn't be deleted, this array contains an object that describes the error. |
In case of success, you get an object with these fields:
Name | Type | Description |
recordId | string | The id of the record that was successfully deleted. |
In case of failure, you get an object with these fields:
Name | Type | Description |
recordId | string | The id of the record that couldn't be deleted. |
code | number | The error code. |
message | string | The error message. |
Deleting two records, including one that has an invalid id.
Request
Response
{
"id": 1,
"jsonrpc": "2.0",
"method": "deleteRecord",
"params": {
"cortexToken": "xxx",
"records": [
"d8fe7658-71f1-4cd6-bb5d-f6775b03438f",
"invalid-id"
]
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"success": [
{"recordId":"d8fe7658-71f1-4cd6-bb5d-f6775b03438f"}
],
"failure": [
{"recordId":"invalid-id","code":1234,"message":"..."}
]
}
}
Last modified 4yr ago