Works really good, thanks.
Original Message:
Sent: Dec 11, 2020 12:57 PM
From: Jay Pathak
Subject: Aruba IAP 8.6.0.x Rest API / SSID
Yes, sure. To delete anything on AOS8 via API, you need to use the POST method itself. The way it works is using a key "_action" and its value "delete".
You need to add "_action": "delete" wherever required. For deleting the entire profile, usually it goes with the "profile-name" key n the JSON payload. For more information checkout the Aruba Developer Hub.
You can find some examples on different type of actions and their respective JSON payloads here.
Thanks,
Jay
------------------------------
Jay Pathak
Original Message:
Sent: Dec 11, 2020 09:38 AM
From: Salih Zett
Subject: Aruba IAP 8.6.0.x Rest API / SSID
Awesome. it worked.
Any idea how I can delete a profile? Didn't find anything in the documentation about.
------------------------------
Salih Zett
Original Message:
Sent: Dec 08, 2020 12:30 PM
From: Jay Pathak
Subject: Aruba IAP 8.6.0.x Rest API / SSID
Hello,
I see an error in your cURL usage. If you specify "-d" and your Content-Type is "application/json" then you need to pass a json string and not a file.
If you would like to pass a json file you need to add "@" before the filename, eg: @myjsonfile.json.
Let me know if that works out for you.
Thanks,
Jay
------------------------------
Jay Pathak
Original Message:
Sent: Nov 26, 2020 11:55 AM
From: Salih Zett
Subject: Aruba IAP 8.6.0.x Rest API / SSID
Hey guys,
I am testing the API functionality with Aruba IAP 325,
I have one master and 5 slaves.
I already enabled API with allow-rest-api,
and I can also login with
curl "https://IP:4343/rest/login" -H "Content-Type: application/json" --data '{"user": "user", "passwd": "password"}' -k
and get success a response.
Now, I would use an SSID profile.
Regarding the documentation Aruba IAP 8.6.0.x there is one ssid example.
I tried to use this, but nothing happens.
When I use:
curl "https://IP:4343/rest/ssid?sid=SID" -H "Content-Type: application/json" --data ssid.json -k
I receive:
{
"Status-code": 3,
"message": "Failed to parse JSON input for /rest/ssid"
}
When I use
curl "https://IP:4343/rest/ssid?sid=SID" -H "Content-Type: application/json" --data ssid.json -
insecure
I receive nothing.
-k or -insecure , according to macOS CLI curl man both skip the cert check.
Actually, I would think, this is good, but it isn't.
When I log in to Aruba IAP, there is no additional SSID network.
What is wrong?
Here the ssid.json code, which is a copy from the documentation:
{
"ssid-profile" :
{
"action" : "create",
"ssid-profile" : "AA-Cabin123",
"essid":
{
"action" : "create",
"value" : "AA-Cabin123"
},
"type": "employee",
"opmode" : "wpa2-psk-aes",
"wpa-passphrase": "abcefgg@123",
"vlan":
{
"action" : "create",
"value" : "30"
},
"rf-band": "5.0",
"enable": "yes",
"dtim-period":
{
"action" : "create",
"value" : 1
},
"broadcast-filter":
{
"action" : "create",
"value" : "arp"
},
"g-min-tx-rate": "1",
"a-min-tx-rate": "6",
"a-basic-rates":
{
"action" : "create",
"value" : "6,9"
},
"g-basic-rates":
{
"action" : "create",
"value" : "11"
},
"dmo-channel-utilization-threshold": 90,
"local-probe-req-thresh": 0,
"max-clients-threshold": 64,
"dot11k": "enable",
"dot11r": "enable",
"dot11v": "enable",
"mdid" :
{
"action" : "create",
"value" : 65535
},
"auth-server" :
{
"action" : "create",
"value" : "auth_server"
},
"deny-inter-user-bridging" : "enable",
"deny-local-routing" : "enable",
"max-authentication-failures" : 0
}
}