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.
API Script to start all nodes , eve ng pro
Moderator: mike
-
- Posts: 59
- Joined: Wed Feb 12, 2020 7:43 am
- Location: UK
- Contact:
-
- Posts: 1
- Joined: Sat Apr 11, 2020 5:09 am
Re: API Script to start all nodes , eve ng pro
Hello. Did you search a decision your problem?