This document describes the public API of the Fitrockr platform.

Important
To use this API you need to have an API key from one of our platforms.
Not all data sets may be available for your use case. Supported data sets are determined by platform configuration and Garmin device utilized.
Important
Data is only refreshed when a user manually syncs their Garmin device. Please use data requests on a minute level. DO NOT GET DATA ON A MILLISECOND LEVEL.

Summary

The Fitrockr API consists of 3 API Collections.

User API

The User API contains all api requests focussing on user data. Beside searching for users and querying user details it also contains all APIs to retrieve user data for a specific period like Daily Summaries, Heart Rate, BBI,…​

Health Kpi

The Health Kpi contains all APIs dealing with the Health KPI Reporting. Fitrockr calculates certain KPIs based on the user data that can be bundled into Reports using the Fitrockr Admin Tool. The Health KPI API can be used to generate such Reports in raw or published form.

Status

The Status API can be used for checking, if the basic connection to fitrockr works and if everything is up and running.

Generic HOW TO to get User related data
  1. Connect to the Fitrockr API following the Communication & Authentication chapter

  2. Search for specific users that are relevant for you using the User Search API

  3. Use the id returned by the user search to query specific health values for the user.

Communication & Authentication

Fitrockr API uses an API key to secure the api. The API key is just valid for your instance and can be obtained from the Fitrockr Support & Sales team. Beside the API you have to provide the tenant identifier. This is used by the server to determine the right instance of the api request.

Base URL

The base url of the fitrockr api is https://api.fitrockr.com

API Key

The api key that the Fitrockr team provided you, has to be sent with every request header. The header name is X-API-Key.

Tenant Id

Your Fitrockr instance is identified by a tenant id. You have to send this identifier with every request in the X-Tenant header.

Example

Imagine your tenant key is example-tenant and your api key is 00000000-0000-0000-0000-000000000000. Your request should look like the following example

GET /v1/status/greet HTTP/1.1
Content-Type: application/json
X-Tenant: example-tenant
X-API-Key: 00000000-0000-0000-0000-000000000000
Host: api.fitrockr.com

Status-API

The status api is used to check, if the Fitrockr server is up and running.

Greet

The greet method of the status api is just returning a http 200 response with a constant string "Rock on!". You can use this method to check, if the fitrockr server is available.

Example Request
GET /v1/status/greet HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 10

"Rock on!"

Greet me

The greet me method is returning a constant greeting response containing the name of the registered application you are using. E.g., if the name of the application is "Ext App", this method would return "Rock on, Ext App!".

Example Request
GET /v1/status/greetMe HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 24

"Rock on, External App!"

User-API

The User API gives you access to all user related data like profile, daily summaries, activites,…​

User user search can be used to obtain users. The id of the user that is returned in the response can be used to obtain further data with other methods of the User API.

Table 1. Query Parameters
Parameter Description

query

Query string for first name, last name and email

page

The page to retrieve

size

Entries per page

Table 2. Response Object
Path Type Description

[].id

String

Identifier of the user

[].firstName

String

First name of the user

[].lastName

String

Last name of the user

[].profilePicUrl

String

Url to retrieve the user profile picture

Example Query Request
GET /v1/users?query=Gus&page=0&size=10 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Query Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 156

[{"id":"6605756edf579919e90c7e66","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"}]
Simple Paging Example Request
GET /v1/users?page=0&size=10 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Simple Paging Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 316

[{"id":"6605756edf579919e90c7e66","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"},{"id":"6605756edf579919e90c7e67","firstName":"Francisca","lastName":"Lowe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"}]

User Profile

The detailed profile of a certain user that speficied by the user id within the request path.

Table 3. /v1/users/{userId}/profile
Parameter Description

userId

User Identifier

Table 4. Response Object
Path Type Description

id

String

Identifier of the user

firstName

String

First name of the user

lastName

String

Last name of the user

profilePicUrl

String

Url to retrieve the user profile picture

gender

String

'm' for male or 'f' for female

country

String

ISO Country code (e.g. DE)

city

String

Optional City of the user

location

Null

Description of the location of a user beside city. E.g. Organization, Room Number,..

language

String

ISO Language code (e.g. de)

timeZone

String

Time Zone Identifier

email

String

Email of the user

yearOfBirth

Number

Year of Birth (used for calc. of basal metabolism)

imperialUnits

Boolean

true, if imperial units are being used. false for metric

height

Number

Height of the user in cm

heightUOM

String

Height Unit (cm or in)

weight

Number

Weight of the user in kg

weightUOM

String

Weight Unit (kg or lbs)

basalMetabolism

Number

Basal Metabolism of the user.

lastSync

String

Last tracker synchronization

trackerName

String

Name of the tracker, the user is currently using

active

Boolean

True, if the user is connected. Otherwise false

usualSleepStartTime

Number

Usual sleep start time (e.g. 2200)

usualSleepEndTime

Number

Usual sleep end time (e.g. 0600)

Example Request
GET /v1/users/6605756fdf579919e90c7e8d/profile HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 526

{"id":"6605756fdf579919e90c7e8d","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678","basalMetabolism":1234,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"UTC+1","email":"test@fitrockr.com","yearOfBirth":1985,"height":180,"heightUOM":"cm","weight":80,"weightUOM":"kg","lastSync":"2020-03-04T00:00:00+0100","trackerName":"Garmin","active":true,"usualSleepStartTime":2200,"usualSleepEndTime":600,"imperialUnits":false,"location":null}

Create User Profile

Create a new user on the platform

Table 5. Request Fields
Path Type Description

id

Null

Identifier of the user

firstName

String

First name of the user

lastName

String

Last name of the user

profilePicUrl

String

Url to retrieve the user profile picture

gender

String

'm' for male or 'f' for female

country

String

ISO Country code (e.g. DE)

city

String

Optional City of the user

location

Null

Description of the location of a user beside city. E.g. Organization, Room Number,..

language

String

ISO Language code (e.g. de)

timeZone

String

Time Zone Identifier

email

String

Email of the user

yearOfBirth

Number

Year of Birth (used for calc. of basal metabolism)

imperialUnits

Boolean

true, if imperial units are being used. false for metric

height

Number

Height of the user in cm

heightUOM

Null

Height Unit (cm or in)

weight

Number

Weight of the user in kg

weightUOM

Null

Weight Unit (kg or lbs)

basalMetabolism

Null

Basal Metabolism of the user.

lastSync

Null

Last tracker synchronization

trackerName

Null

Name of the tracker, the user is currently using

active

Null

True, if the user is connected. Otherwise false

usualSleepStartTime

Null

Usual sleep start time (e.g. 2200)

usualSleepEndTime

Null

Usual sleep end time (e.g. 0600)

Response Object
{"id":"6605756ddf579919e90c7e38","firstName":"John","lastName":"Doe","profilePicUrl":null,"basalMetabolism":1757,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+01:00","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":"cm","weight":82,"weightUOM":"kg","lastSync":null,"trackerName":null,"active":true,"usualSleepStartTime":null,"usualSleepEndTime":null,"imperialUnits":false,"location":null}
Example Request
POST /v1/users/ HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Content-Length: 440
Host: localhost:8080

{"id":null,"firstName":"John","lastName":"Doe","profilePicUrl":"https://images.fitrockr.com/1234","basalMetabolism":null,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+1","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":null,"weight":82,"weightUOM":null,"lastSync":null,"trackerName":null,"active":null,"usualSleepStartTime":null,"usualSleepEndTime":null,"imperialUnits":false,"location":null}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 436

{"id":"6605756ddf579919e90c7e38","firstName":"John","lastName":"Doe","profilePicUrl":null,"basalMetabolism":1757,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+01:00","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":"cm","weight":82,"weightUOM":"kg","lastSync":null,"trackerName":null,"active":true,"usualSleepStartTime":null,"usualSleepEndTime":null,"imperialUnits":false,"location":null}

Update User Profile

Update an existing user profile on the platform

Table 6. /v1/users/{userId}
Parameter Description

userId

User Identifier

Table 7. Request Fields
Path Type Description

id

Null

Identifier of the user

firstName

String

First name of the user

lastName

String

Last name of the user

profilePicUrl

String

Url to retrieve the user profile picture

gender

String

'm' for male or 'f' for female

country

String

ISO Country code (e.g. DE)

city

String

Optional City of the user

location

Null

Description of the location of a user beside city. E.g. Organization, Room Number,..

language

String

ISO Language code (e.g. de)

timeZone

String

Time Zone Identifier

email

String

Email of the user

yearOfBirth

Number

Year of Birth (used for calc. of basal metabolism)

imperialUnits

Boolean

true, if imperial units are being used. false for metric

height

Number

Height of the user in cm

heightUOM

Null

Height Unit (cm or in)

weight

Number

Weight of the user in kg

weightUOM

Null

Weight Unit (kg or lbs)

basalMetabolism

Null

Basal Metabolism of the user.

lastSync

Null

Last tracker synchronization

trackerName

Null

Name of the tracker, the user is currently using

active

Null

True, if the user is connected. Otherwise false

usualSleepStartTime

Null

Usual sleep start time (e.g. 2200)

usualSleepEndTime

Null

Usual sleep end time (e.g. 0600)

Response Object
{"id":"6605756edf579919e90c7e5d","firstName":"John","lastName":"Doe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678","basalMetabolism":1757,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+01:00","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":"cm","weight":82,"weightUOM":"kg","lastSync":"2020-03-04T00:00:00+0100","trackerName":"Garmin","active":true,"usualSleepStartTime":2200,"usualSleepEndTime":600,"imperialUnits":false,"location":null}
Example Request
PUT /v1/users/6605756edf579919e90c7e5d HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Content-Length: 440
Host: localhost:8080

{"id":null,"firstName":"John","lastName":"Doe","profilePicUrl":"https://images.fitrockr.com/1234","basalMetabolism":null,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+1","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":null,"weight":82,"weightUOM":null,"lastSync":null,"trackerName":null,"active":null,"usualSleepStartTime":null,"usualSleepEndTime":null,"imperialUnits":false,"location":null}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 524

{"id":"6605756edf579919e90c7e5d","firstName":"John","lastName":"Doe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678","basalMetabolism":1757,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"GMT+01:00","email":"john@doe.com","yearOfBirth":1975,"height":180,"heightUOM":"cm","weight":82,"weightUOM":"kg","lastSync":"2020-03-04T00:00:00+0100","trackerName":"Garmin","active":true,"usualSleepStartTime":2200,"usualSleepEndTime":600,"imperialUnits":false,"location":null}

Delete User Profile

Delete a user on the platform

Table 8. /v1/users/{userId}
Parameter Description

userId

User Identifier

Example Request
DELETE /v1/users/6605756fdf579919e90c7e82 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Create user join code

Create a join code for a user and a data collection profile with a license key.

Table 9. /v1/users/{userId}/createJoinCode/{licenseKey}
Parameter Description

userId

User Identifier

licenseKey

8 digit license key of the Project / Data Collection Profile (Multi Sync Tablet QR Code)

Example Request
GET /v1/users/6605756ddf579919e90c7e3a/createJoinCode/ABCD1234 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Response Object
{"joinCode":"null-6481","userId":"6605756ddf579919e90c7e3a"}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 60

{"joinCode":"null-6481","userId":"6605756ddf579919e90c7e3a"}

Creates an url that can be used to link Garmin Connect to the user account specified by the Id

Table 10. /v1/users/{userId}/createGarminConnectLinkUrl
Parameter Description

userId

User Identifier

Example Request
GET /v1/users/6605756edf579919e90c7e52/createGarminConnectLinkUrl HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Response Object
{"userId":"6605756edf579919e90c7e52","url":"https://admin.fitrockr.com/connectGarmin/\u003ctenant-id\u003e/905d0192-9a1b-49c3-a44c-54b2774d2e51"}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 145

{"userId":"6605756edf579919e90c7e52","url":"https://admin.fitrockr.com/connectGarmin/\u003ctenant-id\u003e/905d0192-9a1b-49c3-a44c-54b2774d2e51"}

Daily Summary

A daily summary contains the daily activity data of a user like total calories, steps, distance and also points. This request can be used to get one or more daily summaries. The date range can be specified by request parameters.

Note
The result has always a descending sort order.
Table 11. /v1/users/{userId}/dailySummaries
Parameter Description

userId

User Identifier

Table 12. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 13. Response Object
Path Type Description

[].userId

String

Identifier of user to which this object belongs

[].date.day

Number

Day of Daily Summary

[].date.month

Number

Month of Daily Summary

[].date.year

Number

Year of Daily Summary

[].points

Number

Points of the user on that day

[].calories

Number

Calories of the user on that day

[].steps

Number

Steps of the user on that day

[].distance

Number

Distance of the user on that day

[].activityMinutes

Number

Activity Minutes of the user on that day

Example Request
GET /v1/users/66057570df579919e90c7e9d/dailySummaries?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 297

[{"userId":"66057570df579919e90c7e9d","date":{"year":2024,"month":3,"day":29},"points":14,"calories":12,"steps":11,"distance":13,"activityMinutes":15},{"userId":"66057570df579919e90c7e9d","date":{"year":2024,"month":3,"day":28},"points":9,"calories":7,"steps":6,"distance":8,"activityMinutes":10}]

Daily Details

Daily Details contains more information on daily base compared to the daily summary.

Note
The result has always a descending sort order.
Table 14. /v1/users/{userId}/dailyDetails
Parameter Description

userId

User Identifier

Table 15. Query Parameters
Parameter Description

startDate

The start date

endDate

The end date

Table 16. Response Object
Path Type Description

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].endTime.date.day

Number

Day of the end of this record

[].endTime.date.month

Number

Month of the end of this record

[].endTime.date.year

Number

Year of the end of this record

[].endTime.time.hour

Number

Hour of the end of this record

[].endTime.time.minute

Number

Minute of the end of this record

[].endTime.time.second

Number

Second of the end of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration in seconds

[].activeKilocalories

Number

Active calories within the timeframe of this record

[].distanceInMeters

Number

Distance covered

[].moderateIntensityDurationInSeconds

Number

Cumulative duration of activities of moderate intensity (MET 3-6) lasting at least 600s at a time.

[].vigorousIntensityDurationInSeconds

Number

Cumulative duration of activities of vigorous intensity (MET >6) lasting at least 600s at a time

[].floorsClimbed

Number

Total number of floors climbed

[].averageStressLevel

Number

Average stress level of this period

[].maxStressLevel

Number

Maximum stress level in this period

[].stressDurationInSeconds

Number

Total stress duration in seconds

[].restStressDurationInSeconds

Number

Number of seconds with rest stress

[].activityStressDurationInSeconds

Number

Number of seconds the user was engaged in activity and stress duration was unreliable.

[].lowStressDurationInSeconds

Number

Number of seconds with low stress

[].mediumStressDurationInSeconds

Number

Number of seconds with medium stress

[].highStressDurationInSeconds

Number

Number of seconds with high stress

[].stressQualifier

String

Qualitative stress label. Possible values: unknown, calm, balanced, stressful, very_stressful, calm_awake, balanced_awake, stressful_awake, very_stressful_awake, ..

[].stepsGoal

Number

Step goal of the user

[].netKilocaloriesGoal

Number

calorie goal of the user

[].intensityDurationGoalInSeconds

Number

goal for intensity seconds

[].floorsClimbedGoal

Number

goal for floors climbed

[].minHeartRateInBeatsPerMinute

Number

Minimum heart rate (bpm)

[].avgHeartRateInBeatsPerMinute

Number

Average heart rate (bpm)

[].maxHeartRateInBeatsPerMinute

Number

Maximum heart rate (bpm)

[].summaryId

String

Id of this record

[].activityType

String

Type of activity of this record

[].calendarDate

String

Calendar date

[].steps

Number

Number of steps

Example Request
GET /v1/users/6605756fdf579919e90c7e72/dailyDetails?startDate=2024-03-25&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1041

[{"userId":"6605756fdf579919e90c7e72","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":49,"second":35}},"endTime":{"date":{"year":2024,"month":3,"day":27},"time":{"hour":14,"minute":49,"second":35}},"summaryId":"1b7105","calendarDate":"2021-01-01","startTimeInSeconds":1711464575,"startTimeOffsetInSeconds":0,"durationInSeconds":3600,"activityType":"WALKING","steps":1024,"activeKilocalories":2048.0,"distanceInMeters":512.0,"moderateIntensityDurationInSeconds":1200,"vigorousIntensityDurationInSeconds":600,"floorsClimbed":5,"minHeartRateInBeatsPerMinute":80,"avgHeartRateInBeatsPerMinute":100,"maxHeartRateInBeatsPerMinute":120,"averageStressLevel":89,"maxStressLevel":100,"stressDurationInSeconds":200,"restStressDurationInSeconds":100,"activityStressDurationInSeconds":10,"lowStressDurationInSeconds":20,"mediumStressDurationInSeconds":30,"highStressDurationInSeconds":40,"stressQualifier":"balanced","stepsGoal":5000,"netKilocaloriesGoal":3000,"intensityDurationGoalInSeconds":360,"floorsClimbedGoal":10}]

Heart Rate

The user heart rate values

Note
The result has always a descending sort order.
Table 17. /v1/users/{userId}/heartRate
Parameter Description

userId

User Identifier

Table 18. Query Parameters
Parameter Description

startDate

The start date

endDate

The end date

Table 19. Response Object
Path Type Description

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].calendarDate

String

Calendar date

[].value

Number

The heart rate value.

Example Request
GET /v1/users/6605756edf579919e90c7e6a/heartRate?startDate=2024-03-25&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 941

[{"userId":"6605756edf579919e90c7e6a","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":49,"second":34}},"calendarDate":"2021-01-01","startTimeInSeconds":1711464574,"startTimeOffsetInSeconds":0,"value":83},{"userId":"6605756edf579919e90c7e6a","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":44,"second":34}},"calendarDate":"2021-01-01","startTimeInSeconds":1711464274,"startTimeOffsetInSeconds":0,"value":84},{"userId":"6605756edf579919e90c7e6a","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":39,"second":34}},"calendarDate":"2021-01-01","startTimeInSeconds":1711463974,"startTimeOffsetInSeconds":0,"value":85},{"userId":"6605756edf579919e90c7e6a","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":34,"second":34}},"calendarDate":"2021-01-01","startTimeInSeconds":1711463674,"startTimeOffsetInSeconds":0,"value":86}]

