Page 1 of 1
API Start and Stop Nodes broken?
Posted: Sat May 01, 2021 11:40 am
by G0ldzilla
Does anyone know if the API for starting and stopping nodes is broken? I've tried a few nodes on a few labs, this is just an example of the call..
curl -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json'
http://127.0.0.1/api/labs/Kevin/VyOS%20 ... s/20/start
response is fine
{"code":200,"status":"success","message":"Node started (80049)."}
but nothing happens. even stopping nodes is the same (if I manually start it in the GUI)
Re: API Start and Stop Nodes broken?
Posted: Wed Jan 12, 2022 9:13 am
by ArneO
Hi, old post but have you been able to resolve this?
I may start one node in a lab, but not stop any.
Example:
Code: Select all
arne@:~$ curl -k -s -b /tmp/cookie -c /tmp/cookie -X POST -d '{"username":"admin","password":"xxx"}' https://127.0.0.1/api/auth/login | json_pp -json_opt pretty,canonical
{
"code" : 200,
"message" : "User logged in (90013).",
"status" : "success"
}
arne@:~$ curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/automated/evpn_enkel.unl/nodes/start | json_pp -json_opt pretty,canonical
{
"code" : 400,
"message" : "Request not valid (60027).",
"status" : "fail"
}
arne@:~$ curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/automated/evpn_enkel.unl/nodes/10/start | json_pp -json_opt pretty,canonical
{
"code" : 200,
"message" : "Node started (80049).",
"status" : "success"
}
arne@:~$ curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/automated/evpn_enkel.unl/nodes/10/stop | json_pp -json_opt pretty,canonical
{
"code" : 400,
"message" : "Request not valid (60027).",
"status" : "fail"
}
arne@:~$ curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/automated/evpn_enkel.unl/nodes/stop | json_pp -json_opt pretty,canonical
{
"code" : 200,
"message" : "Nodes stopped (80050).",
"status" : "success"
}
Regards
Arne