Get Information about a Metric
GET https://api.futureland.tv/metrics/:metricId
Response
{
"id": "919b054b-3024-444f-b9f8-f0de4d982acd",
"name": "⚖️ Body Weight",
"unit": "kilogram",
"defaultValue": null,
"user_id": 365,
"total": 4221.6,
"average": 68.0903225806451,
"count": 62
}
Get Aggregated Data from the Last 30 Days
GET https://api.futureland.tv/metrics/:metricId/last-30-days
Response
[
{
"date": "2023-04-05T00:00:00.000Z",
"total": 68.8,
"average": 68.8,
"count": 1,
"unit": "kilogram"
},
{
"date": "2023-04-06T00:00:00.000Z",
"total": 68.35,
"average": 68.35,
"count": 1,
"unit": "kilogram"
},
{
"date": "2023-04-07T00:00:00.000Z",
"total": 68.1,
"average": 68.1,
"count": 1,
"unit": "kilogram"
},
...
]
Create new MetricData
POST https://api.futureland.tv/metrics-data
{
"id": "e40559db-fb74-46d4-a269-ada54e6cb1aa", // optional (will autogenerate if omitted))
"value": 69.75,
"unit": "kilogram",
"date": "2024-06-17T17:27:54.875Z",
"timezone": "America/Toronto", // optional (if omitted will use user's current timezone)
"metric_id": "919b054b-3024-444f-b9f8-f0de4d982acd"
}