Page 1 of 1

API Script to start all nodes , eve ng pro

Posted: Wed Mar 30, 2022 9:34 pm
by kiteboy
I feel like I'm very very close to getting this working, what I want to do is start ALL nodes in a lab.


root@eve-ng:~# curl -k -s -b /tmp/cookie -c /tmp/cookie -X POST -d '{"username":"admin","password":"eve"}' https://127.0.0.1/api/auth/login | json_pp -json_opt pretty,canonical
{
"code" : 200,
"message" : "User logged in (90013).",
"status" : "success"
}

root@eve-ng:~# curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/VPNs.unl/nodes/start | json_pp -json_opt pretty,canonical
{
"code" : 400,
"message" : "Request not valid (60027).",
"status" : "fail"
}
root@eve-ng:~#


root@eve-ng:~# curl -k -s -c /tmp/cookie -b /tmp/cookie -X GET -H 'Content-type: application/json' https://127.0.0.1/api/labs/VPNs.unl/nodes/2/start | json_pp -json_opt pretty,canonical
{
"code" : 200,
"message" : "Node started (80049).",
"status" : "success"
}
root@eve-ng:~#

From the middle entry we can see that I get a fail with /nodes/start but this is the recommended syntax in the documentation. i have tried /nodes/*/start out of ideas now.

Re: API Script to start all nodes , eve ng pro

Posted: Wed Nov 02, 2022 12:50 pm
by sergo85
Hello. Did you search a decision your problem?