Initial, needs key/val pair description

This commit is contained in:
Owen 2020-10-03 23:21:07 +02:00 committed by Owen
parent 5e1ec6f604
commit c9bc9159db
1 changed files with 25 additions and 0 deletions

25
API.md Normal file
View File

@ -0,0 +1,25 @@
# Basic HTTP Commands
## It's an API Jim, but not as we know it
The WebUI and camera server communicate entirely via HTTP requests and responses; this makes controlling all functions of the camera via GET requests possible. An API in effect.
## URI's
### Http Port
`/` Root URI; primary WebUI
`/capture` Return a Jpeg snapshot image
`/view` Simplified Viewer
`/status` Returns a JSON string with all camera status <key>/<value> pairs listed
`/control?var=<key>&val=<val>` Set <key> to <val>
`/dump` Status page
### Stream Port
`/` Root URI; Raw stream
`/view` Stream viewer
## <key> / <val> settings and commands
.. thie list.. the list is the thing.
## Examples
Flash light: on/off
http://<IP-ADDRESS>/control?var=lamp&val=100
http://<IP-ADDRESS>/control?var=lamp&val=0