From c6020f2ad186954d6c083d000f282f58b44017f1 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Fri, 24 May 2019 10:48:46 +0200 Subject: #915 add POST shell/output command to REST API in ogAdmServer Fetching result from run command on client (through GET method): curl -X POST http://127.0.0.1:8888/shell/output -d @post_shell_output.json Request POST /shell/output {"clients": [ "192.168.2.1" ] } Reply: 200 OK {"clients": [ { "addr" : "192.168.2.1", "output" : "..." } ] } --- tests/post_shell_output.json | 1 + tests/run-tests.sh | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/post_shell_output.json (limited to 'tests') diff --git a/tests/post_shell_output.json b/tests/post_shell_output.json new file mode 100644 index 0000000..1badfed --- /dev/null +++ b/tests/post_shell_output.json @@ -0,0 +1 @@ +{ "clients" : [ "192.168.2.1", "192.168.2.2" ]} diff --git a/tests/run-tests.sh b/tests/run-tests.sh index f9f49ba..b5239d5 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -2,3 +2,4 @@ curl -X POST http://127.0.0.1:8888/clients -d @post_clients.json curl -X GET http://127.0.0.1:8888/clients curl -X POST http://127.0.0.1:8888/wol -d @wol.json curl -X POST http://127.0.0.1:8888/shell/run -d @post_shell_run.json +curl -X POST http://127.0.0.1:8888/shell/output -d @post_shell_output.json -- cgit v1.2.3-18-g5258