In this exercise, we will learn how to delete objects by UUID.
First, we need to create some Pre-Shared Keys.
Update main.py with your Mist API Token and Mist Site UUID, then inspect psks.csv; this defines the set of WLAN Pre-Shared Keys that will be created. Update the CSV file with the desired PSK details:
| Name | SSID | Passphrase | VLAN ID | Client MAC |
|---|---|---|---|---|
| Name for the PSK | WLAN SSID this PSK should be applicable to | Passphrase for the PSK (8-63 characters) | VLAN for this PSK (optional) | Client MAC Address this PSK ties to (optional) |
Next, edit the exercise to perform the following additional operations:
Delete one single PSK by UUID (already done).
Delete remaining PSKs.
Hint: These can be bulk-deleted, rather than individually deleting by UUID.
We will be using the Mist “PSKs” API to delete the Pre-Shared Key:
| API Name | URL | Documentation |
|---|---|---|
| Delete PSK | /api/v1/sites/:site_id/psks/:psk_id | https://api.mist.com/api/v1/docs/Site#psk |
| Delete PSKs | /api/v1/sites/:site_id/psks | https://api.mist.com/api/v1/docs/Site#psk |