API

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"
  },
  ...
]