-
Notifications
You must be signed in to change notification settings - Fork 23
[Web service] simple app command execution API
Houzuo Guo edited this page Oct 14, 2020
·
4 revisions
Hosted by laitos web server, the web service offers
a simplified interface for generic HTTP clients (e.g. command line curl
) to execute app commands.
- Under JSON key
HTTPHandlers
, write a string property calledAppCommandEndpoint
, value being the URL location of the web service. Keep the location a secret to yourself and make it difficult to guess. - Follow command processor to construct configuration for
JSON key
HTTPFilters
.
Here is an example:
{ ... "HTTPHandlers": { ... "AppCommandEndpoint": "/very-secret-app-command-endpoint", ... }, ... }
The web service is hosted by web server, therefore remember to run web server.
Use a web browser or generic HTTP client such as curl
to contact the web service:
curl -X POST 'https://laitos-server.example.com/very-secret-app-command-endpoint' -F 'cmd=PasswordPIN.s echo hello'
curl -X GET 'https://laitos-server.example.com/very-secret-app-command-endpoint?cmd=PasswordPIN.s+echo+hello'
The web service accepts app command from both form submission (-F
) and query parameter. The HTTP response comes in plain text (text/plain
), and it
is subjected to the text linting rules defined in laitos configuration HTTPFilters
.
- Make the URL location secure and hard to guess, it helps to secure this web service beyond password protection!
Table of Contents
- Home
- Get started
- Component list
- Tips for running on public cloud
- Tips for using apps over satellite
- laitos terminal
Daemon Components
- DNS server
- Mail server
- Web server
- Web proxy server
- Telnet server
- Telegram chat-bot
- Simple IP services server
- SNMP server
- System maintenance
- Phone home telemetry
Web Service Components
- Twilio telephone/SMS hook
- Microsoft chat bot hook
- The Things Network LORA tracker integration
- Recurring commands
- App command form
- Simple app command execution API
- GitLab browser
- Temporary file storage
- Simple web proxy
- Desktop on a page (virtual machine)
- Read telemetry records
- Program health report
- System process explorer
- Prometheus metrics exporter
- HTTP request inspector
- HTTP request logger
Apps