Hi Conor,
1) To rename an AP through API, in the API reference go to configuration and choose devices.
- Add IAP to the template group. (POST /configuration/v1/devices/move)
In case you do not have a template group, create one (POST /configuration/v1/groups)
- Then you could manage the devices in the template group from templates and variables. You have a variable called "_sys_hostname" which can be used to rename the device. You could achieve all this with API.
http://help.central.arubanetworks.com/latest/documentation/online_help/content/public_cloud/applications/global_settings/groups/variables.htm
2. To create site and add devices to site, in API reference page, choose Monitoring -> Sites.
- Create a site (POST /central/v2/sites)
- Use the API endpoint under labels to add device to the site (POST /central/v1/labels/associations).
In the payload, provide the site id value to "label_id"
{
"device_id": "AD12412345",
"device_type": "IAP",
"label_id": <site-id>
}
In order to obtain the site_id you could make list sites API call or while creating the site, the site id will be present in the response message. Attached screen shots in this reply message for your reference.
Thanks,
Karthik
Technical Marketing Engineer
Aruba HPE