Last change
on this file since 1a8ada1 was
1a8ada1,
checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago
|
#915: Add POST /image/create command to REST API in ogAdmServer
This patch implements the command "image/create" that creates an image
in a client.
Request:
POST /image/create
{ "clients" : [ "192.168.2.1" ], "disk" : "1", "partition" : "1", "code" : "1", "id" : "1", "name" : "test", "repository" : "192.168.2.2" }
Reply:
200 OK
|
-
Property mode set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | API_KEY="07b3bfe728954619b58f0107ad73acc1" |
---|
2 | |
---|
3 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/clients -d @post_clients.json |
---|
4 | curl -X GET -H "Authorization: $API_KEY" http://127.0.0.1:8888/clients |
---|
5 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/wol -d @wol.json |
---|
6 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/shell/run -d @post_shell_run.json |
---|
7 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/shell/output -d @post_shell_output.json |
---|
8 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/session -d @session.json |
---|
9 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/poweroff -d @poweroff.json |
---|
10 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/reboot -d @reboot.json |
---|
11 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/stop -d @stop.json |
---|
12 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/refresh -d @refresh.json |
---|
13 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/hardware -d @post_clients.json |
---|
14 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/software -d @post_clients.json |
---|
15 | curl -X POST -H "Authorization: $API_KEY" http://127.0.0.1:8888/image/create -d @create_image.json |
---|
Note: See
TracBrowser
for help on using the repository browser.