Hi,
I try to use ArubaCX 10.04 API for add a new interface vlan, i can add the interface but i get after 500 error when i try to check the interface (and the interface is not display when make a show run)
i using the following command : (based from API 10.04 Rest Guide : Page64)
curl -k -X POST \
-c /tmp/auth_cookie \
-H 'Content-Type: multipart/form-data' \
"https://10.76.157.98/rest/v10.04/login" \
-F username=admin -F password=mypassword
curl -k -X POST \
-b /tmp/auth_cookie -d '{
"name":"VLAN2",
"id":2,
"type":"static",
"admin":"up"}' \
"https://10.76.157.98/rest/v10.04/system/vlans"
There is 2 mistake for this part (on the doc):
curl -k -X POST \
-b /tmp/auth_cookie -d '{
"vrf": "/rest/v10.04/system/vrfs/default",
"type": "vlan",
"vlan_tag":"/rest/v10.04/system/vlans/2",
"name":"vlan2"}' \
-D- "https://10.76.157.98/rest/v10.04/system/interfaces"
wrong name (VLAN2 => vlan2) and missing type value
and after when look show run, don't display the interface vlan2...
and when try to get interface
curl -k -X GET \
-b /tmp/auth_cookie \
"https://10.76.157.98/rest/v10.04/system/interfaces/vlan2"
i get the a error 500 (Internal service Error)