Skip to content

Commit

Permalink
add 10 new REST API routes
Browse files Browse the repository at this point in the history
  • Loading branch information
bhjelstrom committed Apr 24, 2023
1 parent f5019da commit 8e982ba
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
19 changes: 19 additions & 0 deletions docs/csv/restapi.csv
@@ -0,0 +1,19 @@
METHOD, ROUTE, DESCRIPTION
GET, /results,Retrieve full JSON dump of current targeting results

GET, /capturesnapshot,"Capture a snapshot. Include a ""snapname"" string header to name the snapshot"
POST, /uploadsnapshot,"Upload a named snapshot. Include a ""snapname"" header. Include an image in the body of the request"
GET, /snapshotmanifest,Returns a list of snapshot file names
GET, /deletesnapshots,Deletes all snapshots

GET, /hwreport,"Returns a JSON array of full hardware reports. A hardware report is derived from a calibration result and contains human-readable information such as FOV, principal offset, etc."

GET, /cal-default,Returns default calibration result
GET, /cal-file,Returns custom calibration result (file system)
GET, /cal-eeprom,Returns custom calibration result (eeprom)
GET, /cal-latest,Returns latest custom calibration result. This result is not used unless it is saved to the file system or the eeprom
POST, /cal-eeprom,Update the eeprom calibration result
POST, /cal-file,Update the filesystem calibration result
DEL, /cal-latest,Delete latest calibration result
DEL, /cal-eeprom,Delete eeprom calibration result
DEL, /cal-file,Delete filesystem calibration result
20 changes: 11 additions & 9 deletions docs/rest_api.rst
@@ -1,19 +1,21 @@
REST/HTTP and Websocket APIs
============================

REST/HTTP:

================================================= ==========================================================================================================================================================
GET <http://<IPADDRESS>:5807/results> Retrieve full JSON dump of current targeting results
------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------
GET <http://<IPADDRESS>:5807/capturesnapshot> Capture a snapshot. Include a "snapname" string header to name the snapshot
------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------
POST <http://<IPADDRESS>:5807/uploadsnapshot> Upload a named snapshot. Include a "snapname" header. Include an image in the body of the request
------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------
================================================= ==========================================================================================================================================================
REST/HTTP (PORT 5807) API Summary:
----------------------

.. note:: e.g. http://<limelight-ip-address>:5807/results

.. csv-table::
:file: csv/restapi.csv
:widths: 10, 10, 10
:header-rows: 1



Websocket Results Server:
----------------------

========================== ==========================================================================================================================================================
ws://<IPADDRESS>:5806 Websocket server streaming full JSON dump of current targeting results at full framerate
Expand Down

0 comments on commit 8e982ba

Please sign in to comment.