I am using GoogleFit API to fetch the data I have added in the Gooogle Fit app, but it takes around 30 mins or so to get that data reflected in the API response.
API: https://www.googleapis.com/fitness/v1/users/me/dataset:aggregate
Request Body
{
"aggregateBy": [{
"dataTypeName": "com.google.blood_glucose"
},
{
"dataTypeName": "com.google.blood_pressure"
},
{
"dataTypeName": "com.google.heart_rate.bpm"
}],
"startTimeMillis": 1645446600000,
"endTimeMillis": 1645533000000
}
Response Body
{
"bucket": [
{
"startTimeMillis": "1645446600000",
"endTimeMillis": "1645533000000",
"dataset": [
{
"dataSourceId": "derived:com.google.blood_glucose:com.google.android.gms:merged",
"point": []
},
{
"dataSourceId": "derived:com.google.blood_pressure:com.google.android.gms:merged",
"point": []
},
{
"dataSourceId": "derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm",
"point": []
}
]
}
]
}