Skip to content
watsonix edited this page Mar 19, 2017 · 5 revisions

Models

Heart rate measurement (RR intervals)

See also: Bluetooth data type: heart rate measurement

API

  • JSON

POST /users/{userId}/measurements/rr_intervals

Add one heart RR Interval measurement.

{
    mobileTime: timestamp,
    batchIndex: number, // Collecting measurements returns a batch of several RRIntervals, and this is the index within a single batch.
    value: number, // uint16
  }

POST /users/{userId}/measurements/activation

Add a subjective measurement: how activated you feel? Examples:

  • Pleasant full activation: ecstatic
  • Pleasant no activation: content, calm, blissfully chill.
{
  mobileTime: timestamp,
  value: number // 0–4 from sedate to very activated
}

POST /users/{userId}/measurements/pleasantness

Add a subjective measurement: how pleasant you feel? Examples:

  • Pleasant activation: ecstatic
  • Unpleasant activation: pissed off, anxious
  • Unpleasant no activation: sad
{
  mobileTime: timestamp,
  value: number // 0–4 from very unpleasant to very pleasant
}

POST /users/{userId}/measurements/rr_intervals

Add multiple heart RR Interval measurements. (not implemented yet)

[
  {
    mobileTime: timestamp,
    batchIndex: number, // Collecting measurements returns a batch of several RRIntervals, and this is the index within a single batch.
    value: number, // uint16
  },
  { /* record 2 */ },
  ...
]

Authorization (not implemented yet)

  • Each user has a single API key. We'll generate it, save it in the user record, and save it on each client.
  • HTTP requests are authorized with the header Authorization: Bearer {API key}.

User (not implemented yet)

  • id: uuid
  • api_key: string