put request for connectNode() /interfaces RestAPI
Posted: Mon Mar 25, 2019 3:42 pm
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
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