Activities

A daily summary contains the daily activity data of a user like total calories, steps, distance and also points. This request can be used to get one or more daily summaries. The date range can be specified by request parameters.

Note
The result has always a descending sort order.
Table 20. /v1/users/{userId}/activities
Parameter Description

userId

User Identifier

Table 21. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 22. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].externalId

String

External Id of this activity (optional)

[].source

String

Source that recorded this activity

[].userId

String

Identifier of user to which this activity belongs

[].startDate.date.day

Number

Day of the start of this activity

[].startDate.date.month

Number

Month of the start of this activity

[].startDate.date.year

Number

Year of the start of this activity

[].startDate.time.hour

Number

Hour of the start of this activity

[].startDate.time.minute

Number

Minute of the start of this activity

[].startDate.time.second

Number

Second of the start of this activity

[].endDate.date.day

Number

Day of the end of this activity

[].endDate.date.month

Number

Month of the end of this activity

[].endDate.date.year

Number

Year of the end of this activity

[].endDate.time.hour

Number

Hour of the end of this activity

[].endDate.time.minute

Number

Minute of the end of this activity

[].endDate.time.second

Number

Second of the end of this activity

[].type

String

Type of the activity (e.g., Running, Walking, Rowing,..)

[].rawActivityType

Null

Raw Activity Type from the wearable

[].duration

Number

Duration of activity in seconds

[].amount

Number

Main value of the activity. (e.g. Distance for Walking, Strokes for rowing.)

[].unit

String

Unit for amount.

[].calories

Number

Burned calories.

[].distance

Number

Distance covered during activity

[].steps

Number

Steps taken during activity

Example Request
GET /v1/users/6605756fdf579919e90c7e7c/activities?startDate=2024-03-27&endDate=2024-03-30 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 883

[{"id":"6605756fdf579919e90c7e80","externalId":"A1235","source":"Fitrockr Hub","userId":"6605756fdf579919e90c7e7c","startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":19,"second":35}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":35}},"type":"Walking","rawActivityType":null,"duration":1800000,"amount":4000,"unit":"Meter","calories":200,"distance":4000.0,"steps":4000},{"id":"6605756fdf579919e90c7e7f","externalId":"A1234","source":"Fitrockr Hub","userId":"6605756fdf579919e90c7e7c","startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":49,"second":35}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":35}},"type":"Running","rawActivityType":null,"duration":3600000,"amount":9000,"unit":"Meter","calories":400,"distance":9000.0,"steps":8000}]

Activity Details

Returns the details of a certain activity.

Table 23. /v1/users/{userId}/activity/{activityId}
Parameter Description

userId

User Identifier

activityId

Activity Identifier

Table 24. Response Object
Path Type Description

id

String

Unique Identifier of this activity

startDate.date.day

Number

Day of the start of this activity

startDate.date.month

Number

Month of the start of this activity

startDate.date.year

Number

Year of the start of this activity

startDate.time.hour

Number

Hour of the start of this activity

startDate.time.minute

Number

Minute of the start of this activity

startDate.time.second

Number

Second of the start of this activity

endDate.date.day

Number

Day of the end of this activity

endDate.date.month

Number

Month of the end of this activity

endDate.date.year

Number

Year of the end of this activity

endDate.time.hour

Number

Hour of the end of this activity

endDate.time.minute

Number

Minute of the end of this activity

endDate.time.second

Number

Second of the end of this activity

offset

Null

Start time offset in sec

userId

String

Identifier of user to which this activity belongs

source

String

Source that recorded this activity

tracker

Null

Tracker used to record the activity

type

String

Type of the activity (e.g., Running, Walking, Rowing,..)

rawActivityType

Null

duration

Number

Duration of activity in seconds

amount

Number

Main value of the activity. (e.g. Distance for Walking, Strokes for rowing.)

unit

String

Unit for amount.

calories

Number

Burned calories.

distance

Number

Distance covered during activity

steps

Number

Steps taken during activity

averageHeartRate

Null

Average HR in bpm during activity

maxHeartRate

Null

Max HR in bpm during activity

averageRunningCadence

Null

Average running cadence during activity

maxRunningCadence

Null

Maximum running cadence during activity

averageSpeed

Null

Average speed during activity

maxSpeed

Null

Max speed during activity

totalMetMinutes

Null

Total Met Minutes of activity

activitySamples[].startTimeInSeconds

Number

activitySamples[].latitudeInDegree

Null

activitySamples[].longitudeInDegree

Null

activitySamples[].elevationInMeters

Null

activitySamples[].airTemperatureCelcius

Null

activitySamples[].heartRate

Null

activitySamples[].speedMetersPerSecond

Null

activitySamples[].stepsPerMinute

Null

activitySamples[].totalDistanceInMeters

Null

activitySamples[].timerDurationInSeconds

Null

activitySamples[].clockDurationInSeconds

Null

activitySamples[].movingDurationInSeconds

Null

activitySamples[].powerInWatts

Null

activitySamples[].bikeCadenceInRPM

Null

activitySamples[].swimCadenceInStrokesPerMinute

Null

activitySamples[].metMinute

Null

heartRateZoneDistribution.redZoneShare

Number

Red Zone share in Percent

heartRateZoneDistribution.redZoneSeconds

Number

Red Zone Share in Seconds

heartRateZoneDistribution.anerobicZoneShare

Number

Anerobic Zone share in Percent

heartRateZoneDistribution.anerobicZoneSeconds

Number

Anerobic Zone Share in Seconds

heartRateZoneDistribution.aerobicZoneShare

Number

Aerobic Zone share in Percent

heartRateZoneDistribution.aerobicZoneSeconds

Number

Aerobic Zone Share in Seconds

heartRateZoneDistribution.fatBurnZoneShare

Number

Fat Burn Zone share in Percent

heartRateZoneDistribution.fatBurnZoneSeconds

Number

Fat Burn Zone Share in Seconds

heartRateZoneDistribution.healthZoneShare

Number

Health Zone share in Percent

heartRateZoneDistribution.healthZoneSeconds

Number

Health Zone Share in Seconds

heartRateZoneDistribution.noZoneShare

Number

No Zone share in Percent

heartRateZoneDistribution.noZoneSeconds

Number

Nno Zone Share in Seconds

heartRateZoneDistribution.moderateShare

Number

Moderate Zone share in Percent

heartRateZoneDistribution.moderateSeconds

Number

Moderate Zone Share in Seconds

heartRateZoneDistribution.vigorousShare

Number

Vigorous Zone share in Percent

heartRateZoneDistribution.vigorousSeconds

Number

Vigorous Zone Share in Seconds

Example Request
GET /v1/users/66057570df579919e90c7e98/activity/66057570df579919e90c7e9b HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1404

{"id":"66057570df579919e90c7e9b","startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":49,"second":36}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":36}},"offset":null,"userId":"66057570df579919e90c7e98","source":"Fitrockr Hub","tracker":null,"type":"Running","rawActivityType":null,"duration":3600,"amount":9000,"unit":"Meter","calories":400,"distance":9000.0,"steps":8000,"averageHeartRate":null,"maxHeartRate":null,"averageRunningCadence":null,"maxRunningCadence":null,"averageSpeed":null,"maxSpeed":null,"totalMetMinutes":null,"activitySamples":[{"startTimeInSeconds":1,"latitudeInDegree":null,"longitudeInDegree":null,"elevationInMeters":null,"airTemperatureCelcius":null,"heartRate":null,"speedMetersPerSecond":null,"stepsPerMinute":null,"totalDistanceInMeters":null,"timerDurationInSeconds":null,"clockDurationInSeconds":null,"movingDurationInSeconds":null,"powerInWatts":null,"bikeCadenceInRPM":null,"swimCadenceInStrokesPerMinute":null,"metMinute":null}],"heartRateZoneDistribution":{"redZoneShare":0.0,"redZoneSeconds":0,"anerobicZoneShare":0.0,"anerobicZoneSeconds":0,"aerobicZoneShare":0.0,"aerobicZoneSeconds":0,"fatBurnZoneShare":0.0,"fatBurnZoneSeconds":0,"healthZoneShare":0.0,"healthZoneSeconds":0,"noZoneShare":0.0,"noZoneSeconds":0,"moderateShare":0.0,"moderateSeconds":10,"vigorousShare":0.0,"vigorousSeconds":0}}

Intraday

An intraday record contains the recorded data within a day for a certain timeframe. This request can be used to get one or more intraday records. The date range can be specified by request parameters.

Note
The result has always a descending sort order.
Table 25. /v1/users/{userId}/intraDays
Parameter Description

userId

User Identifier

Table 26. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 27. Response Object
Path Type Description

[].id

String

Unique Identifier of this intraday record

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].endTime.date.day

Number

Day of the end of this record

[].endTime.date.month

Number

Month of the end of this record

[].endTime.date.year

Number

Year of the end of this record

[].endTime.time.hour

Number

Hour of the end of this record

[].endTime.time.minute

Number

Minute of the end of this record

[].endTime.time.second

Number

Second of the end of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration in seconds

[].activeCalories

Number

Active calories within the timeframe of this record

[].distance

Number

Distance covered

[].activeSeconds

Number

Active seconds during the timeframe of this record

[].metValue

Number

Metabolic equivalent of this record

[].intensity

String

Motion intensity category

[].meanMotionIntensity

Number

Mean motion intensity

[].maxMotionIntensity

Number

Maximum motion intensity

[].averageStressLevel

Number

average stress level

[].maxStressLevel

Number

Maximum stress level

[].minHeartRateInBeatsPerMinute

Number

Minimum heart rate (bpm)

[].avgHeartRateInBeatsPerMinute

Number

Average heart rate (bpm)

[].maxHeartRateInBeatsPerMinute

Number

Maximum heart rate (bpm)

[].summaryId

String

Id of this record

[].activityType

String

Type of activity of this record

[].calendarDate

String

Calendar date

[].steps

Number

Number of steps

Example Request
GET /v1/users/6605756fdf579919e90c7e77/intraDays?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 732

