Original Message:
Sent: Aug 22, 2024 03:09 AM
From: GorazdKikelj
Subject: Aruba Central API call to receive configured DNS or full running config.
I create a sample script for documenting Aruba Central configuration. It's available on github repository.
Currently it is oriented on APs but it's general enough to be easily modified for switches, gateways,...
Best, Gorazd
------------------------------
Gorazd Kikelj
MVP Guru 2024
Original Message:
Sent: Aug 22, 2024 03:06 AM
From: GorazdKikelj
Subject: Aruba Central API call to receive configured DNS or full running config.
The other option is to use troubleshooting commands under Troubleshooting.
Command Id 1110 is show ip dns.
Start troubleshooting session with
https://xxx.central.arubanetworks.com/troubleshooting/v1/devices/<serial>
In the response body you will receive session_id number like:
{ "hostname": "xxxx",
"message": "Successfully queued troubleshooting commands for session of device xxxx.",
"serial": "xxxxx",
"session_id": 50,
"status": "QUEUED" }
and get the result of the task via
https://xxx.central.arubanetworks.com/troubleshooting/v1/devices/xxxx?session_id=50
Result is json:
{ "hostname": "xxxx",
"message": "Successfully completed troubleshooting session 50 of device xxxxx",
"output": "\n
=== Troubleshooting session started. ===\n
\n
\n
===================================\n
Output Time: 2024-08-22 06:58:01 UTC\n
\n
COMMAND=show ip dns \n
\n
DNS Mode : Manual\n
\n
DNS Domain Names Configured:\n
---------------------------\n
\n
No. DNS Domain Name\n
--- ---------------\n
\n
\n
DNS Servers Configured:\n
----------------------\n
\n
Priority DNS Server Addresses OOBM \n
-------- --------------------------------------- ---- \n
1. xx.xx.xx.xx NO\n
2. xx.xx.xx.xx NO\n
\n
\n
\n
\n
=== Troubleshooting session completed ===\n",
"serial": "xxxx",
"status": "COMPLETED" }
------------------------------
Gorazd Kikelj
MVP Guru 2024
Original Message:
Sent: Aug 22, 2024 02:49 AM
From: GorazdKikelj
Subject: Aruba Central API call to receive configured DNS or full running config.
Hi Levi.
You can retreive last known running configuration from Aruba Central with the /v1/device/<serial>/configuration
https://xxx.central.arubanetworks.com/configuration/v1/devices/<serial>/configuration
Best, Gorazd
------------------------------
Gorazd Kikelj
MVP Guru 2024
Original Message:
Sent: Aug 21, 2024 07:11 AM
From: Levi Caers
Subject: Aruba Central API call to receive configured DNS or full running config.
HI
I've been playing around with the Aruba Central API and I'm trying to create a script that can get a list of all switches and then get all configured IP DNS servers. It seems those API do not exist? I've been looking for them in the API tester (Swagger) but the closest thing I'm finding is /configuration/v1/devices/{device_serial}/template_variables but it appears that it does not work for AOS-S devices as they return an empty result.
Anyone that had some experience with this or was able to create a workaround? A copy of the running config would also work.
Thanks!