Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mclarkson/obdi-helloworld-localdb
Demonstrates using a private sqlite3 database.
https://github.com/mclarkson/obdi-helloworld-localdb
obdi obdi-plugin
Last synced: 9 days ago
JSON representation
Demonstrates using a private sqlite3 database.
- Host: GitHub
- URL: https://github.com/mclarkson/obdi-helloworld-localdb
- Owner: mclarkson
- License: gpl-3.0
- Created: 2016-04-07T16:59:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T09:15:51.000Z (about 7 years ago)
- Last Synced: 2024-10-19T09:31:48.238Z (27 days ago)
- Topics: obdi, obdi-plugin
- Language: C
- Homepage: http://helloworld-localdb.obdi.io/
- Size: 1.56 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# obdi-helloworld-localdb
This Obdi plugin has a UI and a private sqlite3 database.
## Screenshot
![](images/helloworld-localdb.png?raw=true)
## What is it?
A starting point for writing an Obdi plugin that uses a private sqlite3 database.* This plugin has a Web Interface.
* This plugin uses a private sqlite database.
* This plugin exposes a REST endpoint.
The GUI uses REST to access the private database.
* This plugin does not run scripts on workers.Similar plugin: [obdi-saltregexmanager](https://github.com/mclarkson/obdi-saltregexmanager)
## Using the REST Endpoint for CRUD from the Command Line
```
# Log in$ ipport="127.0.0.1:443"
$ guid=`curl -ks -d '{"Login":"nomen.nescio","Password":"password"}' \
https://$ipport/api/login | grep -o "[a-z0-9][^\"]*"`# Create
$ curl -k -d '{"Text":"Hello"}' \
https://$ipport/api/nomen.nescio/$guid/helloworld-localdb/helloworld-localdb?env_id=1# Read
$ curl -k https://$ipport/api/nomen.nescio/$guid/helloworld-localdb/helloworld-localdb?env_id=1
# Update
$ curl -k -d '{"Id":1,"Text":"Hello there"}' -X PUT \
https://$ipport/api/nomen.nescio/$guid/helloworld-localdb/helloworld-localdb?env_id=1# Delete
$ curl -k -X DELETE \
https://$ipport/api/nomen.nescio/$guid/helloworld-localdb/helloworld-localdb/1?env_id=1
```See [obdi-dev-repository](https://github.com/mclarkson/obdi-dev-repository)
for more information about Dev plugins.