Docker image for SQLITE data retrieval in rest API format. GUI and Interface with Grafana.
357
docker run -p 5000:5000 -v /path-to/sqlite-database/data:/usr/src/app/data -e SQLITE_DB="yoursqlite.sqlitedb" -d sqlite-webapi
http://localhost:5000/ - Docker Healthcheck URL - returns 'active' when up.
http://localhost:5000/read/select [sqlite query] - Query data without header in JSON format
http://localhost:5000/raw/select [sqlite query] - Query SQLite data with column header in JSON format
http://localhost:5000/write/ - Pass Query JSON object via POST method for updating, deleting, inserting data into the SQLITE database
Try the below from browser
http://localhost:5000/read/select * from sqlite_master
Try the below from a webpage
{ "query":"insert into logs (log_text) values ( 'Hello World!' );" }
Install Simple Json
From Simple Json Datasource Connect to sqlite-webapi from dropdown
Use query http://localhost:5000/query - Grafana to query time series data or table data from SQLITE database.
CREATE TABLE quries_history ( query text, time integer not null default (strftime('%s','now')))
Content type
Image
Digest
Size
30.2 MB
Last updated
about 6 years ago
docker pull navinp/sqlite-webapi