Recordings

A recording represents physiological data collected by a single sensor.

Get Recording Metadata for Study

Get metadata about all recordings for a study.

Each recording includes a reference to an "export" file. This is not the location of the export file itself. Rather, it is an API endpoint that returns a signed URL. Follow the signed URL to download a ZIP file with CSV data of the entire recording.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/recordings

Parameters

  • studyId: Study UUID

Sample Response

{
"items": [
{
"createdTs": 1525705305000,
"deviceConfigId": "441ed920-4f15-11e8-bd02-0a84ea04a300",
"export": {
"href": "/v1/studies/f7888660-4f14-11e8-a47c-028eb5a65596/exports/ce8b8200-520a-11e8-bd02-0a84ea04a300/href",
"sizeBytes": 2719063
},
"faults": [],
"firmwareId": "v0-1558-g4b740c64",
"hardwareId": "5.1",
"id": "53785ece-9ccd-3ae8-b82b-b4fd2e376c96",
"physicalConfig": {
"location": "FLEXOR_DIGITORUM",
"side": "RIGHT",
"signal": "EMG"
},
"recordingId": 1525705305000,
"recordingStartTs": 1525705305073,
"recordingStopTs": 1525706342899,
"sensorConfig": {
"afe": {
"gain": 12,
"rate": 250
},
"gyro": {
"accelLowPower": true,
"accelRange": 16,
"gyroAutoCalib": false,
"mode": "ACCEL",
"periodMs": 32
},
"sensingType": "MPU_ANALOG"
},
"status": "COMPLETE",
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "aae3c200-5204-11e8-bd02-0a84ea04a300",
"udid": "e2:d7:46:c3:40:9e",
"uploadStartTs": 1525706700264
},
...
],
"size": 109
}

Get Recording Metadata for Subject

Get metadata about all recordings for a subject.

Each recording includes a reference to an "export" file. This is not the location of the export file itself. Rather, it is an API endpoint that returns a signed URL. Follow the signed URL to download a ZIP file with CSV data of the entire recording.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/recordings

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

{
"items": [
{
"createdTs": 1525714046000,
"deviceConfigId": "9bb96220-4f17-11e8-bd02-0a84ea04a300",
"export": {
"href": "/v1/studies/f7888660-4f14-11e8-a47c-028eb5a65596/exports/9c0e75d0-521e-11e8-a47c-028eb5a65596/href",
"sizeBytes": 2520114
},
"faults": [],
"firmwareId": "v0-1558-g4b740c64",
"hardwareId": "5.1",
"id": "bbf52118-a9a4-32b4-a5ba-4e787a941549",
"physicalConfig": {
"location": "PECTORALIS",
"side": "LEFT",
"signal": "EMG"
},
"recordingId": 1525714046000,
"recordingStartTs": 1525714046276,
"recordingStopTs": 1525714868805,
"sensorConfig": {
"afe": {
"gain": 12,
"rate": 250
},
"gyro": {
"accelLowPower": true,
"accelRange": 16,
"gyroAutoCalib": false,
"mode": "ACCEL",
"periodMs": 32
},
"sensingType": "MPU_ANALOG"
},
"status": "COMPLETE",
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "c06b3980-521a-11e8-a47c-028eb5a65596",
"udid": "e2:d7:46:c3:40:9e",
"uploadStartTs": 1525715205407
},
...
],
"size": 18
}

Get Recording Data

Get "raw" recording data for a specific time frame for a specific subject, optionally for a specific device. The number of rows returned by this endpoint depends on the sampling rate of the highest-freqency recording at the time. If a result if truncated, the payload will include a "next" link. As a rule, you should request no more than 60 seconds of data at a time.

Alternatively, you can download entire recordings in CSV format. See Get Recording Metadata for Study and Get Recording Metadata for Subject.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/data?from={from}&to={to}&deviceId={deviceId}&tsMicros={tsMicros}

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

  • from: Beginning timestamp (UTC), inclusive

  • to: Ending timestamp (UTC), inclusive

  • deviceId: (Optional) Sensor MAC address (UDID)

  • tsMicros: (Optional) If true, use microsecond precision. Default is false

Sample Response

The following example shows two channels of data—accelerometry and electrical potential—from one sensor placed on the chest.

Acceleration ("x", "y", and "z") is expressed as gravitational force, or g-force. Rotation ("x", "y", and "z") is expressed in degrees per second. Electrical potential ("v") is expressed in volts.