[{"id":"6605756fdf579919e90c7e7a","userId":"6605756fdf579919e90c7e77","summaryId":"1b7105","activityType":"SEDENTARY","calendarDate":"2021-01-01","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"endTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":45,"second":0}},"startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":300,"activeCalories":23,"distance":15,"steps":23,"activeSeconds":5,"metValue":1.2,"intensity":"SEDENTARY","meanMotionIntensity":0.73,"maxMotionIntensity":1.3,"averageStressLevel":20,"maxStressLevel":50,"minHeartRateInBeatsPerMinute":70,"avgHeartRateInBeatsPerMinute":90,"maxHeartRateInBeatsPerMinute":120}]

Motion Intensity

This records contains the intensity of the motion that the tracker recorded for a certain timeframe.

Note
The result has always a descending sort order.
Table 28. /v1/users/{userId}/motionIntensity
Parameter Description

userId

User Identifier

Table 29. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 30. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

User identifier

[].activityType

String

Activity type detected at the time of the record

[].durationInSeconds

Number

Duration of this record in sec.

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].motionIntensity

Number

Intensity of the motion

Example Request
GET /v1/users/66057570df579919e90c7eab/motionIntensity?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 309

[{"id":"66057570df579919e90c7eae","userId":"66057570df579919e90c7eab","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":300,"activityType":"GENERIC","motionIntensity":23.4}]

Sleep

Sleep Records for a user

Note
The result has always a descending sort order.
Table 31. /v1/users/{userId}/sleep
Parameter Description

userId

User Identifier

Table 32. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 33. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

Identifier of user to which this activity belongs

[].tags[]

Array

Tagged, if day sleep, night sleep, nap or rem sleep

[].outdated

Boolean

The sleep was marked as outdated, because of new data received afterwards

[].sleepDay.day

Number

Day, the sleep is assigned to

[].sleepDay.month

Number

Month, the sleep is assigned to

[].sleepDay.year

Number

Year, the sleep is assigned to

[].summaryId

String

Internal summary id of this sleep

[].calendarDate

String

Day, the sleep started

[].processingDateTime.date.day

Number

Day of the processing time of this sleep

[].processingDateTime.date.month

Number

Month of the processing time of this sleep

[].processingDateTime.date.year

Number

Year of the processing time of this sleep

[].processingDateTime.time.hour

Number

Hour of the processing time of this sleep

[].processingDateTime.time.minute

Number

Minute of the processing time of this sleep

[].processingDateTime.time.second

Number

Second of the processing time of this sleep

[].startTime.date.day

Number

Day of the start of this sleep

[].startTime.date.month

Number

Month of the start of this sleep

[].startTime.date.year

Number

Year of the start of this sleep

[].startTime.time.hour

Number

Hour of the start of this sleep

[].startTime.time.minute

Number

Minute of the start of this sleep

[].startTime.time.second

Number

Second of the start of this sleep

[].endTime.date.day

Number

Day of the end of this sleep

[].endTime.date.month

Number

Month of the end of this sleep

[].endTime.date.year

Number

Year of the end of this sleep

[].endTime.time.hour

Number

Hour of the end of this sleep

[].endTime.time.minute

Number

Minute of the end of this sleep

[].endTime.time.second

Number

Second of the end of this sleep

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration of this record in sec.

[].deepSleepDurationInSeconds

Number

Sum of deep sleep seconds.

[].lightSleepDurationInSeconds

Number

Sum of light sleep seconds

[].awakeDurationInSeconds

Number

Sum of seconds awake.

[].remSleepSeconds

Number

Sum of rem sleep seconds.

[].unmeasurableSeconds

Number

Sum of seconds not measurable.

[].sleepSeconds

Number

Sum of total seconds asleep.

[].sleepEfficiency

Number

Ratio of total seconds asleep vs. awake.

[].source

String

Source of this sleep record

[].sleepLevelsMap.light.[].startTimeInSeconds

Number

Start Time of this sleep phase in sec

[].sleepLevelsMap.light.[].endTimeInSeconds

Number

End Time of this sleep phase in sec

[].sleepLevelsMap.light.[].duration

Number

Duration of this sleep phase in sec

[].sleepScoreValue

Null

Value 0-100 scoring the sleep

[].sleepScoreQualifier

Null

A human readable qualifier for the sleep score

[].sleepAssessments

Null

The

[].sleepScores

Null

[].timeOffsetSleepRespiration

Null

[].timeOffsetSleepSpo2

Null

[].validation

String

Source of sleep validation

Example Request
GET /v1/users/6605756edf579919e90c7e61/sleep?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1055

[{"id":"6605756edf579919e90c7e64","userId":"6605756edf579919e90c7e61","tags":["REM"],"sleepDay":{"year":2024,"month":3,"day":28},"processingDateTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":34}},"startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"endTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":45,"second":0}},"summaryId":"abcdefg","calendarDate":"2021-01-01","startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":3900,"deepSleepDurationInSeconds":600,"lightSleepDurationInSeconds":600,"awakeDurationInSeconds":600,"validation":"Complex","sleepLevelsMap":{"light":[{"startTimeInSeconds":1,"endTimeInSeconds":2,"duration":1}]},"remSleepSeconds":600,"unmeasurableSeconds":600,"sleepSeconds":3600,"sleepEfficiency":0.98,"source":"Hub","outdated":false,"sleepScoreValue":null,"sleepScoreQualifier":null,"sleepAssessments":null,"sleepScores":null,"timeOffsetSleepRespiration":null,"timeOffsetSleepSpo2":null}]

Stress

Stress values for a user

Note
The result has always a descending sort order.
Table 34. /v1/users/{userId}/stress
Parameter Description

userId

User Identifier

Table 35. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 36. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].startTime.date.day

Number

Day of the start of this bbi record

[].startTime.date.month

Number

Month of the start of this bbi record

[].startTime.date.year

Number

Year of the start of this bbi record

[].startTime.time.hour

Number

Hour of the start of this bbi record

[].startTime.time.minute

Number

Minute of the start of this bbi record

[].startTime.time.second

Number

Second of the start of this bbi record

[].startTimeInSeconds

Number

Timestamp of this record in seconds

[].startTimeOffsetInSeconds

Number

Timezone offset in seconds

[].source

String

Description of the origin of this record

[].stressLevelValue

Number

Stress score

[].averageIntensity

Number

Average stress intensity.

[].bodyBattery

Number

Energy level, value: 0 - 100 or 127 for invalid value.

[].bodyBatteryStatus

Number

Status of the every level

[].calendarDate

String

Calendar date of this record as string

Example Request
GET /v1/users/6605756fdf579919e90c7e86/stress?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1066

[{"id":"6605756fdf579919e90c7e89","userId":"6605756fdf579919e90c7e86","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"startTimeInSeconds":1711633201,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":50,"averageIntensity":7,"bodyBattery":48,"bodyBatteryStatus":0},{"id":"6605756fdf579919e90c7e8a","userId":"6605756fdf579919e90c7e86","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"startTimeInSeconds":1711633202,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":60,"averageIntensity":7,"bodyBattery":47,"bodyBatteryStatus":0},{"id":"6605756fdf579919e90c7e8b","userId":"6605756fdf579919e90c7e86","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"startTimeInSeconds":1711633203,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":70,"averageIntensity":7,"bodyBattery":46,"bodyBatteryStatus":0}]

BBI

BBI for a user

Note
The result has always a descending sort order.
Table 37. /v1/users/{userId}/bbi
Parameter Description

userId

User Identifier

Table 38. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 39. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

User identifier

[].startTime.date.day

Number

Day of the start of this bbi record

[].startTime.date.month

Number

Month of the start of this bbi record

[].startTime.date.year

Number

Year of the start of this bbi record

[].startTime.time.hour

Number

Hour of the start of this bbi record

[].startTime.time.minute

Number

Minute of the start of this bbi record

[].startTime.time.second

Number

Second of the start of this bbi record

[].timestamp

Number

Timestamp of this record

[].value

Number

BBI value in ms.

Example Request
GET /v1/users/6605756ddf579919e90c7e40/bbi?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 613

[{"id":"6605756ddf579919e90c7e43","userId":"6605756ddf579919e90c7e40","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestamp":1711633201000,"value":300},{"id":"6605756ddf579919e90c7e44","userId":"6605756ddf579919e90c7e40","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"timestamp":1711633202000,"value":400},{"id":"6605756ddf579919e90c7e45","userId":"6605756ddf579919e90c7e40","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"timestamp":1711633203000,"value":500}]

Step Log

Step Log for a user

Note
The result has always a descending sort order.
Table 40. /v1/users/{userId}/stepLog
Parameter Description

userId

User Identifier

Table 41. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 42. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].stepCount

Number

Step count within the last time period

[].totalCount

Number

The total steps of this day.

Example Request
GET /v1/users/66057570df579919e90c7ea4/stepLog?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 724

[{"id":"66057570df579919e90c7ea7","userId":"66057570df579919e90c7ea4","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633201000,"stepCount":10,"totalCount":10,"offsetInSec":0},{"id":"66057570df579919e90c7ea8","userId":"66057570df579919e90c7ea4","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"timestampMs":1711633202000,"stepCount":20,"totalCount":30,"offsetInSec":0},{"id":"66057570df579919e90c7ea9","userId":"66057570df579919e90c7ea4","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"timestampMs":1711633203000,"stepCount":30,"totalCount":60,"offsetInSec":0}]

Respiration

Respiration for a user

Note
The result has always a descending sort order.
Table 43. /v1/users/{userId}/respiration
Parameter Description

userId

User Identifier

Table 44. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 45. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].source

String

Description of the origin of this record

[].value

Number

The respiration rate

Example Request
GET /v1/users/6605756edf579919e90c7e56/respiration?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 718

[{"id":"6605756edf579919e90c7e59","userId":"6605756edf579919e90c7e56","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"source":"TEST","timestampMs":1711633201000,"value":50.0,"offsetInSec":0},{"id":"6605756edf579919e90c7e5a","userId":"6605756edf579919e90c7e56","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"source":"TEST","timestampMs":1711633202000,"value":60.0,"offsetInSec":0},{"id":"6605756edf579919e90c7e5b","userId":"6605756edf579919e90c7e56","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"source":"TEST","timestampMs":1711633203000,"value":70.0,"offsetInSec":0}]

VO2 Max

VO2 Max of a user

Note
The result has always a descending sort order.
Table 46. /v1/users/{userId}/vo2max
Parameter Description

userId

User Identifier

Table 47. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 48. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp

Number

Timestamp of the start of this record

[].offsetInSec

Number

Timezone offset in seconds

[].vo2Max

Number

the VO2 Max value

[].fitnessAge

Number

The fitness age of the user

Example Request
GET /v1/users/6605756fdf579919e90c7e91/vo2max?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 418

[{"id":"6605756fdf579919e90c7e94","userId":"6605756fdf579919e90c7e91","timestamp":1711633201,"offsetInSec":0,"vo2Max":41.0,"fitnessAge":21},{"id":"6605756fdf579919e90c7e95","userId":"6605756fdf579919e90c7e91","timestamp":1711633202,"offsetInSec":0,"vo2Max":42.0,"fitnessAge":22},{"id":"6605756fdf579919e90c7e96","userId":"6605756fdf579919e90c7e91","timestamp":1711633203,"offsetInSec":0,"vo2Max":43.0,"fitnessAge":23}]

Pulse Ox

Pulse Ox of a user

Note
The result has always a descending sort order.
Table 49. /v1/users/{userId}/pulseOx
Parameter Description

userId

User Identifier

Table 50. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 51. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].value

Number

The pulse ox value on percent

Example Request
GET /v1/users/6605756ddf579919e90c7e47/pulseOx?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 664

[{"id":"6605756ddf579919e90c7e4a","userId":"6605756ddf579919e90c7e47","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633201000,"value":95,"offsetInSec":0},{"id":"6605756ddf579919e90c7e4b","userId":"6605756ddf579919e90c7e47","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633202000,"value":96,"offsetInSec":0},{"id":"6605756ddf579919e90c7e4c","userId":"6605756ddf579919e90c7e47","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633203000,"value":97,"offsetInSec":0}]

Research Group-API (Project API)

The Research Group API or Project API gives you access to all data related to research groups. A group contains several users and the methods contained in this section can be used to query fitness and health data of all users belonging to a certain research group

A Research group is also known as a project.

Research Group search can be used to obtain research groups. The id of the research group that is returned in the response can be used to obtain further data with other methods of the Research Group API.

Table 52. Query Parameters
Parameter Description

query

Query string for the group name

page

The page to retrieve

size

Entries per page

Table 53. Response Object
Path Type Description

[].id

String

Identifier of the research group

[].name

String

Name of research group

[].users

Array

List of users

[].users.[].id

String

Identifier of the user

[].users.[].firstName

String

First name of the user

[].users.[].lastName

String

Last name of the user

[].users.[].profilePicUrl

String

Url to retrieve the user profile picture

[].joinCode

String

Join Code of the group

Example Query Request
GET /v1/researchGroups?query=Group&page=0&size=10 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Query Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 396

[{"id":"66057571df579919e90c7ef2","name":"Group","users":[{"id":"66057571df579919e90c7eef","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"},{"id":"66057571df579919e90c7ef0","firstName":"Francisca","lastName":"Lowe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"}],"joinCode":"abcdefg"}]
Simple Paging Example Request
GET /v1/researchGroups?page=0&size=10 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Simple Paging Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 396

[{"id":"66057571df579919e90c7ef2","name":"Group","users":[{"id":"66057571df579919e90c7ef0","firstName":"Francisca","lastName":"Lowe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"},{"id":"66057571df579919e90c7eef","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"}],"joinCode":"abcdefg"}]

Research Group Users (Project Users)

The detailed user information of a certain research group that speficied by the user id within the request path.

Table 54. /v1/researchGroups/{researchGroupId}/users
Parameter Description

researchGroupId

Research Group Identifier

Table 55. Response Object
Path Type Description

[].id

String

Identifier of the user

[].firstName

String

First name of the user

[].lastName

String

Last name of the user

[].profilePicUrl

String

Url to retrieve the user profile picture

[].gender

String

'm' for male or 'f' for female

[].country

String

ISO Country code (e.g. DE)

[].city

String

Optional City of the user

[].location

Null

Description of the location of a user beside city. E.g. Organization, Room Number,..

[].language

String

ISO Language code (e.g. de)

[].timeZone

String

Time Zone Identifier

[].email

String

Email of the user

[].yearOfBirth

Number

Year of Birth (used for calc. of basal metabolism)

[].imperialUnits

Boolean

true, if imperial units are being used. false for metric

[].height

Number

Height of the user in cm

[].heightUOM

String

Height Unit (cm or in)

[].weight

Number

Weight of the user in kg

[].weightUOM

String

Weight Unit (kg or lbs)

[].basalMetabolism

Number

Basal Metabolism of the user.

[].lastSync

String

Last tracker synchronization

[].trackerName

String

Name of the tracker, the user is currently using

[].active

Boolean

True, if the user is connected. Otherwise false

[].usualSleepStartTime

Number

Usual sleep start time (e.g. 2200)

[].usualSleepEndTime

Number

Usual sleep end time (e.g. 0600)

Example Request
GET /v1/researchGroups/66057570df579919e90c7ebb/users HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1061

[{"id":"66057570df579919e90c7eb9","firstName":"Francisca","lastName":"Lowe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678","basalMetabolism":1234,"gender":"f","country":"DE","city":"Berlin","language":"de","timeZone":"UTC+1","email":"admin@fitrockr.com","yearOfBirth":1985,"height":180,"heightUOM":"cm","weight":80,"weightUOM":"kg","lastSync":"2020-03-04T00:00:00+0100","trackerName":"Garmin","active":true,"usualSleepStartTime":2200,"usualSleepEndTime":600,"imperialUnits":false,"location":null},{"id":"66057570df579919e90c7eb8","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678","basalMetabolism":1234,"gender":"m","country":"DE","city":"Berlin","language":"de","timeZone":"UTC+1","email":"test@fitrockr.com","yearOfBirth":1985,"height":180,"heightUOM":"cm","weight":80,"weightUOM":"kg","lastSync":"2020-03-04T00:00:00+0100","trackerName":"Garmin","active":true,"usualSleepStartTime":2200,"usualSleepEndTime":600,"imperialUnits":false,"location":null}]

Research Group Profile (Project Details)

The detailed profile of a certain research group that specified by the user id within the request path.

Table 56. /v1/researchGroups/{userId}/profile
Parameter Description

userId

User Identifier

Table 57. Response Object
Path Type Description

id

String

Identifier of the research group

name

String

Name of research group

users

Array

List of users

users.[].id

String

Identifier of the user

users.[].firstName

String

First name of the user

users.[].lastName

String

Last name of the user

users.[].profilePicUrl

String

Url to retrieve the user profile picture

joinCode

String

Join Code of the group

Example Request
GET /v1/researchGroups/66057572df579919e90c7eff/profile HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 394

{"id":"66057572df579919e90c7eff","name":"Group","users":[{"id":"66057572df579919e90c7efc","firstName":"Gus","lastName":"Ferry","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"},{"id":"66057572df579919e90c7efd","firstName":"Francisca","lastName":"Lowe","profilePicUrl":"https://api.fitrockr.com/api/images/userProfile/download/12345678"}],"joinCode":"abcdefg"}

Daily Summary

A daily summary contains the daily activity data of a user like total calories, steps, distance and also points. This request can be used to get one or more daily summaries. The date range can be specified by request parameters.

Note
The result has always a descending sort order.
Table 58. /v1/researchGroups/{researchGroupId}/dailySummaries
Parameter Description

researchGroupId

User Identifier

Table 59. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 60. Response Object
Path Type Description

[].userId

String

Identifier of user to which this object belongs

[].date.day

Number

Day of Daily Summary

[].date.month

Number

Month of Daily Summary

[].date.year

Number

Year of Daily Summary

[].points

Number

Points of the user on that day

[].calories

Number

Calories of the user on that day

[].steps

Number

Steps of the user on that day

[].distance

Number

Distance of the user on that day

[].activityMinutes

Number

Activity Minutes of the user on that day

Example Request
GET /v1/researchGroups/66057572df579919e90c7f0c/dailySummaries?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 297

[{"userId":"66057572df579919e90c7f0a","date":{"year":2024,"month":3,"day":29},"points":14,"calories":12,"steps":11,"distance":13,"activityMinutes":15},{"userId":"66057572df579919e90c7f09","date":{"year":2024,"month":3,"day":28},"points":9,"calories":7,"steps":6,"distance":8,"activityMinutes":10}]

Daily Details

Daily Details contains more information on daily base compared to the daily summary.

Note
The result has always a descending sort order.
Table 61. /v1/researchGroups/{researchGroupId}/dailyDetails
Parameter Description

researchGroupId

Identifier of the identifier

Table 62. Query Parameters
Parameter Description

startDate

The start date

endDate

The end date

Table 63. Response Object
Path Type Description

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].endTime.date.day

Number

Day of the end of this record

[].endTime.date.month

Number

Month of the end of this record

[].endTime.date.year

Number

Year of the end of this record

[].endTime.time.hour

Number

Hour of the end of this record

[].endTime.time.minute

Number

Minute of the end of this record

[].endTime.time.second

Number

Second of the end of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration in seconds

[].activeKilocalories

Number

Active calories within the timeframe of this record

[].distanceInMeters

Number

Distance covered

[].moderateIntensityDurationInSeconds

Number

Cumulative duration of activities of moderate intensity (MET 3-6) lasting at least 600s at a time.

[].vigorousIntensityDurationInSeconds

Number

Cumulative duration of activities of vigorous intensity (MET >6) lasting at least 600s at a time

[].floorsClimbed

Number

Total number of floors climbed

[].averageStressLevel

Number

Average stress level of this period

[].maxStressLevel

Number

Maximum stress level in this period

[].stressDurationInSeconds

Number

Total stress duration in seconds

[].restStressDurationInSeconds

Number

Number of seconds with rest stress

[].activityStressDurationInSeconds

Number

Number of seconds the user was engaged in activity and stress duration was unreliable.

[].lowStressDurationInSeconds

Number

Number of seconds with low stress

[].mediumStressDurationInSeconds

Number

Number of seconds with medium stress

[].highStressDurationInSeconds

Number

Number of seconds with high stress

[].stressQualifier

String

Qualitative stress label. Possible values: unknown, calm, balanced, stressful, very_stressful, calm_awake, balanced_awake, stressful_awake, very_stressful_awake, ..

[].stepsGoal

Number

Step goal of the user

[].netKilocaloriesGoal

Number

calorie goal of the user

[].intensityDurationGoalInSeconds

Number

goal for intensity seconds

[].floorsClimbedGoal

Number

goal for floors climbed

[].minHeartRateInBeatsPerMinute

Number

Minimum heart rate (bpm)

[].avgHeartRateInBeatsPerMinute

Number

Average heart rate (bpm)

[].maxHeartRateInBeatsPerMinute

Number

Maximum heart rate (bpm)

[].summaryId

String

Id of this record

[].activityType

String

Type of activity of this record

[].calendarDate

String

Calendar date

[].steps

Number

Number of steps

Example Request
GET /v1/researchGroups/66057571df579919e90c7edf/dailyDetails?startDate=2024-03-25&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1041

[{"userId":"66057571df579919e90c7edc","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":49,"second":37}},"endTime":{"date":{"year":2024,"month":3,"day":27},"time":{"hour":14,"minute":49,"second":37}},"summaryId":"1b7105","calendarDate":"2021-01-01","startTimeInSeconds":1711464577,"startTimeOffsetInSeconds":0,"durationInSeconds":3600,"activityType":"WALKING","steps":1024,"activeKilocalories":2048.0,"distanceInMeters":512.0,"moderateIntensityDurationInSeconds":1200,"vigorousIntensityDurationInSeconds":600,"floorsClimbed":5,"minHeartRateInBeatsPerMinute":80,"avgHeartRateInBeatsPerMinute":100,"maxHeartRateInBeatsPerMinute":120,"averageStressLevel":89,"maxStressLevel":100,"stressDurationInSeconds":200,"restStressDurationInSeconds":100,"activityStressDurationInSeconds":10,"lowStressDurationInSeconds":20,"mediumStressDurationInSeconds":30,"highStressDurationInSeconds":40,"stressQualifier":"balanced","stepsGoal":5000,"netKilocaloriesGoal":3000,"intensityDurationGoalInSeconds":360,"floorsClimbedGoal":10}]

Heart Rate

The heart rate values of all users belonging to a given research group

Note
The result has always a descending sort order.
Table 64. /v1/researchGroups/{researchGroupId}/heartRate
Parameter Description

researchGroupId

User Identifier

Table 65. Query Parameters
Parameter Description

startDate

The start date

endDate

The end date

Table 66. Response Object
Path Type Description

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].calendarDate

