Fetch
POST
/api/fetch/{method}
Path parameters
-
method string Required
Can be one of the following: basalMetabolicRate, bloodGlucose, bloodPressure, bodyFat, distance, exerciseSession, heartRate, height, nutrition, oxygenSaturation, power, sleepSession, speed, steps, totalCaloriesBurned, vo2Max, weight
Body
-
userid string
The user id obtained from /api/login
-
queries array[string]
Queries to use to filter the data. See https://github.com/CoolCoderSJ/HCGateway#rest-api for more information.
POST /api/fetch/{method}
curl \
-X POST https://api.hcgateway.shuchir.dev/api/fetch/{method} \
-H "Content-Type: application/json" \
-d '{"userid":"string","queries":["string"]}'
Request example
{
"userid": "string",
"queries": [
"string"
]
}
Response examples (200)
{
"$id": "string",
"$createdAt": "2023-05-04T09:42:00+00:00",
"$updatedAt": "2023-05-04T09:42:00+00:00",
"$permissions": [
"string"
],
"$databaseId": "string",
"$collectionId": "string",
"data": {},
"id": "string",
"start": "2023-05-04T09:42:00+00:00",
"end": "2023-05-04T09:42:00+00:00",
"app": "string"
}