Commit Graph

9 Commits (1e6c8892565ac2c0a9578cc2dc8edf3128eb1355)

Author SHA1 Message Date
OpenGnSys Support Team 1e6c889256 #915 add POST stop command to REST API in ogAdmServer
Stop the menu selection on client (through POST method):

curl -X POST http://127.0.0.1:8888/stop -d @stop.json

Request
	POST /stop
	{"clients": [ "192.168.2.1" ] }
Reply:
	200 OK
2019-05-30 15:32:22 +02:00
OpenGnSys Support Team 5f0191d73f #915 add POST reboot command to REST API in ogAdmServer
Reboot a client (through POST method):

        curl -X POST http://127.0.0.1:8888/reboot -d @reboot.json

Request
        POST /reboot
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-30 15:32:18 +02:00
OpenGnSys Support Team 23fed47639 #915 add POST poweroff command to REST API in ogAdmServer
Power off a client (through POST method):

        curl -X POST http://127.0.0.1:8888/poweroff -d @poweroff.json

Request
        POST /poweroff
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-30 15:32:01 +02:00
OpenGnSys Support Team 7ab5f0cbfb #915 add POST session command to REST API in ogAdmServer
Start a session on client (through POST method):

        curl -X POST http://127.0.0.1:8888/session -d @session.json

Request
        POST /session
        {"clients": [ "192.168.2.1" ] }
Reply:
        200 OK
2019-05-27 13:03:05 +02:00
OpenGnSys Support Team c6020f2ad1 #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" : "..." } ] }
2019-05-27 13:03:00 +02:00
OpenGnSys Support Team 7e4e5b5e08 #915 add run command to REST API in ogAdmServer
Run command on client (through POST method):

	curl -X POST http://127.0.0.1:8888/shell/run -d @post_run.json

Request
	POST /shell/run
	{"clients": [ "192.168.2.1", "192.168.2.2" ], "run" : "ls" }
Reply:
	200 OK
2019-05-27 13:02:57 +02:00
OpenGnSys Support Team 5797e0b199 #915 add wol command to REST API in ogAdmServer
Send Wake-On-Lan to clients (through POST method):

Request:
	curl -X POST http://127.0.0.1:8888/wol
	{ "type" : "unicast", "clients" : [ { "addr" : "192.168.2.1", "mac" : "00AABBCCDD01" } ] }
Reply:
	200 OK
2019-05-27 13:02:52 +02:00
OpenGnSys Support Team 7b6fcdbc62 #915 add clients command to REST API in ogAdmServer
Request for existing clients:

	curl -X GET http://127.0.0.1:8888/clients

Request:
	GET /clients
Reply:
	200 OK
	{"clients": [ { "addr" : "192.168.2.1", "state" : "OPG" }, { "addr" : "192.168.2.2", "state" : "OFF" }]}
2019-05-27 13:02:45 +02:00
OpenGnSys Support Team 95e6520c4f #915 add initial REST API for ogAdmServer
Add REST API for ogAdmServer, this API is exposed through port 8888 on
the system that runs the ogAdmServer. The body of the HTTP message is
expressed in JSON format.

This patch implements the command "clients" that maps to the existing
legacy "Sondeo" command, that is used by the web interface to poll
refresh the client state.

This patch also includes an initial test infrastructure using 'curl' to
send commands to the new REST API.

Request:
	POST /clients
	{"clients" : [ "192.168.2.1", "192.168.2.2" ]}
Reply:
	200 OK

This allows to refresh the status of the list of clients.
2019-05-27 13:02:37 +02:00