String

Calendar date

[].value

Number

The heart rate value.

Example Request
GET /v1/researchGroups/66057571df579919e90c7ed6/heartRate?startDate=2024-03-25&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 941

[{"userId":"66057571df579919e90c7ed3","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":49,"second":37}},"calendarDate":"2021-01-01","startTimeInSeconds":1711464577,"startTimeOffsetInSeconds":0,"value":83},{"userId":"66057571df579919e90c7ed3","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":44,"second":37}},"calendarDate":"2021-01-01","startTimeInSeconds":1711464277,"startTimeOffsetInSeconds":0,"value":84},{"userId":"66057571df579919e90c7ed4","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":39,"second":37}},"calendarDate":"2021-01-01","startTimeInSeconds":1711463977,"startTimeOffsetInSeconds":0,"value":85},{"userId":"66057571df579919e90c7ed4","startTime":{"date":{"year":2024,"month":3,"day":26},"time":{"hour":14,"minute":34,"second":37}},"calendarDate":"2021-01-01","startTimeInSeconds":1711463677,"startTimeOffsetInSeconds":0,"value":86}]

Activities

Activites of all users belonging to a certain research group.

Note
The result has always a descending sort order.
Table 67. /v1/researchGroups/{researchGroupId}/activities
Parameter Description

researchGroupId

Research Group Identifier

Table 68. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 69. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].externalId

String

External Id of this activity (optional)

[].source

String

Source that recorded this activity

[].userId

String

Identifier of user to which this activity belongs

[].startDate.date.day

Number

Day of the start of this activity

[].startDate.date.month

Number

Month of the start of this activity

[].startDate.date.year

Number

Year of the start of this activity

[].startDate.time.hour

Number

Hour of the start of this activity

[].startDate.time.minute

Number

Minute of the start of this activity

[].startDate.time.second

Number

Second of the start of this activity

[].endDate.date.day

Number

Day of the end of this activity

[].endDate.date.month

Number

Month of the end of this activity

[].endDate.date.year

Number

Year of the end of this activity

[].endDate.time.hour

Number

Hour of the end of this activity

[].endDate.time.minute

Number

Minute of the end of this activity

[].endDate.time.second

Number

Second of the end of this activity

[].type

String

Type of the activity (e.g., Running, Walking, Rowing,..)

[].rawActivityType

Null

Raw Activity Type from the wearable

[].duration

Number

Duration of activity in seconds

[].amount

Number

Main value of the activity. (e.g. Distance for Walking, Strokes for rowing.)

[].unit

String

Unit for amount.

[].calories

Number

Burned calories.

[].distance

Number

Distance covered during activity

[].steps

Number

Steps taken during activity

Example Request
GET /v1/researchGroups/66057571df579919e90c7eeb/activities?startDate=2024-03-27&endDate=2024-03-30 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 883

[{"id":"66057571df579919e90c7eed","externalId":"A1235","source":"Fitrockr Hub","userId":"66057571df579919e90c7ee9","startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":19,"second":37}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":37}},"type":"Walking","rawActivityType":null,"duration":1800000,"amount":4000,"unit":"Meter","calories":200,"distance":4000.0,"steps":4000},{"id":"66057571df579919e90c7eec","externalId":"A1234","source":"Fitrockr Hub","userId":"66057571df579919e90c7ee8","startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":49,"second":37}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":37}},"type":"Running","rawActivityType":null,"duration":3600000,"amount":9000,"unit":"Meter","calories":400,"distance":9000.0,"steps":8000}]

Intraday

An intraday record contains the recorded data within a day for a certain timeframe. This request can be used to get one or more intraday records. The date range can be specified by request parameters.

Note
The result has always a descending sort order.
Table 70. /v1/researchGroups/{researchGroupId}/intraDays
Parameter Description

researchGroupId

User Identifier

Table 71. Query Parameters
Parameter Description

startDate

The page to retrieve

endDate

Entries per page

Table 72. Response Object
Path Type Description

[].id

String

Unique Identifier of this intraday record

[].userId

String

Identifier of user to which this record belongs

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].endTime.date.day

Number

Day of the end of this record

[].endTime.date.month

Number

Month of the end of this record

[].endTime.date.year

Number

Year of the end of this record

[].endTime.time.hour

Number

Hour of the end of this record

[].endTime.time.minute

Number

Minute of the end of this record

[].endTime.time.second

Number

Second of the end of this record

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration in seconds

[].activeCalories

Number

Active calories within the timeframe of this record

[].distance

Number

Distance covered

[].activeSeconds

Number

Active seconds during the timeframe of this record

[].metValue

Number

Metabolic equivalent of this record

[].intensity

String

Motion intensity category

[].meanMotionIntensity

Number

Mean motion intensity

[].maxMotionIntensity

Number

Maximum motion intensity

[].averageStressLevel

Number

average stress level

[].maxStressLevel

Number

Maximum stress level

[].minHeartRateInBeatsPerMinute

Number

Minimum heart rate (bpm)

[].avgHeartRateInBeatsPerMinute

Number

Average heart rate (bpm)

[].maxHeartRateInBeatsPerMinute

Number

Maximum heart rate (bpm)

[].summaryId

String

Id of this record

[].activityType

String

Type of activity of this record

[].calendarDate

String

Calendar date

[].steps

Number

Number of steps

Example Request
GET /v1/researchGroups/66057571df579919e90c7ee5/intraDays?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 732

[{"id":"66057571df579919e90c7ee6","userId":"66057571df579919e90c7ee2","summaryId":"1b7105","activityType":"SEDENTARY","calendarDate":"2021-01-01","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"endTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":45,"second":0}},"startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":300,"activeCalories":23,"distance":15,"steps":23,"activeSeconds":5,"metValue":1.2,"intensity":"SEDENTARY","meanMotionIntensity":0.73,"maxMotionIntensity":1.3,"averageStressLevel":20,"maxStressLevel":50,"minHeartRateInBeatsPerMinute":70,"avgHeartRateInBeatsPerMinute":90,"maxHeartRateInBeatsPerMinute":120}]

Motion Intensity

This records contains the intensity of the motion that the tracker recorded for a certain timeframe.

Note
The result has always a descending sort order.
Table 73. /v1/researchGroups/{researchGroupId}/motionIntensity
Parameter Description

researchGroupId

Research Group Identifier

Table 74. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 75. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

User identifier

[].activityType

String

Activity type detected at the time of the record

[].durationInSeconds

Number

Duration of this record in sec.

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].startTime.date.day

Number

Day of the start of this record

[].startTime.date.month

Number

Month of the start of this record

[].startTime.date.year

Number

Year of the start of this record

[].startTime.time.hour

Number

Hour of the start of this record

[].startTime.time.minute

Number

Minute of the start of this record

[].startTime.time.second

Number

Second of the start of this record

[].motionIntensity

Number

Intensity of the motion

Example Request
GET /v1/researchGroups/66057572df579919e90c7f1c/motionIntensity?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 309

[{"id":"66057572df579919e90c7f1d","userId":"66057572df579919e90c7f19","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":300,"activityType":"GENERIC","motionIntensity":23.4}]

Step Log

Step Log for a all users of a research group

Note
The result has always a descending sort order.
Table 76. /v1/researchGroups/{userId}/stepLog
Parameter Description

userId

User Identifier

Table 77. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 78. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].stepCount

Number

Step count within the last time period

[].totalCount

Number

The total steps of this day.

Example Request
GET /v1/researchGroups/66057572df579919e90c7f14/stepLog?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 724

