I am currently working on an ansible playbook for when we decommission a branch that will delete all of the equipment from a site and then remove the aforementioned site. I am struggling finding a good way to look up the site_id via the API as the delete site command requires the side_id, but I do not see a way to look up the site_id except by listing all sites. I've learned that looking up a device details with a serial number gives me a site_name, but then there is no way to search sites by site_name.
Is anyone aware of a way to look up the site_id without listing all sites?
Do you have example of URI do you are using ? for look on swagger ?
I appreciate your response, specifically, this is regarding: https://apigw-prod2.central.arubanetworks.com/swagger/central/#!/Site/sites_external_controller_delete_site
In order to pull the "site_id", I must first list all sites as it is not displayed in the UI of Aruba Central unless I am missing something. When we decommission a site, the automated process should disassociate all hardware from the site in Central, delete the site, and then also remove the site from it's configuration group.
As there is no immediately identifiable site_id listed in Central, we must start by finding the "site_id", and from what I've found in the API, it appears to only be identifiable in the list sites functions of the API.
Identification of each device when queried lists the "site_name" as "site", but does not list the "site_id." Ideally, i want to be able to query a mac address/serial of a device or the "site_name" and get a response back of which "site_id" each is associated.
For now, for our automation, after initial site creation, i'm updating the site name to include the site_id in the name.
At Aruba, we believe that the most dynamic customer experiences happen at the Edge. Our mission is to deliver innovative solutions that harness data at the Edge to drive powerful business outcomes.
© Copyright 2021 Hewlett Packard Enterprise Development LPAll Rights Reserved.