Kligo
v2
v2
  • Documentation de Kligo
  • SERVICES
    • ๐Ÿ‘จโ€๐Ÿ’ป API
    • ๐Ÿ‘ฎโ€โ™€๏ธ Authentication
    • ๐Ÿ”Observation
    • ๐Ÿ“ฒDevices
    • ๐Ÿšถโ€โ™‚๏ธ Patient (experimental)
    • โ›๏ธGetting data points
      • ๐Ÿ—„๏ธREST server
      • ๐Ÿ’ซSocket.IO
  • UTILISATION
    • ๐Ÿ‡ซ๐Ÿ‡ท Installation
    • ๐Ÿ‡ซ๐Ÿ‡ท Configuration LGC
    • ๐Ÿ‡ซ๐Ÿ‡ท Jumelage
    • ๐Ÿ‡ซ๐Ÿ‡ท Utilisation
    • โ˜‘๏ธ Compatibilitรฉ
  • Distributeurs
    • Offre d'essai
  • Misc
    • ๐Ÿ“ฏChangelog
Powered by GitBook
On this page

Was this helpful?

  1. SERVICES
  2. Getting data points

REST server

Fetch data points directly from Kligo's embedded REST server.

PreviousGetting data pointsNextSocket.IO

Last updated 5 years ago

Was this helpful?

In Kligo future releases, this REST Server will expose datapoint as .

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 => {

/* ... */

});
โ›๏ธ
๐Ÿ—„๏ธ
FHIR Observation