[{"id":"66057572df579919e90c7f15","userId":"66057572df579919e90c7f11","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633201000,"stepCount":10,"totalCount":10,"offsetInSec":0},{"id":"66057572df579919e90c7f16","userId":"66057572df579919e90c7f11","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"timestampMs":1711633202000,"stepCount":20,"totalCount":30,"offsetInSec":0},{"id":"66057572df579919e90c7f17","userId":"66057572df579919e90c7f12","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"timestampMs":1711633203000,"stepCount":30,"totalCount":60,"offsetInSec":0}]

Sleep

Sleep Records for all users for a research group

Note
The result has always a descending sort order.
Table 79. /v1/researchGroups/{researchGroupId}/sleep
Parameter Description

researchGroupId

Research Group Identifier

Table 80. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 81. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

Identifier of user to which this activity belongs

[].tags[]

Array

Tagged, if day sleep, night sleep, nap or rem sleep

[].outdated

Boolean

The sleep was marked as outdated, because of new data received afterwards

[].sleepDay.day

Number

Day, the sleep is assigned to

[].sleepDay.month

Number

Month, the sleep is assigned to

[].sleepDay.year

Number

Year, the sleep is assigned to

[].summaryId

String

Internal summary id of this sleep

[].calendarDate

String

Day, the sleep started

[].processingDateTime.date.day

Number

Day of the processing time of this sleep

[].processingDateTime.date.month

Number

Month of the processing time of this sleep

[].processingDateTime.date.year

Number

Year of the processing time of this sleep

[].processingDateTime.time.hour

Number

Hour of the processing time of this sleep

[].processingDateTime.time.minute

Number

Minute of the processing time of this sleep

[].processingDateTime.time.second

Number

Second of the processing time of this sleep

[].startTime.date.day

Number

Day of the start of this sleep

[].startTime.date.month

Number

Month of the start of this sleep

[].startTime.date.year

Number

Year of the start of this sleep

[].startTime.time.hour

Number

Hour of the start of this sleep

[].startTime.time.minute

Number

Minute of the start of this sleep

[].startTime.time.second

Number

Second of the start of this sleep

[].endTime.date.day

Number

Day of the end of this sleep

[].endTime.date.month

Number

Month of the end of this sleep

[].endTime.date.year

Number

Year of the end of this sleep

[].endTime.time.hour

Number

Hour of the end of this sleep

[].endTime.time.minute

Number

Minute of the end of this sleep

[].endTime.time.second

Number

Second of the end of this sleep

[].startTimeInSeconds

Number

Start time in seconds since begin of epoc

[].startTimeOffsetInSeconds

Number

Time zone offset in sec. at beginning of record

[].durationInSeconds

Number

Duration of this record in sec.

[].deepSleepDurationInSeconds

Number

Sum of deep sleep seconds.

[].lightSleepDurationInSeconds

Number

Sum of light sleep seconds

[].awakeDurationInSeconds

Number

Sum of seconds awake.

[].remSleepSeconds

Number

Sum of rem sleep seconds.

[].unmeasurableSeconds

Number

Sum of seconds not measurable.

[].sleepSeconds

Number

Sum of total seconds asleep.

[].sleepEfficiency

Number

Ratio of total seconds asleep vs. awake.

[].source

String

Source of this sleep record

[].sleepLevelsMap.light.[].startTimeInSeconds

Number

Start Time of this sleep phase in sec

[].sleepLevelsMap.light.[].endTimeInSeconds

Number

End Time of this sleep phase in sec

[].sleepLevelsMap.light.[].duration

Number

Duration of this sleep phase in sec

[].sleepScoreValue

Null

Value 0-100 scoring the sleep

[].sleepScoreQualifier

Null

A human readable qualifier for the sleep score

[].sleepAssessments

Null

The

[].sleepScores

Null

[].timeOffsetSleepRespiration

Null

[].timeOffsetSleepSpo2

Null

[].validation

String

Source of sleep validation

Example Request
GET /v1/researchGroups/66057571df579919e90c7ed0/sleep?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1055

[{"id":"66057571df579919e90c7ed1","userId":"66057571df579919e90c7ecd","tags":["REM"],"sleepDay":{"year":2024,"month":3,"day":28},"processingDateTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":37}},"startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":0}},"endTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":45,"second":0}},"summaryId":"abcdefg","calendarDate":"2021-01-01","startTimeInSeconds":1711633200,"startTimeOffsetInSeconds":1711633500,"durationInSeconds":3900,"deepSleepDurationInSeconds":600,"lightSleepDurationInSeconds":600,"awakeDurationInSeconds":600,"validation":"Complex","sleepLevelsMap":{"light":[{"startTimeInSeconds":1,"endTimeInSeconds":2,"duration":1}]},"remSleepSeconds":600,"unmeasurableSeconds":600,"sleepSeconds":3600,"sleepEfficiency":0.98,"source":"Hub","outdated":false,"sleepScoreValue":null,"sleepScoreQualifier":null,"sleepAssessments":null,"sleepScores":null,"timeOffsetSleepRespiration":null,"timeOffsetSleepSpo2":null}]

Stress

Stress values for all users belonging to a research group

Note
The result has always a descending sort order.
Table 82. /v1/researchGroups/{researchGroupId}/stress
Parameter Description

researchGroupId

Research Group Identifier

Table 83. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 84. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].startTime.date.day

Number

Day of the start of this bbi record

[].startTime.date.month

Number

Month of the start of this bbi record

[].startTime.date.year

Number

Year of the start of this bbi record

[].startTime.time.hour

Number

Hour of the start of this bbi record

[].startTime.time.minute

Number

Minute of the start of this bbi record

[].startTime.time.second

Number

Second of the start of this bbi record

[].startTimeInSeconds

Number

Timestamp of this record in seconds

[].startTimeOffsetInSeconds

Number

Timezone offset in seconds

[].source

String

Description of the origin of this record

[].stressLevelValue

Number

Stress score

[].averageIntensity

Number

Average stress intensity.

[].bodyBattery

Number

Energy level, value: 0 - 100 or 127 for invalid value.

[].bodyBatteryStatus

Number

Status of the every level

[].calendarDate

String

Calendar date of this record as string

Example Request
GET /v1/researchGroups/66057572df579919e90c7ef7/stress?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1066