{
"channels": [
{
"dimensions": [
"x",
"y",
"z"
],
"recording": {
"createdTs": 1525715571000,
"deviceConfigId": "f78c5716-4f14-11e8-a47c-028eb5a65596",
"export": {
"href": "/v1/studies/f7888660-4f14-11e8-a47c-028eb5a65596/exports/167baf30-5261-11e8-8695-028eb5a65596/href",
"sizeBytes": 69733902
},
"faults": [],
"firmwareId": "v0-1558-g4b740c64",
"hardwareId": "5.1",
"id": "bb8065dd-74bf-3649-96fe-165270579b03",
"physicalConfig": {
"location": "ECG_LEAD_II",
"side": "NONE",
"signal": "ECG"
},
"recordingId": 1525715571000,
"recordingStartTs": 1525715571333,
"recordingStopTs": 1525742388354,
"sensorConfig": {
"afe": {
"gain": 12,
"rate": 250
},
"gyro": {
"accelLowPower": true,
"accelRange": 16,
"gyroAutoCalib": false,
"mode": "ACCEL",
"periodMs": 32
},
"sensingType": "MPU_ANALOG"
},
"status": "COMPLETE",
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "c06b3980-521a-11e8-a47c-028eb5a65596",
"udid": "c4:08:49:20:f4:54",
"uploadStartTs": 1525743757591
},
"times": [
1525715709357,
1525715709389,
1525715709420,
...
],
"type": "ACCEL",
"values": {
"x": [
-0.5065995269703212,
-0.5642175936522467,
-0.6003509575036237,
...
],
"y": [
0.8996719310292214,
0.8352178225375759,
0.7868772411688418,
...
],
"z": [
0.2956588082703888,
0.2717326619363689,
0.31519035629816017,
...
]
}
},
{
"dimensions": [
"v"
],
"recording": {
"createdTs": 1525715571000,
"deviceConfigId": "f78c5716-4f14-11e8-a47c-028eb5a65596",
"export": {
"href": "/v1/studies/f7888660-4f14-11e8-a47c-028eb5a65596/exports/167baf30-5261-11e8-8695-028eb5a65596/href",
"sizeBytes": 69733902
},
"faults": [],
"firmwareId": "v0-1558-g4b740c64",
"hardwareId": "5.1",
"id": "bb8065dd-74bf-3649-96fe-165270579b03",
"physicalConfig": {
"location": "ECG_LEAD_II",
"side": "NONE",
"signal": "ECG"
},
"recordingId": 1525715571000,
"recordingStartTs": 1525715571333,
"recordingStopTs": 1525742388354,
"sensorConfig": {
"afe": {
"gain": 12,
"rate": 250
},
"gyro": {
"accelLowPower": true,
"accelRange": 16,
"gyroAutoCalib": false,
"mode": "ACCEL",
"periodMs": 32
},
"sensingType": "MPU_ANALOG"
},
"status": "COMPLETE",
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "c06b3980-521a-11e8-a47c-028eb5a65596",
"udid": "c4:08:49:20:f4:54",
"uploadStartTs": 1525743757591
},
"times": [
1525715709336,
1525715709340,
1525715709344,
...
],
"type": "ECG",
"values": {
"v": [
0.0004954350092825632,
0.000501589481447573,
0.0004954350092825632,
...
]
}
},
...
]
}

Get Recording Stats

Get recording statistics for each subject in a study.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/recording_stats

Parameters

  • studyId: Study UUID

Sample Response

The following example shows recording statistics for two subjects.

The property countDays is the distinct number of days in which recordings were started (i.e. it does not account for recordings that span multiple days); countSensors is the distinct number of sensors ever assigned to the subject; durationMs is the sum of all recording durations for all sensors; firstStartTs and lastStartTs are the start times of the first and last recordings for the subject; lastUploadTs is the upload time of the last recording for the subject.

{
"items": [
{
"countDays": 4,
"countRecordings": 18,
"countSensors": 4,
"durationMs": 759492069,
"firstStartTs": 1525707545530,
"lastStartTs": 1525914337974,
"lastUploadTs": 1525995750223,
"subjectId": "22785730-520b-11e8-a47c-028eb5a65596"
},
{
"countDays": 2,
"countRecordings": 10,
"countSensors": 3,
"durationMs": 794349718,
"firstStartTs": 1525718559863,
"lastStartTs": 1525968027193,
"lastUploadTs": 1526323611103,
"subjectId": "55693a60-5224-11e8-bd02-0a84ea04a300"
}
],
"size": 2
}

Get Recording Stats by Day

Get recording statistics for a study, aggregated by day.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/daily_recording_stats

Parameters

  • studyId: Study UUID

Sample Response

The following example shows recording statistics for the first five days of a study.

The property countSubjects is the distinct number of subjects who started recordings on the respective day; firstRecStartTs and lastRecStartTs are the start times of the first and last recordings on the respective day; sumDurationMs is the combined length of all recordings started on the respective day.

{
"items": [
{
"countRecordings": 60,
"countSubjects": 7,
"date": "2018-05-07",
"firstRecStartTs": 1525705305073,
"lastRecStartTs": 1525745839103,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"sumDurationMs": 2230232651
},
{
"countRecordings": 15,
"countSubjects": 4,
"date": "2018-05-08",
"firstRecStartTs": 1525823688500,
"lastRecStartTs": 1525829888511,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"sumDurationMs": 923505639
},
{
"countRecordings": 15,
"countSubjects": 5,
"date": "2018-05-09",
"firstRecStartTs": 1525843236344,
"lastRecStartTs": 1525915584981,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"sumDurationMs": 1101843971
},
{
"countRecordings": 10,
"countSubjects": 3,
"date": "2018-05-10",
"firstRecStartTs": 1525926127049,
"lastRecStartTs": 1526003079032,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"sumDurationMs": 967405628
},
{
"countRecordings": 3,
"countSubjects": 1,
"date": "2018-05-11",
"firstRecStartTs": 1526013862719,
"lastRecStartTs": 1526013942692,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"sumDurationMs": 163692609
}
],
"size": 5
}