Page:
Web API
Pages
Audio Input und Speech Recognition
Cocoon man
Coffin ghost
Crazy Witch
Deploying flask with uwsgi and nginx
Dungeon
Eyes in the dark
Grave riser
Halloween Control Center
Hanging ghost
Home
How to get the NodeMCU up and running
How to install py neopixel spidev
How to install pylibftdi for DMX
Ideas 2018
Ideas 2019
Ideas for 2021 (hopefully)
Ideas for 2022
Ideas for 2023
Ideas for 2024
Ideas for refactoring 2021
Installations
LEGO
Monster in a box
Open a reverse shell
Prisoner
Raspberry Pi Overview
Setting up a new scary RPi
Setup Remote Software Update
Spider
Swaying Zombie
USB Audio on Raspberry Pi Zero
Web API
Weremonkey
Zombie Fence
No results
24
Web API
mattzz edited this page 2018-10-23 20:58:05 +02:00
Table of Contents
Web API
Debug functions
| URL | Returns | Description |
|---|---|---|
/playback/<string:soundfile> |
json data | plays back file in static/sounds/ |
internal calls
| URL | Returns | Description |
|---|---|---|
/qr/<string:name> |
QR image data | used by /qrgen/<string:name> |
/qrgen/<string:name> |
html, page with QR code | used to generate and display QR image |
/hello/<string:name> |
html, page with welcome message | welcomes fully licensed Halloween operator |
/dmesg |
output from dmesg rendered in info.html |
simple means of health monitoring |
/reset_db |
ok in info.html | resets status values in db |
/discovery |
restul in info.html | updates discovery data in db |
Generic API
| URL | Verb | Description |
|---|---|---|
/ |
GET | Returns master screen with buttons to trigger scary actions and scary sounds of all exhibits and to enable/disable the auto mode of the exhibits where applicable |
/ping |
GET | Returns the string "pong" |
/auto_mode |
GET | Returns the current auto mode state (on, off or na if auto mode is not supported) |
/auto_mode?mode=[on|off] |
GET | Changes the auto mode to on or off and then returns the current auto mode state (on, off or na if auto mode is not supported) |
/auto_mode |
POST | Changes the auto mode to value of accompanying data <next_mode>) |
/scary_actions |
GET | Returns list of IDs of scary actions supported by the local host |
/scary_actions/<scary_action_id> |
POST | Executes scary action <scary_action_id> on local host |
/scary_hosts |
GET | Returns list of IDs of remote hosts (=exhibits) that can be addressed via local host |
/scary_hosts/<scary_host_id>/scary_actions |
GET | Returns list of IDs of scary actions supported by the remote host /<scary_host_id> |
/scary_hosts/<scary_host_id>/scary_actions/<scary_action_id> |
POST | Executes scary action <scary_action_id> on remote host <scary_host_id> |