[{"id":"66057572df579919e90c7ef8","userId":"66057572df579919e90c7ef4","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"startTimeInSeconds":1711633201,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":50,"averageIntensity":7,"bodyBattery":48,"bodyBatteryStatus":0},{"id":"66057572df579919e90c7ef9","userId":"66057572df579919e90c7ef4","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"startTimeInSeconds":1711633202,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":60,"averageIntensity":7,"bodyBattery":47,"bodyBatteryStatus":0},{"id":"66057572df579919e90c7efa","userId":"66057572df579919e90c7ef5","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"startTimeInSeconds":1711633203,"startTimeOffsetInSeconds":0,"calendarDate":"2021-01-01","source":"GARMIN","stressLevelValue":70,"averageIntensity":7,"bodyBattery":46,"bodyBatteryStatus":0}]

BBI

BBI for all users of a certain research group

Note
The result has always a descending sort order.
Table 85. /v1/researchGroups/{researchGroupId}/bbi
Parameter Description

researchGroupId

Research Group Identifier

Table 86. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 87. Response Object
Path Type Description

[].id

String

Unique Identifier of this activity

[].userId

String

User identifier

[].startTime.date.day

Number

Day of the start of this bbi record

[].startTime.date.month

Number

Month of the start of this bbi record

[].startTime.date.year

Number

Year of the start of this bbi record

[].startTime.time.hour

Number

Hour of the start of this bbi record

[].startTime.time.minute

Number

Minute of the start of this bbi record

[].startTime.time.second

Number

Second of the start of this bbi record

[].timestamp

Number

Timestamp of this record

[].value

Number

BBI value in ms.

Example Request
GET /v1/researchGroups/66057570df579919e90c7eb3/bbi?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 613

[{"id":"66057570df579919e90c7eb4","userId":"66057570df579919e90c7eb0","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestamp":1711633201000,"value":300},{"id":"66057570df579919e90c7eb5","userId":"66057570df579919e90c7eb0","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"timestamp":1711633202000,"value":400},{"id":"66057570df579919e90c7eb6","userId":"66057570df579919e90c7eb1","startTime":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"timestamp":1711633203000,"value":500}]

Respiration

Respiration for all users contained in research groups

Note
The result has always a descending sort order.
Table 88. /v1/researchGroups/{researchGroupId}/respiration
Parameter Description

researchGroupId

Research Group Identifier

Table 89. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 90. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].source

String

Description of the origin of this record

[].value

Number

The respiration rate

Example Request
GET /v1/researchGroups/66057571df579919e90c7ec8/respiration?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 718

[{"id":"66057571df579919e90c7ec9","userId":"66057571df579919e90c7ec5","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"source":"TEST","timestampMs":1711633201000,"value":50.0,"offsetInSec":0},{"id":"66057571df579919e90c7eca","userId":"66057571df579919e90c7ec5","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":2}},"source":"TEST","timestampMs":1711633202000,"value":60.0,"offsetInSec":0},{"id":"66057571df579919e90c7ecb","userId":"66057571df579919e90c7ec6","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":3}},"source":"TEST","timestampMs":1711633203000,"value":70.0,"offsetInSec":0}]

VO2 Max

VO2 Max of all users of research groups

Note
The result has always a descending sort order.
Table 91. /v1/researchGroups/{researchGroupId}/vo2max
Parameter Description

researchGroupId

Research Group Identifier

Table 92. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 93. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp

Number

Timestamp of the start of this record

[].offsetInSec

Number

Timezone offset in seconds

[].vo2Max

Number

the VO2 Max value

[].fitnessAge

Number

The fitness age of the user

Example Request
GET /v1/researchGroups/66057572df579919e90c7f04/vo2max?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 418

[{"id":"66057572df579919e90c7f05","userId":"66057572df579919e90c7f01","timestamp":1711633201,"offsetInSec":0,"vo2Max":41.0,"fitnessAge":21},{"id":"66057572df579919e90c7f06","userId":"66057572df579919e90c7f01","timestamp":1711633202,"offsetInSec":0,"vo2Max":42.0,"fitnessAge":22},{"id":"66057572df579919e90c7f07","userId":"66057572df579919e90c7f01","timestamp":1711633203,"offsetInSec":0,"vo2Max":43.0,"fitnessAge":23}]

Pulse Ox

Pulse Ox of all users of research groups

Note
The result has always a descending sort order.
Table 94. /v1/researchGroups/{researchGroupId}/pulseOx
Parameter Description

researchGroupId

Research Group Identifier

Table 95. Query Parameters
Parameter Description

startDate

The Start Date

endDate

The End Date

Table 96. Response Object
Path Type Description

[].id

String

Unique Identifier of this record

[].userId

String

User identifier

[].timestamp.date.day

Number

Day of the start of this record

[].timestamp.date.month

Number

Month of the start of this record

[].timestamp.date.year

Number

Year of the start of this record

[].timestamp.time.hour

Number

Hour of the start of this record

[].timestamp.time.minute

Number

Minute of the start of this record

[].timestamp.time.second

Number

Second of the start of this record

[].timestampMs

Number

Timestamp of this record in milliseconds

[].offsetInSec

Number

Timezone offset in seconds

[].value

Number

The pulse ox value on percent

Example Request
GET /v1/researchGroups/66057570df579919e90c7ec0/pulseOx?startDate=2024-03-28&endDate=2024-03-29 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 664

[{"id":"66057570df579919e90c7ec1","userId":"66057570df579919e90c7ebd","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633201000,"value":95,"offsetInSec":0},{"id":"66057570df579919e90c7ec2","userId":"66057570df579919e90c7ebd","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633202000,"value":96,"offsetInSec":0},{"id":"66057570df579919e90c7ec3","userId":"66057570df579919e90c7ebe","timestamp":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":40,"second":1}},"timestampMs":1711633203000,"value":97,"offsetInSec":0}]

Health-Report-API

This api is used to generate health kpi reports for a user and a certain timeframe

All Reports

Get all available health reports

Table 97. Response Object
Path Type Description

[].id

String

Identifier of the report

[].defaultReport

Boolean

true, if this is the default report shown in the ui

[].name

String

Name of the report

Example Request
GET /v1/healthReports HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 110

[{"id":"123","defaultReport":true,"name":"Report 123"},{"id":"234","defaultReport":false,"name":"Report 234"}]

Health Kpi Report

Generate a health kpi report for a certain user and timeframe.

Table 98. /v1/healthReports/{reportId}/{userId}/{start}/{end}
Parameter Description

reportId

The Id of the report templated.

userId

The Id of the user that should be reported.

start

ISO Formatted Start Day of Reporting Period.

end

ISO Formatted End Day of Reporting Period.

Table 99. Response Object
Path Type Description

[].key

Null

Identifier of the kpi group

[].name

String

Name of the kpi group

[].kpis

Array

List of generated kpis

[].kpis.[].key

String

Identifier for a kpi

[].kpis.[].name

String

Human readable name

[].kpis.[].description

String

Optional description of the kpi

[].kpis.[].numericValue

Number

Raw numeric value of the kpi

[].kpis.[].formattedValue

String

Formatted value including unit

[].kpis.[].unit

Null

Unit of kpi, if applicable

[].kpis.[].comparisonNumericValue

Null

Raw numeric value of the comparison period

[].kpis.[].comparisonFormattedValue

Null

Formatted value inclusing unit of the comparison period

[].kpis.[].comparisonDifferencePercentage

Null

Comparison difference in percentage

Example Request
GET /v1/healthReports/123/66057576df579919e90c7f4f/2024-03-25/2024-03-27 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1211

[{"key":null,"name":"Base","kpis":[{"key":"avgCalories","name":"avgCalories","description":"avgCalories","numericValue":3000.0,"formattedValue":"3000","unit":null,"comparisonNumericValue":null,"comparisonFormattedValue":null,"comparisonDifferencePercentage":null},{"key":"avgSteps","name":"avgSteps","description":"avgSteps","numericValue":10000.0,"formattedValue":"10000","unit":null,"comparisonNumericValue":null,"comparisonFormattedValue":null,"comparisonDifferencePercentage":null}]},{"key":null,"name":"Body","kpis":[{"key":"avgBMI","name":"avgBMI","description":"avgBMI","numericValue":15.0,"formattedValue":"15.0","unit":null,"comparisonNumericValue":null,"comparisonFormattedValue":null,"comparisonDifferencePercentage":null},{"key":"avgWeight","name":"avgWeight","description":"avgWeight","numericValue":60.0,"formattedValue":"60.0","unit":null,"comparisonNumericValue":null,"comparisonFormattedValue":null,"comparisonDifferencePercentage":null},{"key":"avgBodyFatPercentage","name":"avgBodyFatPercentage","description":"avgBodyFatPercentage","numericValue":30.0,"formattedValue":"30.0","unit":null,"comparisonNumericValue":null,"comparisonFormattedValue":null,"comparisonDifferencePercentage":null}]}]

Health Kpi Report (PDF)

Generate a health kpi report for a certain user and timeframe and return it as application/pdf

Path Parameters

see Health Kpi Report

Example Request
GET /v1/healthReports/123/612b571f5b5a2c50bf1daa1c/2021-08-26/2021-08-28/pdf HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response

Rendered PDF report.

Health Kpi Comparison Report

Generate a health kpi report for a certain user and timeframe with a comparison period.

Table 100. /v1/healthReports/{reportId}/{userId}/{period1Start}/{period1End}/{period2Start}/{period2End}
Parameter Description

reportId

The Id of the report templated.

userId

The Id of the user that should be reported.

period1Start

ISO Formatted Start Day of first Reporting Period.

period1End

ISO Formatted End Day of first Reporting Period.

period2Start

ISO Formatted Start Day of second Reporting Period.

period2End

ISO Formatted End Day of second Reporting Period.

Table 101. Response Object
Path Type Description

[].key

Null

Identifier of the kpi group

[].name

String

Name of the kpi group

[].kpis

Array

List of generated kpis

[].kpis.[].key

String

Identifier for a kpi

[].kpis.[].name

String

Human readable name

[].kpis.[].description

String

Optional description of the kpi

[].kpis.[].numericValue

Number

Raw numeric value of the kpi

[].kpis.[].formattedValue

String

Formatted value including unit

[].kpis.[].unit

Null

Unit of kpi, if applicable

[].kpis.[].comparisonNumericValue

Number

Raw numeric value of the comparison period

[].kpis.[].comparisonFormattedValue

String

Formatted value inclusing unit of the comparison period

[].kpis.[].comparisonDifferencePercentage

Number

Comparison difference in percentage

Example Request
GET /v1/healthReports/123/66057576df579919e90c7f31/2024-03-25/2024-03-25/2024-03-27/2024-03-27 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1230

[{"key":null,"name":"Base","kpis":[{"key":"avgCalories","name":"avgCalories","description":"avgCalories","numericValue":2000.0,"formattedValue":"2000","unit":null,"comparisonNumericValue":4000.0,"comparisonFormattedValue":"4000","comparisonDifferencePercentage":50.0},{"key":"avgSteps","name":"avgSteps","description":"avgSteps","numericValue":10000.0,"formattedValue":"10000","unit":null,"comparisonNumericValue":10000.0,"comparisonFormattedValue":"10000","comparisonDifferencePercentage":0.0}]},{"key":null,"name":"Body","kpis":[{"key":"avgBMI","name":"avgBMI","description":"avgBMI","numericValue":20.0,"formattedValue":"20.0","unit":null,"comparisonNumericValue":10.0,"comparisonFormattedValue":"10.0","comparisonDifferencePercentage":-100.0},{"key":"avgWeight","name":"avgWeight","description":"avgWeight","numericValue":40.0,"formattedValue":"40.0","unit":null,"comparisonNumericValue":80.0,"comparisonFormattedValue":"80.0","comparisonDifferencePercentage":50.0},{"key":"avgBodyFatPercentage","name":"avgBodyFatPercentage","description":"avgBodyFatPercentage","numericValue":40.0,"formattedValue":"40.0","unit":null,"comparisonNumericValue":20.0,"comparisonFormattedValue":"20.0","comparisonDifferencePercentage":-100.0}]}]

Health Kpi Comparison Report (PDF)

Generate a health kpi comparison report for a certain user and timeframe and return it as application/pdf

Path Parameters

see Health Kpi Comparison Report

Example Request
GET /v1/healthReports/123/612b9b32f6ff0d62493fecc4/2021-08-26/2021-08-26/2021-08-28/2021-08-28/pdf HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response

Rendered PDF report.

HRV Export API

Endpoint to generate and download hrv exports

Generate HRV Report

Triggers the creation of an hrv report.

Table 102. Request Object
Path Type Description

userIds

Array

List of user identifiers for generating the report

startTime

Object

Start date of the report

startTime.day

Number

Day of the start date of this export

startTime.month

Number

Month of the start date of this export

startTime.year

Number

Year of the start date of this export

endTime.day

Number

Day of the end date of this export

endTime.month

Number

Month of the end date of this export

endTime.year

Number

Year of the end date of this export

timeZone

String

Time zone of the measurements (e.g. UTC)

measurementTimes[].start.hour

Number

Hour of the start of the measurement period

measurementTimes[].start.minute

Number

Minute of the start of the measurement period

measurementTimes[].start.second

Number

Second of the start of the measurement period

measurementTimes[].end.hour

Number

Hour of the end of the measurement period

measurementTimes[].end.minute

Number

Minute of the end of the measurement period

measurementTimes[].end.second

Number

Second of the end of the measurement period

Table 103. Response Object
Path Type Description

timeZoneOffset

Number

timezone offset in seconds that is used in the report

timeframes[]

Array

Name of this export

hrvData[]

Array

The hrv report

hrvData[].userId

class java.lang.String

id of this user of this report item

hrvData[].userName

class java.lang.String

Name of this user of this report item

hrvData[].measurementDay.day

class java.lang.Integer

Day of this measurement

hrvData[].measurementDay.month

class java.lang.Integer

Month of this measurement

hrvData[].measurementDay.year

class java.lang.Integer

Year of this measurement

hrvData[].measurementList[].day

class java.lang.Long

Day

hrvData[].measurementList[].startTime

class java.lang.Long

Start Time as sec of day

hrvData[].measurementList[].endTime

class java.lang.Long

End Time as sec of day

hrvData[].measurementList[].timeframeAsString

class java.lang.String

Timeframe as String

hrvData[].measurementList[].minBbi

class java.lang.Integer

Minimum BBI Value

hrvData[].measurementList[].avgBbi

class java.lang.Integer

Average BBI Value

hrvData[].measurementList[].maxBbi

class java.lang.Integer

Maximum BBI Value

hrvData[].measurementList[].sdnn

class java.lang.Double

SDNN: Standard deviation of the IBI of normal sinus beats (SDNN)

hrvData[].measurementList[].rmssd

class java.lang.Double

RMSSD: Root mean square of successive RR interval differences

hrvData[].measurementList[].sd1Sd2

class java.lang.Double

SD1/SD2: Ratio of SD1 to SD2

hrvData[].measurementList[].pnn50

class java.lang.Double

PNN50: percentage of successive RR intervals that differ by more than 50 ms

hrvData[].measurementList[].lfHfRatio

class java.lang.Double

LF/HF: Ratio of LF to HF power

hrvData[].measurementList[].vlf

class java.lang.Double

VLF: Power in the very low-frequency range (0.0033 – 0.04 Hz)

hrvData[].measurementList[].lf

class java.lang.Double

LF: Power in the low-frequency range (0.04 – 0.15 Hz)

hrvData[].measurementList[].hf

class java.lang.Double

HF: Power in the high-frequency range (0.15 – 0.4 Hz)

hrvData[].measurementList[].tp

class java.lang.Double

TP: Total Power

Example Request
POST /v1/hrvReport HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Content-Length: 249
Host: localhost:8080

{"startTime":{"year":2020,"month":1,"day":1},"endTime":{"year":2020,"month":1,"day":1},"timeZone":"UTC","userIds":["66057576df579919e90c7f3e"],"measurementTimes":[{"start":{"hour":0,"minute":0,"second":0},"end":{"hour":23,"minute":59,"second":59}}]}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 64

{"timeZoneOffset":0,"timeframes":["00:00 - 23:00"],"hrvData":[]}

Event API

Endpoint to get data from events

Get all events

Returns the list of all active and inactive events

Table 104. Response Object
Path Type Description

[].id

String

Identifier of this event

[].title

String

Title describing the event

[].description

Null

Description of the event

[].visibleFrom.day

Number

Day when the event will be visible to the participants for registration

[].visibleFrom.month

Number

Month when the event will be visible to the participants for registration

[].visibleFrom.year

Number

Year when the event will be visible to the participants for registration

[].visibleTo.day

Number

Day until when the event will be visible to the participants

[].visibleTo.month

Number

Month until when the event will be visible to the participants

[].visibleTo.year

Number

Year until when the event will be visible to the participants

[].activeFrom.day

Number

Day when the data collection will be started

[].activeFrom.month

Number

Month when the data collection will be started

[].activeFrom.year

Number

Year when the data collection will be started

[].activeTo.day

Number

Day when the data collection will end

[].activeTo.month

Number

Month when the data collection will end

[].activeTo.year

Number

Year when the data collection will end

[].numberOfParticipants

Number

Number of persons participating in the event

Example Request
GET /v1/events HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 519

[{"id":"123","title":"Event 123","description":null,"visibleFrom":{"year":2024,"month":3,"day":28},"visibleTo":{"year":2024,"month":3,"day":28},"activeFrom":{"year":2024,"month":3,"day":28},"activeTo":{"year":2024,"month":3,"day":28},"numberOfParticipants":1},{"id":"234","title":"Event 234","description":null,"visibleFrom":{"year":2024,"month":3,"day":28},"visibleTo":{"year":2024,"month":3,"day":28},"activeFrom":{"year":2024,"month":3,"day":28},"activeTo":{"year":2024,"month":3,"day":28},"numberOfParticipants":1}]

Get event by id

Returns an event by id.

Table 105. /v1/events/{eventId}
Parameter Description

eventId

The id the event

Table 106. Response Object
Path Type Description

id

String

Identifier of this event

title

String

Title describing the event

description

Null

Description of the event

visibleFrom.day

Number

Day when the event will be visible to the participants for registration

visibleFrom.month

Number

Month when the event will be visible to the participants for registration

visibleFrom.year

Number

Year when the event will be visible to the participants for registration

visibleTo.day

Number

Day until when the event will be visible to the participants

visibleTo.month

Number

Month until when the event will be visible to the participants

visibleTo.year

Number

Year until when the event will be visible to the participants

activeFrom.day

Number

Day when the data collection will be started

activeFrom.month

Number

Month when the data collection will be started

activeFrom.year

Number

Year when the data collection will be started

activeTo.day

Number

Day when the data collection will end

activeTo.month

Number

Month when the data collection will end

activeTo.year

Number

Year when the data collection will end

numberOfParticipants

Number

Number of persons participating in the event

Example Request
GET /v1/events/123 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 258

{"id":"123","title":"Event 123","description":null,"visibleFrom":{"year":2024,"month":3,"day":28},"visibleTo":{"year":2024,"month":3,"day":28},"activeFrom":{"year":2024,"month":3,"day":28},"activeTo":{"year":2024,"month":3,"day":28},"numberOfParticipants":1}

Get event users

Returns the users of a given event

Table 107. /v1/events/{eventId}/users
Parameter Description

eventId

The id the event

Table 108. Response Object
Path Type Description

[].id

String

Identifier of this user

[].city

String

City of the participant

[].gender

Null

Gender of the participant

[].state

Null

State of the participant

[].country

String

Country of the participant

[].age

Number

Age of the participant

Example Request
GET /v1/events/123/users HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 102

[{"id":"66057578df579919e90c7f66","city":"Berlin","gender":null,"state":null,"country":"DE","age":39}]

Get health data for event

Returns the health data for given users of an event

Table 109. /v1/events/{eventId}/data
Parameter Description

eventId

The id the event

Table 110. /v1/events/{eventId}/data
Parameter Description

eventId

The id the event

Table 111. Response Object
Path Type Description

baseData

Null

Contains user-information

records

Array

The health log records

records.[].userId

Null

Contains the user id, if a single user was queried.

records.[].timePeriod.startTimeInSeconds

Number

Start time of this period in sec. since 1970

records.[].timePeriod.durationInSeconds

Number

Duration of this time period

records.[].timePeriod.offsetInSeconds

Number

Offset if the time period

records.[].baseFitness

Null

Information about the base fitness of the users

records.[].baseFitness.points

class java.lang.Double

Total gamification points

records.[].baseFitness.calories

class java.lang.Double

Total calories

records.[].baseFitness.steps

class java.lang.Double

Total steps

records.[].baseFitness.distance

class java.lang.Double

Total distance

records.[].baseFitness.meanMotionIntensity

class java.lang.Double

The average motion intensity

records.[].baseFitness.maxMotionIntensity

class java.lang.Double

The maximum motion intensity

records.[].baseFitness.moderateIntensitySec

class java.lang.Integer

The average number of seconds with moderate motion intensity

records.[].baseFitness.vigorousIntensitySec

class java.lang.Integer

The average number of seconds with vigorous motion intensity

records.[].baseFitness.activeSeconds

class java.lang.Long

The average number of seconds that were active

records.[].baseFitness.mvpaMinutes

class java.lang.Integer

The MVPA minutes

records.[].baseFitness.metMins

class java.lang.Double

The MET minutes

records.[].baseFitness.minMet

class java.lang.Double

The minimum MET (metabolic equivalent of task)

records.[].baseFitness.avgMet

class java.lang.Double

The average MET (metabolic equivalent of task)

records.[].baseFitness.maxMet

class java.lang.Double

The maximum MET (metabolic equivalent of task)

records.[].stressData

Null

Information about the stress of the users

records.[].stressData.minStress

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Minimum stress

records.[].stressData.avgStress

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Average stress

records.[].stressData.maxStress

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Maximum stress

records.[].stressData.stressQualifier

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Human readable stress qualifier of the average stress

records.[].stressData.restStressDurationInSec

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Sum of rest stress seconds

records.[].stressData.lowStressDurationInSec

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Sum of low stress seconds

records.[].stressData.mediumStressDurationInSec

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Sum of medium stress seconds

records.[].stressData.highStressDurationInSec

class com.fitrockr.api.publicApi.healthlog.HealthLogStressDataV1

Sum of high stress seconds

records.[].bodyBatteryData

Null

Information about the body battery of the users

records.[].bodyBatteryData.minBodyBattery

class com.fitrockr.api.publicApi.healthlog.HealthLogBodyBatteryDataV1

Minimum value of the body battery

records.[].bodyBatteryData.avgBodyBattery

class com.fitrockr.api.publicApi.healthlog.HealthLogBodyBatteryDataV1

Average body battery

records.[].bodyBatteryData.maxBodyBattery

class com.fitrockr.api.publicApi.healthlog.HealthLogBodyBatteryDataV1

Maximum body battery value

records.[].sleepData

Null

Information about the sleep in this timeframe

records.[].sleepData.awakeDuration

class com.fitrockr.healthlog.HealthLogSleepData

Total duration of the awake times

records.[].sleepData.lightSleepDuration

class com.fitrockr.healthlog.HealthLogSleepData

Total duration of the light sleep phases

records.[].sleepData.deepSleepDuration

class com.fitrockr.healthlog.HealthLogSleepData

Total duration of the deep sleep phases

records.[].sleepData.remSleepSeconds

class com.fitrockr.healthlog.HealthLogSleepData

Total duration of the rem sleep phases

records.[].sleepData.dominantSleepPhase

class com.fitrockr.healthlog.HealthLogSleepData

Dominant sleep phase

records.[].bbiData

Null

Information about the bbi in this timeframe

records.[].bbiData.minBbi

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

Minimum bbi value

records.[].bbiData.avgBbi

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

Average bbi value

records.[].bbiData.maxBbi

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

Maximum bbi value

records.[].bbiData.sdnn

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

SDNN

records.[].bbiData.rmssd

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

RMSSD

records.[].bbiData.sd1Sd2

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

SD1/SD2

records.[].bbiData.deviationLarger50ms

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

Deviation > 50ms

records.[].bbiData.lfHfRatio

class com.fitrockr.api.publicApi.healthlog.HealthLogBBIDataV1

LH/HF

records.[].heartRateData

Null

Information about the heart rate within this timeframe

records.[].heartRateData.minHeartRate

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Minimum heart rate

records.[].heartRateData.maxHeartRate

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Maximum heart rate

records.[].heartRateData.avgHeartRate

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Average heart rate

records.[].heartRateData.restingHeartRate

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Seconds with resting heart rate

records.[].heartRateData.highSeconds

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Seconds with high heart rate

records.[].heartRateData.mediumSeconds

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Seconds with medium heart rate

records.[].heartRateData.lowSeconds

class com.fitrockr.api.publicApi.healthlog.HealthLogHeartRateDataV1

Seconds with low heart rate

records.[].activityData

Null

Information about the activities in this timeframe

records.[].activityData.dominantActivityType

class com.fitrockr.api.publicApi.healthlog.HealthLogActivityDataV1

Dominant activity type

records.[].activityData.totalDuration

class com.fitrockr.api.publicApi.healthlog.HealthLogActivityDataV1

Total duration of all activities

records.[].activityData.totalDistance

class com.fitrockr.api.publicApi.healthlog.HealthLogActivityDataV1

Total distance of all activities

records.[].activityData.totalSteps

class com.fitrockr.api.publicApi.healthlog.HealthLogActivityDataV1

Total steps of all activities

records.[].pulseOxData

Null

Information about the overall pulse ox

records.[].pulseOxData.minPulseOx

class com.fitrockr.api.publicApi.healthlog.HealthLogPulseOxDataV1

Miniumum pulse ox saturation

records.[].pulseOxData.avgPulseOx

class com.fitrockr.api.publicApi.healthlog.HealthLogPulseOxDataV1

Average pulse ox saturation

records.[].pulseOxData.maxPulseOx

class com.fitrockr.api.publicApi.healthlog.HealthLogPulseOxDataV1

Maximum pulse ox saturation

records.[].respirationData

Null

Information about the respiration

records.[].respirationData.minRespiration

class com.fitrockr.api.publicApi.healthlog.HealthLogRespirationDataV1

Minimum respiration

records.[].respirationData.maxRespiration

class com.fitrockr.api.publicApi.healthlog.HealthLogRespirationDataV1

Maximum respiration

records.[].respirationData.avgRespiration

class com.fitrockr.api.publicApi.healthlog.HealthLogRespirationDataV1

Average Respiration

records.[].actigraphyData1

Null

instance 1 actigraphy information

records.[].actigraphyData1.sumZeroCrossing

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Total number of zero crossings

records.[].actigraphyData1.maxZeroCrossing

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Maximum number of zero crossings

records.[].actigraphyData1.avgZeroCrossing

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Average number of zero crossings

records.[].actigraphyData1.minZeroCrossing

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Minimum number of zero crossings

records.[].actigraphyData1.totalEnergy

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Total enery

records.[].actigraphyData1.timeAboveThreshold

class com.fitrockr.api.publicApi.healthlog.HealthLogActigraphyDataV1

Total time above threshold

records.[].actigraphyData2

Null

instance 2 actigraphy information (Details see actigraphy 1)

records.[].actigraphyData3

Null

instance 3 actigraphy information (Details see actigraphy 1)

Example Request
POST /v1/events/123/data HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Content-Length: 466
Host: localhost:8080

{"userIds":["66057578df579919e90c7f5d"],"startDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":10,"minute":0,"second":0}},"endDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":15,"minute":0,"second":0}},"timeZoneCode":null,"resolutionInMinutes":60,"processIntraday":true,"processStress":true,"processSleep":false,"processHrv":false,"processHr":true,"processActivity":true,"processPulseOx":false,"respiration":false,"processActigraphy":false}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1789

{"baseData":null,"records":[{"userId":null,"timePeriod":{"startTimeInSeconds":1711620000,"durationInSeconds":3599,"offsetInSeconds":0},"baseFitness":null,"stressData":null,"bodyBatteryData":null,"sleepData":null,"bbiData":null,"heartRateData":null,"activityData":null,"pulseOxData":null,"respirationData":null,"actigraphyData1":null,"actigraphyData2":null,"actigraphyData3":null},{"userId":null,"timePeriod":{"startTimeInSeconds":1711623600,"durationInSeconds":3599,"offsetInSeconds":0},"baseFitness":null,"stressData":null,"bodyBatteryData":null,"sleepData":null,"bbiData":null,"heartRateData":null,"activityData":null,"pulseOxData":null,"respirationData":null,"actigraphyData1":null,"actigraphyData2":null,"actigraphyData3":null},{"userId":null,"timePeriod":{"startTimeInSeconds":1711627200,"durationInSeconds":3599,"offsetInSeconds":0},"baseFitness":null,"stressData":null,"bodyBatteryData":null,"sleepData":null,"bbiData":null,"heartRateData":null,"activityData":null,"pulseOxData":null,"respirationData":null,"actigraphyData1":null,"actigraphyData2":null,"actigraphyData3":null},{"userId":null,"timePeriod":{"startTimeInSeconds":1711630800,"durationInSeconds":3599,"offsetInSeconds":0},"baseFitness":null,"stressData":null,"bodyBatteryData":null,"sleepData":null,"bbiData":null,"heartRateData":null,"activityData":null,"pulseOxData":null,"respirationData":null,"actigraphyData1":null,"actigraphyData2":null,"actigraphyData3":null},{"userId":null,"timePeriod":{"startTimeInSeconds":1711634400,"durationInSeconds":3599,"offsetInSeconds":0},"baseFitness":null,"stressData":null,"bodyBatteryData":null,"sleepData":null,"bbiData":null,"heartRateData":null,"activityData":null,"pulseOxData":null,"respirationData":null,"actigraphyData1":null,"actigraphyData2":null,"actigraphyData3":null}]}

Data Export API

Endpoint to generate and download data exports

All User Report

Triggers the creation of an all user report.

Table 112. /v1/standardReports/allUserExport/{exportUserId}
Parameter Description

exportUserId

The Id of user triggered this report

Table 113. Response Object
Path Type Description

id

String

Identifier of the report

exportName

String

Name of this export

exportUserId

String

id of this user that created this export

exportUserName

String

name of the user that created this export

exportCreationDate.date.day

Number

Day of the creation of this export

exportCreationDate.date.month

Number

Month of the creation of this export

exportCreationDate.date.year

Number

Year of the creation of this export

exportCreationDate.time.hour

Number

Hour of the creation of this export

exportCreationDate.time.minute

Number

Minute of the creation of this export

exportCreationDate.time.second

Number

Second of the creation of this export

progressMessage

Null

Current export status as textual message

progress

Number

Number of current data items already exported

total

Number

Number of total data items to be exported

exportUser

Boolean

True, if the user data should be exported.

exportAnalytics

Boolean

True, if the analytics data should be exported.

exportDaily

Boolean

True, if the daily data should be exported.

exportActivity

Boolean

True, if the activity data should be exported.

exportMotionIntensity

Boolean

True, if the motion intensity data should be exported.

exportBbi

Boolean

True, if the bbi data should be exported.

exportSpo2Logging

Boolean

True, if the spo2 logging data should be exported.

exportRespiration

Boolean

True, if the respiration data should be exported.

exportStepLog

Boolean

True, if the step logging data should be exported.

exportZeroCrossing

Boolean

True, if the zero crossing data should be exported.

exportBodyComposition

Boolean

True, if the body composition data should be exported.

exportStress

Boolean

True, if the stress data should be exported.

exportHeartRate

Boolean

True, if the heart rate data should be exported.

exportDailyStepsByDate

Boolean

True, if the daily steps by date data should be exported.

exportEpoc

Boolean

True, if the epoc data should be exported.

exportSleep

Boolean

True, if the sleep data should be exported.

exportVo2Max

Boolean

True, if the vo2 max data should be exported.

exportSpo2

Boolean

True, if the spo2 data should be exported.

exportRawAccelerometer

Boolean

True, if the raw accelerometer data should be exported (JSON only).

exportRawGyroscope

Boolean

True, if the raw gyroscope data should be exported (JSON only).

format

Null

Export format (json, xslx, csv.zip,..)

startDate

Null

Start date (dd.MM.yyyy) of the exported timeframe

endDate

Null

End date (dd.MM.yyyy) of the exported timeframe

status

String

Processing status of the export. Ready, if data is available for downloading. Values could be:<br><ul><li>New - Just created</li><li>Queued - Queued for processing</li><li>Processing - Processing the export</li><li>Error - Failed to generate</li><li>Ready - Ready to download</li><ul>

Example Request
GET /v1/standardReports/allUserExport/66057576df579919e90c7f45 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 873

{"id":"66057576df579919e90c7f48","exportName":"All Users Export","exportUserId":"66057576df579919e90c7f45","exportUserName":"Gus Ferry","exportCreationDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":49,"second":42}},"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[],"exportUser":false,"exportAnalytics":false,"exportDaily":false,"exportActivity":false,"exportMotionIntensity":false,"exportBbi":false,"exportSpo2Logging":false,"exportRespiration":false,"exportStepLog":false,"exportZeroCrossing":false,"exportBodyComposition":false,"exportStress":false,"exportHeartRate":false,"exportDailyStepsByDate":false,"exportEpoc":false,"exportSleep":false,"exportVo2Max":false,"exportSpo2":false,"exportRawAccelerometer":false,"exportRawGyroscope":false,"format":null,"startDate":null,"endDate":null,"status":"New"}

All Data Export

Return a list of all available data exports

Table 114. Response Object
Path Type Description

[].id

String

Identifier of the report

[].exportName

String

Name of this export

[].exportUserId

String

id of this user that created this export

[].exportUserName

String

name of the user that created this export

[].exportCreationDate.date.day

Number

Day of the creation of this export

[].exportCreationDate.date.month

Number

Month of the creation of this export

[].exportCreationDate.date.year

Number

Year of the creation of this export

[].exportCreationDate.time.hour

Number

Hour of the creation of this export

[].exportCreationDate.time.minute

Number

Minute of the creation of this export

[].exportCreationDate.time.second

Number

Second of the creation of this export

[].lastUpdate

Null

Day of the last progress update of this export

[].progressMessage

Null

Current export status as textual message

[].progress

Number

Number of current data items already exported

[].total

Number

Number of total data items to be exported

[].users.[].id

String

Id of the item included in the export

[].users.[].type

String

Type of the item (user, group, research group, team,…​) included in the export

[].users.[].name

String

Name of the item included in the export

[].exportUser

Boolean

True, if the user data should be exported.

[].exportAnalytics

Boolean

True, if the analytics data should be exported.

[].exportDaily

Boolean

True, if the daily data should be exported.

[].exportActivity

Boolean

True, if the activity data should be exported.

[].exportMotionIntensity

Boolean

True, if the motion intensity data should be exported.

[].exportBbi

Boolean

True, if the bbi data should be exported.

[].exportSpo2Logging

Boolean

True, if the spo2 logging data should be exported.

[].exportRespiration

Boolean

True, if the respiration data should be exported.

[].exportStepLog

Boolean

True, if the step logging data should be exported.

[].exportZeroCrossing

Boolean

True, if the zero crossing data should be exported.

[].exportBodyComposition

Boolean

True, if the body composition data should be exported.

[].exportStress

Boolean

True, if the stress data should be exported.

[].exportHeartRate

Boolean

True, if the heart rate data should be exported.

[].exportDailyStepsByDate

Boolean

True, if the daily steps by date data should be exported.

[].exportEpoc

Boolean

True, if the epoc data should be exported.

[].exportSleep

Boolean

True, if the sleep data should be exported.

[].exportVo2Max

Boolean

True, if the vo2 max data should be exported.

[].exportSpo2

Boolean

True, if the spo2 data should be exported.

[].exportRawAccelerometer

Boolean

True, if the raw accelerometer data should be exported (JSON only).

[].exportRawGyroscope

Boolean

True, if the raw gyroscope data should be exported (JSON only).

[].format

String

Export format (json, xslx, csv.zip,..)

[].startDate

String

Start date (dd.MM.yyyy) of the exported timeframe

[].endDate

String

End date (dd.MM.yyyy) of the exported timeframe

[].status

String

Processing status of the export. Ready, if data is available for downloading. Values could be:<br><ul><li>New - Just created</li><li>Queued - Queued for processing</li><li>Processing - Processing the export</li><li>Error - Failed to generate</li><li>Ready - Ready to download</li><ul>

Example Request
GET /v1/dataExports HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 1841

[{"id":"124","exportName":"Report 124","exportUserId":"66057576df579919e90c7f3a","exportUserName":"Gus","exportCreationDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":42}},"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[{"id":"66057576df579919e90c7f3a","type":"user","name":"Gus"}],"exportUser":false,"exportAnalytics":false,"exportDaily":false,"exportActivity":false,"exportMotionIntensity":false,"exportBbi":true,"exportSpo2Logging":false,"exportRespiration":false,"exportStepLog":false,"exportZeroCrossing":false,"exportBodyComposition":false,"exportStress":false,"exportHeartRate":false,"exportDailyStepsByDate":false,"exportEpoc":false,"exportSleep":false,"exportVo2Max":false,"exportSpo2":false,"exportRawAccelerometer":false,"exportRawGyroscope":false,"format":"json","startDate":"01.01.2021","endDate":"05.01.2021","status":"Ready"},{"id":"123","exportName":"Report 123","exportUserId":"66057576df579919e90c7f3a","exportUserName":"Gus","exportCreationDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":42}},"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[{"id":"66057576df579919e90c7f3a","type":"user","name":"Gus"}],"exportUser":false,"exportAnalytics":false,"exportDaily":false,"exportActivity":false,"exportMotionIntensity":false,"exportBbi":true,"exportSpo2Logging":false,"exportRespiration":false,"exportStepLog":false,"exportZeroCrossing":false,"exportBodyComposition":false,"exportStress":false,"exportHeartRate":false,"exportDailyStepsByDate":false,"exportEpoc":false,"exportSleep":false,"exportVo2Max":false,"exportSpo2":false,"exportRawAccelerometer":false,"exportRawGyroscope":false,"format":"json","startDate":"01.01.2021","endDate":"05.01.2021","status":"Ready"}]

