-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Hi 👋
Problem:
The page that lists available API endpoints is currently not working. This makes it hard to understand or use the API without digging through the source code. A working route overview or minimal documentation would be very helpful.
Feature Request:
Please consider adding a new endpoint that allows sending multiple console commands in a single request, instead of just one.
Currently, this endpoint exists:
server.addRoute(NanoHTTPD.Method.POST, "/v1/server/exec", serverAPI::execCommand);
Logger.debug("Registered POST /v1/server/exec");
with this implementation:
public NanoHTTPD.Response execCommand(final Map<String, String> params) {
String command = params.get("command");
...
}
Suggested improvement: allow a JSON array of commands like so:
POST /v1/server/exec-multiple
Body (application/json):
{
"commands": [
"say Hello world",
"time set day",
"weather clear"
]
}
Each command would be executed sequentially.
This would make automation and integration much easier.
Thanks for your time and for maintaining this project 🙌