diff --git a/API.md b/API.md index 91fa905..90896ec 100644 --- a/API.md +++ b/API.md @@ -9,7 +9,7 @@ The WebUI and camera server communicate entirely via HTTP requests and responses * `/?target=full|simple|portal` - Go direct to specific index * `/capture` - Return a Jpeg snapshot image * `/status` - Returns a JSON string with all camera status / pairs listed -* `/control?var=&val=` - Set to +* `/control?var=&val=` - Set `` to `` * `/dump` - Status page ### Stream Port @@ -64,7 +64,7 @@ code_ver - Code compile date and time; String stream_url - Raw stream URL; string ``` #### Commands -These are commands; they can be sent by calling the `/control` URI with them as the ``, the `` must be supplied, but can be any value and is ignored. +These are commands; they can be sent by calling the `/control` URI with them as the `` *(a `` must also be supplied, but can be any value and is ignored)*. ``` face_enroll - Enroll a new face in the FaceDB (only when face recognition is avctive) save_prefs - Saves preferences file @@ -77,10 +77,13 @@ reboot - Reboots the camera * `http:///control?var=lamp&val=50` * `http:///control?var=lamp&val=0` * Set resolution to VGA - * `http://10.0.0.180/control?var=framesize&val=6` + * `http:///control?var=framesize&val=6` * Show camera details and settings * All settings are returned via single `status` call in [JSON](https://www.json.org/) format. * `http:///status` - `{"lamp":0,"autolamp":0,"framesize":10,"quality":10,"brightness":0,"contrast":0,"saturation":0,"sharpness":0,"special_effect":0,"wb_mode":0,"awb":1,"awb_gain":1,"aec":1,"aec2":0,"ae_level":0,"aec_value":168,"agc":1,"agc_gain":0,"gainceiling":0,"bpc":0,"wpc":1,"raw_gma":1,"lenc":1,"vflip":0,"hmirror":0,"dcw":1,"colorbar":0,"face_detect":0,"face_enroll":0,"face_recognize":0,"cam_name":"General","code_ver":"Mar 6 2021 @ 17:54:00","rotate":"0","stream_url":"http://10.0.0.190:81/"}` + * Returns: + ``` {"lamp":0,"autolamp":0,"framesize":10,"quality":10,"brightness":0,"contrast":0,"saturation":0,"sharpness":0,"special_effect":0,"wb_mode":0,"awb":1,"awb_gain":1,"aec":1,"aec2":0,"ae_level":0,"aec_value":168,"agc":1,"agc_gain":0,"gainceiling":0,"bpc":0,"wpc":1,"raw_gma":1,"lenc":1,"vflip":0,"hmirror":0,"dcw":1,"colorbar":0,"face_detect":0,"face_enroll":0,"face_recognize":0,"cam_name":"General","code_ver":"Mar 6 2021 @ 17:54:00","rotate":"0","stream_url":"http://10.0.0.190:81/"}``` +* Reboot the camera + * `http:///control?var=reboot&val=0` You can try these yourself in a browser address bar, from the commandline with `curl` and co. or use them programatically from your scripting language of choice.