Create Data Export

Method to create a new data export. The report will be generated in background.

Table 115. Request Object
Path Type Description

startDate

String

Start date of the data export (format: dd.MM.yyyy)

endDate

String

End date of the data export (format: dd.MM.yyyy)

format

String

Export format: xlsx, json or json.zip

allUsers

Boolean

Boolean parameter. If set to true, all users will be exported and the users array will be ignored.

users.[].id

String

Id of the item included in the export

users.[].type

String

Type of the item (user, group, research group, team,…​) included in the export

users.[].name

String

Name of the item included in the export

progressMessage

Null

Current export status as textual message

progress

Number

Number of current data items already exported

total

Number

Number of total data items to be exported

exportUserId

String

id of this user who created this export

exportUser

Boolean

True, if the user data should be exported.

exportAnalytics

Boolean

True, if the analytics data should be exported.

exportDaily

Boolean

True, if the daily data should be exported.

exportActivity

Boolean

True, if the activity data should be exported.

exportMotionIntensity

Boolean

True, if the motion intensity data should be exported.

exportBbi

Boolean

True, if the bbi data should be exported.

exportSpo2Logging

Boolean

True, if the spo2 logging data should be exported.

exportRespiration

Boolean

True, if the respiration data should be exported.

exportStepLog

Boolean

