VMware Workspace ONE Community
callegrafi
Enthusiast
Enthusiast

API to device wipe all ipads in a certain OG

Hello everybody,

I'm an API noob 😋 Is there a way to do a device wipe of all devices in a certain OG?

 

Thanks in advance,

Carl

Labels (1)
0 Kudos
5 Replies
gmanjohal
Enthusiast
Enthusiast

Hey, there absolutely will be, best advice is to check out the APII's available for your environment, visit; https://airwatch.xxxx.com/api/help/#!/apis (where xxxx=your instance/DNS name). 

Be careful as you can initiate API commands via the GUI once you setup the API account, so carefully read through the documentation on the site. Select the API tab and search for whichever API you're after. 

0 Kudos
callegrafi
Enthusiast
Enthusiast

Hi there 🙂

Thanks for the reply.. We have looked through the APIs but can't find any that wipe in a certain OG 😕

0 Kudos
gmanjohal
Enthusiast
Enthusiast

Hey, I'll take your word for it 😛 

I think the other option would be to just export the list of devices you want to delete via a report (device inventory then filter by OG), then use the POST /devices/bulk API to delete them. You can add in the device attribute i.e. serial-number or device ID using the data from the report you export, then input the bulk parameters. I've done this in the past and use the serial number attribute. You also will need to adjust any limitations you have in place for bulk deletions/bulk wipes whilst using the API otherwise it will fail, Bulk Management & Managed Device Wipe Protection are the settings i think. 

 

0 Kudos
cloudmaster2017
Enthusiast
Enthusiast

GitHub - MrTechGadget/aw-bulkdevices-script: A group of scripts which are used to bulk manage AirWat...

 

This script will do it.  Just have to create a CSV file, now your OG number, and the name of the server.  

It works good.  

 

Good luck and test and be sure you want to delete that many........

callegrafi
Enthusiast
Enthusiast

Sorry for the late reply.. Thank you very much for linking to the script!!! 😊

0 Kudos