🗄️REST server
Fetch data points directly from Kligo's embedded REST server.
Get Data
GET http://localhost:63336/v0/data
This method returns every data points stored in Kligo local's database.
Path Parameters
Name
Type
Description
offset
number
The API is now paginated and shows 50 results per request. Use the offset parameter to get the piece of cake you desire, for instance if you want to get results starting by the 50th you would GET http://localhost:63336 /v0/data?offset=50
[{
"id": "123abc",
"timestamp": 1483228800000,
"deviceId": "5868387abcdef123456",
"deviceType": "blood pressure monitor",
"type": "heart_rate"
"unit": "beats/min",
"value": 75,
"archived": false
},
{
"id": "456def",
"timestamp": 1483228800001,
"deviceId": "5868387123456abcdef",
"deviceType": "weight scale",
"type": "body_weight"
"unit": "kg",
"value": 70,
"archived": false
}]
[]fetch('https://api.medeo.io/v0/data/', {
// you can also fetch in prod by hitting http://localhost:63336/v0/data/
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json; charset=utf-8',
'x-api-key': '<YOUR_KEY>'
}
}).then( response => {
//do what you want
});// our api requires the correct security protocol, without it your requests will fail.
ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls12 |
SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls;
var client = new RestClient\("http://localhost:63336/");
var request = new RestRequest("/v0/data/", Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("x-api-key", apiKey);
request.RequestFormat = DataFormat.Json;
client.ExecuteAsync(request, response => {
/* ... */
});Last updated
Was this helpful?