Rest SQL serves a fully RESTful API from a PostgreSQL database.
To deploy to a remote server,
make ansible
To use locally,
make start
You can the visit the following URL in a browser on your host machine to get started:
# Open REST API
http://localhost:9090/
# Open database browser
http://localhost:9091/
create table sensor_values
(epoch timestamp default current_timestamp,
value real not null default 0,
primary key (epoch));
curl -s -H "Content-Type: application/json" \
-d '{"value" : "0"}' \
localhost:9090/sensor_values
curl -G localhost:9090/sensor_values \
-d select="epoch,value" \
-d order=epoch.desc \
-d limit=10