Releasesv0.1.0
Read data

One ECG recording with its voltage samples

GET
/v1/users/{id}/ecg/{ecg_id}

One recording and its stored voltage samples, in offset order, as two parallel arrays: offsets_s (seconds from start_date) and voltages_uv (microvolts), single lead. At most 100000 samples are returned (a recording holds about 15360); truncated is true when more are stored. A recording that is not the user's, or a user of another tenant, is a 404.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid
ecg_id*integer
Formatint64

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

The recording.

application/json
  1. response
provider*string

The integration the record came through (apple_health, withings...).

source*|

The vendor that produced the record, when it differs or is known.

device*string|null
ingested_at*string
Formatdate-time
id*integer
Formatint64
start_date*string
Formatdate-time
end_date*|
Formatdate-time
classification*|

The label the recording device gave, in its maker's vocabulary, passed through as recorded. Apple Health: not_set, sinus_rhythm, atrial_fibrillation, inconclusive_low_heart_rate, inconclusive_high_heart_rate, inconclusive_poor_reading, inconclusive_other, unrecognized. Withings: negative, positive, inconclusive. Null when the stored value is none of these.

classification_value*integer

The stored value the label comes from.

symptoms_status*|

Whether the person recorded symptoms with the recording (not_set, none, present).

average_heart_rate*|

Beats per minute, as the device reported it.

sampling_frequency_hz*number

Samples per second; 0 when the provider gives none.

number_of_measurements*integer

The sample count the device reported.

metadata*

Provider fields kept as is, plus timezone (IANA name) when known.

samples*
curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/ecg/0' \  -H 'Authorization: Bearer ohs_sk_...'
{  "provider": "string",  "source": "string",  "device": "string",  "ingested_at": "2019-08-24T14:15:22Z",  "id": 0,  "start_date": "2019-08-24T14:15:22Z",  "end_date": "2019-08-24T14:15:22Z",  "classification": "sinus_rhythm",  "classification_value": 0,  "symptoms_status": "string",  "average_heart_rate": 0,  "sampling_frequency_hz": 0,  "number_of_measurements": 0,  "metadata": {},  "samples": {    "count": 0,    "truncated": true,    "offsets_s": [      0    ],    "voltages_uv": [      0    ]  }}
Edit on GitHub