True, if the step logging data should be exported.

exportZeroCrossing

Boolean

True, if the zero crossing data should be exported.

exportBodyComposition

Boolean

True, if the body composition data should be exported.

exportStress

Boolean

True, if the stress data should be exported.

exportHeartRate

Boolean

True, if the heart rate data should be exported.

exportDailyStepsByDate

Boolean

True, if the daily steps by date data should be exported.

exportEpoc

Boolean

True, if the epoc data should be exported.

exportSleep

Boolean

True, if the sleep data should be exported.

exportVo2Max

Boolean

True, if the vo2 max data should be exported.

exportSpo2

Boolean

True, if the spo2 data should be exported.

exportRawAccelerometer

Boolean

True, if the raw accelerometer data should be exported (JSON only).

exportRawGyroscope

Boolean

True, if the raw gyroscope data should be exported (JSON only).

Table 116. Response Object
Path Type Description

id

String

Identifier of the report

exportName

Null

Name of this export

exportUserId

String

id of this user that created this export

exportUserName

String

name of the user that created this export

exportCreationDate.date.day

Number

Day of the creation of this export

exportCreationDate.date.month

Number

Month of the creation of this export

exportCreationDate.date.year

Number

Year of the creation of this export

exportCreationDate.time.hour

Number

Hour of the creation of this export

exportCreationDate.time.minute

Number

Minute of the creation of this export

exportCreationDate.time.second

Number

Second of the creation of this export

users.[].id

String

Id of the item included in the export

users.[].type

String

Type of the item (user, group, research group, team,…​) included in the export

users.[].name

String

Name of the item included in the export

progressMessage

Null

Current export status as textual message

progress

Number

Number of current data items already exported

total

Number

Number of total data items to be exported

exportUser

Boolean

True, if the user data should be exported.

exportAnalytics

Boolean

True, if the analytics data should be exported.

exportDaily

Boolean

True, if the daily data should be exported.

exportActivity

Boolean

True, if the activity data should be exported.

exportMotionIntensity

Boolean

True, if the motion intensity data should be exported.

exportBbi

Boolean

True, if the bbi data should be exported.

exportSpo2Logging

Boolean

True, if the spo2 logging data should be exported.

exportRespiration

Boolean

True, if the respiration data should be exported.

exportStepLog

Boolean

True, if the step logging data should be exported.

exportZeroCrossing

Boolean

True, if the zero crossing data should be exported.

exportBodyComposition

Boolean

True, if the body composition data should be exported.

exportStress

Boolean

True, if the stress data should be exported.

exportHeartRate

Boolean

True, if the heart rate data should be exported.

exportDailyStepsByDate

Boolean

True, if the daily steps by date data should be exported.

exportEpoc

Boolean

True, if the epoc data should be exported.

exportSleep

Boolean

True, if the sleep data should be exported.

exportVo2Max

Boolean

True, if the vo2 max data should be exported.

exportSpo2

Boolean

True, if the spo2 data should be exported.

exportRawAccelerometer

Boolean

True, if the raw accelerometer data should be exported (JSON only).

exportRawGyroscope

Boolean

True, if the raw gyroscope data should be exported (JSON only).

format

String

Export format (json, xslx,..)

startDate

String

Start date (dd.MM.yyyy) of the exported timeframe

endDate

String

End date (dd.MM.yyyy) of the exported timeframe

status

String

Processing status of the export. Ready, if data is available for downloading. Values could be:<br><ul><li>New - Just created</li><li>Queued - Queued for processing</li><li>Processing - Processing the export</li><li>Error - Failed to generate</li><li>Ready - Ready to download</li><ul>

Example Request
POST /v1/dataExports HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Content-Length: 826
Host: localhost:8080

{"id":null,"exportName":null,"exportUserId":"66057576df579919e90c7f4a","exportUserName":null,"exportCreationDate":null,"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[{"id":"66057576df579919e90c7f4a","type":"user","name":"Gus"}],"exportUser":false,"exportAnalytics":true,"exportDaily":false,"exportActivity":false,"exportMotionIntensity":false,"exportBbi":false,"exportSpo2Logging":false,"exportRespiration":false,"exportStepLog":false,"exportZeroCrossing":false,"exportBodyComposition":false,"exportStress":false,"exportHeartRate":false,"exportDailyStepsByDate":false,"exportEpoc":false,"exportSleep":false,"exportVo2Max":false,"exportSpo2":false,"exportRawAccelerometer":false,"exportRawGyroscope":false,"format":"xlsx","startDate":"01.01.2020","endDate":"31.01.2020","status":null}
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 917

{"id":"66057576df579919e90c7f4d","exportName":null,"exportUserId":"66057576df579919e90c7f4a","exportUserName":"Gus Ferry","exportCreationDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":13,"minute":49,"second":42}},"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[{"id":"66057576df579919e90c7f4a","type":"user","name":"Gus"}],"exportUser":true,"exportAnalytics":true,"exportDaily":true,"exportActivity":true,"exportMotionIntensity":true,"exportBbi":true,"exportSpo2Logging":true,"exportRespiration":true,"exportStepLog":true,"exportZeroCrossing":true,"exportBodyComposition":true,"exportStress":true,"exportHeartRate":true,"exportDailyStepsByDate":true,"exportEpoc":true,"exportSleep":true,"exportVo2Max":true,"exportSpo2":true,"exportRawAccelerometer":true,"exportRawGyroscope":true,"format":"xlsx","startDate":"01.01.2020","endDate":"31.01.2020","status":"New"}

Find Data Export

Find a certain data export by id.

Table 117. /v1/dataExports/{exportConfigurationId}
Parameter Description

exportConfigurationId

The Id of the export configuration

Table 118. Response Object
Path Type Description

id

String

Identifier of the report

exportName

String

Name of this export

exportUserId

String

id of this user that created this export

exportUserName

String

name of the user that created this export

exportCreationDate.date.day

Number

Day of the creation of this export

exportCreationDate.date.month

Number

Month of the creation of this export

exportCreationDate.date.year

Number

Year of the creation of this export

exportCreationDate.time.hour

Number

Hour of the creation of this export

exportCreationDate.time.minute

Number

Minute of the creation of this export

exportCreationDate.time.second

Number

Second of the creation of this export

users.[].id

String

Id of the item included in the export

users.[].type

String

Type of the item (user, group, research group, team,…​) included in the export

users.[].name

String

Name of the item included in the export

progressMessage

Null

Current export status as textual message

progress

Number

Number of current data items already exported

total

Number

Number of total data items to be exported

exportUser

Boolean

True, if the user data should be exported.

exportAnalytics

Boolean

True, if the analytics data should be exported.

exportDaily

Boolean

True, if the daily data should be exported.

exportActivity

Boolean

True, if the activity data should be exported.

exportMotionIntensity

Boolean

True, if the motion intensity data should be exported.

exportBbi

Boolean

True, if the bbi data should be exported.

exportSpo2Logging

Boolean

True, if the spo2 logging data should be exported.

exportRespiration

Boolean

True, if the respiration data should be exported.

exportStepLog

Boolean

True, if the step logging data should be exported.

exportZeroCrossing

Boolean

True, if the zero crossing data should be exported.

exportBodyComposition

Boolean

True, if the body composition data should be exported.

exportStress

Boolean

True, if the stress data should be exported.

exportHeartRate

Boolean

True, if the heart rate data should be exported.

exportDailyStepsByDate

Boolean

True, if the daily steps by date data should be exported.

exportEpoc

Boolean

True, if the epoc data should be exported.

exportSleep

Boolean

True, if the sleep data should be exported.

exportVo2Max

Boolean

True, if the vo2 max data should be exported.

exportSpo2

Boolean

True, if the spo2 data should be exported.

exportRawAccelerometer

Boolean

True, if the raw accelerometer data should be exported (JSON only).

exportRawGyroscope

Boolean

True, if the raw gyroscope data should be exported (JSON only).

format

String

Export format (json, xslx, csv.zip..)

startDate

String

Start date (dd.MM.yyyy) of the exported timeframe

endDate

String

End date (dd.MM.yyyy) of the exported timeframe

status

String

Processing status of the export. Ready, if data is available for downloading. Values could be:<br><ul><li>New - Just created</li><li>Queued - Queued for processing</li><li>Processing - Processing the export</li><li>Error - Failed to generate</li><li>Ready - Ready to download</li><ul>

Example Request
GET /v1/dataExports/123 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN
Content-Length: 919

{"id":"123","exportName":"Report 123","exportUserId":"66057576df579919e90c7f2d","exportUserName":"Gus","exportCreationDate":{"date":{"year":2024,"month":3,"day":28},"time":{"hour":14,"minute":49,"second":42}},"progressMessage":null,"progress":0,"total":0,"lastUpdate":null,"allUsers":false,"users":[{"id":"66057576df579919e90c7f2d","type":"user","name":"Gus"}],"exportUser":false,"exportAnalytics":false,"exportDaily":false,"exportActivity":false,"exportMotionIntensity":false,"exportBbi":true,"exportSpo2Logging":false,"exportRespiration":false,"exportStepLog":false,"exportZeroCrossing":false,"exportBodyComposition":false,"exportStress":false,"exportHeartRate":false,"exportDailyStepsByDate":false,"exportEpoc":false,"exportSleep":false,"exportVo2Max":false,"exportSpo2":false,"exportRawAccelerometer":false,"exportRawGyroscope":false,"format":"json","startDate":"01.01.2021","endDate":"05.01.2021","status":"Ready"}

Delete Data Export

Delete a certain data export by id.

Table 119. /v1/dataExports/{exportConfigurationId}
Parameter Description

exportConfigurationId

The Id of the export configuration

Example Request
DELETE /v1/dataExports/123 HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Download the data export

Important
The export needs to be finished before you can request a download.

Downloads the exported data

Path Parameters

see Find Data Export

Example Request
GET /v1/data/export/123/download HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response

Rendered PDF report.

Live Data API

Live Control API

The Live control API is used to send commands to the fitrockr cloud. The commands will be forwarded to one or more devices. Basically you can use this api to start or stop the event flow or request information about devices.

Request Device Information (Ping)

Requests a ping from all active devices currently connected to the live queue of this tenant. The result will be delivered via the event stream. The devices will issue a ping event containing the device information

Example Request
GET /v1/live/control/ping HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Start Stream

Starts the event stream on all devices

Example Request
GET /v1/live/control/start HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Stop Stream

Stops the event stream on all devices

Example Request
GET /v1/live/control/stop HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Start Device

Start the event stream on a single device. The device is identified by the mac address.

Table 120. /v1/live/control/start/{macAddress}
Parameter Description

macAddress

The mac address of the tracker that should be started.

Example Request
GET /v1/live/control/start/AA:BB:CC:DD:EE:FF HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Stop Device

Stop the event stream on a single device. The device is identified by the mac address.

Table 121. /v1/live/control/stop/{macAddress}
Parameter Description

macAddress

The mac address of the tracker that should be stopped.

Example Request
GET /v1/live/control/stop/AA:BB:CC:DD:EE:FF HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Kill Device

Kill the event stream on a single device. This means that the device disconnects from the live stream. This command is irrevocable. The user has to manually enable the device stream again. The device is identified by the mac address.

Table 122. /v1/live/control/kill/{macAddress}
Parameter Description

macAddress

The mac address of the tracker that should be killed.

Example Request
GET /v1/live/control/kill/AA:BB:CC:DD:EE:FF HTTP/1.1
Content-Type: application/json
X-Tenant: <tenant-id>
X-API-Key: <api-key>
Host: localhost:8080
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: SAMEORIGIN

Live Event Stream

Introduction

The live data API is based on Websockets using STOMP (https://stomp.github.io/) as a protocol. Using this API, you can receive Data from the wearable in real time and realize usecases like live monitoring of Athletes or Patients. The protocol is event based. You listen to a specific topic and whenever data is published to that topic, your endpoint will be informed immediately.

Client libraries for STOMP can be found here: https://stomp.github.io/implementations.html

Authentication

The same credentials as for the regular Rest API can be used. During the connection process, you have to provide your API Key and the Tenant identifier as header parameters (X-API-Key and X-Tenant) to the server.

Using typescript you would use the following connection code providing the credentials:

this.stompClient.connect({'X-API-Key':'<api-key>', 'X-Tenant': '<tenantId>'}, () => {...}});

Available Topics

At the moment, the only available event topic is '/topic/live'. Subscribing to this topic, you would receive live updates of tracker data connected to the backend.

Live Message Data Structure

The body of a message received from the live topic is a live message object consisting of following attributes.

class LiveMessage {
    version: number; // Version of the data that is sent
    tenant: string; // Tenant identifier of that message
    command: string; // An optional command to be executed by the client
    liveData: LiveDataEvent; // Contains the event data
    liveDevice: LiveDevice; // Contains information about the device sending the events (optional)
}

class LiveDataEvent {
    identifier: string; // Unique identifier of this stream (each device sending gets its own unique id)
    tenant: string; // Tenant identifier of this device
    dataType: string; // Identifier for the type of data (see below)
    macAddress: string; // MacAddress of the device posted this data event
    value: number; // Data value
    timestamp: number; // Timestamp in msec
}

// Just issued, if new device is connected or ping was requested
class LiveDevice {
    deviceId: string; // Device identifier (same as the identifier of the live data event
    deviceName: string; // Name of the device (phone or tablet) that is connected to this tracker
    trackerAddress: string; // MacAddress of the tracker
    trackerName: string; // Name of the tracker (e.g. vivosmart4)
    userId: string; //Internal user id assigned to the tracker
    userName: string; //Name of the user assigned to the tracker
    trackerFirmware: string; //Firmware of the tracker
    trackerBattery: string; //Remaining Battery (Percentage)
    active: boolean; //Indicator, if the device is actively sending data
}

Receiving commands

  • Data - A tracker has sent some data. The Live Data Attribute is filled with the data received from the tracker

  • DeviceAdded - A new device was added or a device issued a ping. Live Data attribute is filled with some device information

Data Types

  • STEPS

  • HEART_RATE_VARIABILITY

  • CALORIES

  • ASCENT

  • INTENSITY_MINUTES

  • HEART_RATE

  • STRESS

  • ACCELEROMETER

  • SPO2

  • BODY_BATTERY

  • RESPIRATION

  • ACTIVE_TIME

  • TRAINING_READINESS

  • SDNN - HRV based SDNN Kpi

  • RMSSD - HRV based RMSSD Kpi

  • DEVIATION_LARGER_50_MS - HRV based percentage of deviation larger 50ms between two heart beats

  • SD1_SD2 - HRV based SD1/SD2 Kpi

  • LF_HF_RATIO - HRV based LF/HF Ratio

Sample Application

A typescript sample app is available at: https://gitlab.com/fitrockr/fitrockr-live-api-example. Please reach out to the fitrockr support with your gitlab username to request access to the application.

Live Control API

To be done..