Page 1 of 1

put request for connectNode() /interfaces RestAPI

Posted: Mon Mar 25, 2019 3:42 pm
by atar
Hi all,

what should be the structure of the put request to create a link between a node and a network ?

I tried {"interface_id":"0","network_id":"1"} but it didn't work.
{
"code": 400,
"status": "fail",
"message": "Cannot link node, invalid network_id (20033)."
}
I see the function in api.php [https://github.com/rmros/eve-ng/blob/ma ... i.php#L772], however not sure how to structure the json
....
"ethernet": [
{
"name": "Gi0/0",
"network_id": 0 -> this I want to change to 1 with a rest call
...
From the php in debugging mode i checked that it takes values {0,1} for 0 id interface and one for the network

Re: put request for connectNode() /interfaces RestAPI

Posted: Tue Mar 26, 2019 9:19 am
by atar
Ignore. I solved it .. values should be in string {"0":"1"}

"interface_id" : "network_id" . It would be good to document the PUT request in the eve-ng api documentation