APIs » History » Version 1
Philippe May, 05/04/2021 11:27
| 1 | 1 | Philippe May | h1. APIs |
|---|---|---|---|
| 2 | 1 | Philippe May | |
| 3 | 1 | Philippe May | Gisaf's web interface uses server's APIs, that can also be used for third party software integration, eg. for retrieving data from the database with HTTP requests. |
| 4 | 1 | Philippe May | |
| 5 | 1 | Philippe May | The APIs use 2 technologies: json REST stores and Graphql. |
| 6 | 1 | Philippe May | |
| 7 | 1 | Philippe May | This page is a work-in-progress documentation effort - refer to source code for a comprehensive and up to date API list and usage: |
| 8 | 1 | Philippe May | |
| 9 | 1 | Philippe May | * https://redmine.auroville.org.in/projects/gisaf/repository/revisions/master/entry/gisaf/api.py |
| 10 | 1 | Philippe May | * https://redmine.auroville.org.in/projects/gisaf/repository/revisions/master/entry/gisaf/graphql_api.py |
| 11 | 1 | Philippe May | |
| 12 | 1 | Philippe May | h2. Json stores |
| 13 | 1 | Philippe May | |
| 14 | 1 | Philippe May | h3. Getting record values from devices |
| 15 | 1 | Philippe May | |
| 16 | 1 | Philippe May | For the custom models that define time-based values, eg. fetched from "IoT" enabled devices such as weather stations or other sensors, the generic HTTP request scheme is: |
| 17 | 1 | Philippe May | |
| 18 | 1 | Philippe May | <pre> |
| 19 | 1 | Philippe May | /api/avsm_misc.weather_station/values/temperature?where=%7B%22avsm_misc.weather_station%22:4%7D&sort=%7B%22time%22:false%7D&resample=H |
| 20 | 1 | Philippe May | </pre> |