Subjects

A subject is a participant in a study.

Get Subjects

Get a list of subjects in a study.

URL

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

Parameters

  • studyId: Study UUID

Sample Response

The following example shows two subjects. The property metadataFields is an array of key-value pairs corresponding to subjectMetadataFields defined on the associated study. (All metadata values are strings.)

{
"items": [
{
"accountId": "5d3b5950-1b00-11e7-8464-0a624d7022db",
"age": 58,
"createdTs": 1525723958162,
"displayName": "mc10-s07",
"gender": "MALE",
"height": 1.6002,
"id": "fd053720-5232-11e8-8695-028eb5a65596",
"isHidden": false,
"legaleseVersionAccepted": 1,
"legaleseVersionRequired": 1,
"metadataFields": [
{
"displayName": "Dominant Hand",
"value": "Left"
}
],
"modifiedTs": 1525726299410,
"programStartTs": 1525726298351,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"timezone": "US/Eastern",
"weight": 55.791816
},
{
"accountId": "5d3b5950-1b00-11e7-8464-0a624d7022db",
"age": 36,
"createdTs": 1525713548568,
"displayName": "mc10-s04",
"gender": "MALE",
"height": 1.8542,
"id": "c06b3980-521a-11e8-a47c-028eb5a65596",
"isHidden": false,
"legaleseVersionAccepted": 1,
"legaleseVersionRequired": 1,
"metadataFields": [
{
"displayName": "Dominant Hand",
"value": "Right"
}
],
"modifiedTs": 1525723165399,
"programStartTs": 1525715754509,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"timezone": "US/Eastern",
"weight": 111.13004
}
],
"size": 2
}

Get Subject

Get a specific subject by ID. As a convenience, this endpoint includes a full list of devices associated to the subject and a full list of recordings made by the subject.

URL

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

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

The following example contains metadata (and some data) for the subject named "mc10-s11". The property metadataFields is an array of key-value pairs corresponding to subjectMetadataFields defined on the associated study.

{
"age": 41,
"createdTs": 1525704063520,
"devices": [ ... ],
"displayName": "mc10-s11",
"gender": "MALE",
"height": 1.8542,
"id": "aae3c200-5204-11e8-bd02-0a84ea04a300",
"isHidden": false,
"legaleseVersionAccepted": 1,
"legaleseVersionRequired": 1,
"metadataFields": [
{
"displayName": "Dominant Hand",
"value": "Left"
}
],
"modifiedTs": 1526926947060,
"programStartTs": 1525707175869,
"recordings": [ ... ],
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"timezone": "US/Eastern",
"weight": 115.66596
}

Create Subject

Add a subject to a study.

The property displayName (called "Subject ID" in BioStamp® nPoint™) is required and must be unique to the study. The properties weight and height are optional and expressed in kilograms and meters, respectively. The property gender is optional; if provided, it must be "MALE" or "FEMALE". The property age is optional; if provided, it must be 18 or greater. The property metadataFields (an array of key-value pairs) should correspond to subjectMetadataFields for the associated study. The property timezone is required (see Dates and Times for acceptable values).

URL

POST https://mc10cloud.com/api/v1/studies/{studyId}/subjects

Parameters

  • studyId: Study UUID

Sample Request Body

The following example (POST data) describes a new subject: a 22-year-old male, right-handed, 1.7526 meters tall (69 inches / 39.3701) and 71.2141 kilograms (157 pounds / 2.20462).

{
"age": 22,
"displayName": "S-123-456",
"gender": "MALE",
"height": 1.7526,
"metadataFields": [
{
"displayName": "Dominant Hand",
"value": "RIGHT"
}
],
"timezone": "US/Eastern",
"weight": 71.2141
}

Sample Response

{
"id": "7635dda0-6d00-11e9-94b9-e9750c9818f0",
"links": [
{
"href": "/v1/studies/3213d920-468f-11e9-98d1-c23a677524f2/subjects/7635dda0-6d00-11e9-94b9-e9750c9818f0",
"rel": "self"
}
]
}

Create Subject Token

Generate a subject sign-in token for the BioStamp® nPoint™ Link app. This endpoint applies to studies run in the remote setting.

URL

POST https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/tokens

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

{
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "fd053720-5232-11e8-8695-028eb5a65596",
"token": "dlkaxesltdqehnph"
}