Deleting multiple devices

h0rst h0rst at localh0rst.de
Wed Jan 13 07:50:16 EST 2016


Hi! 

Afaik it is not possible using the webinterface. However you can use the API plus a little Bash-Scripting 
to do this. You can get all IDs of devices matching a product Class by using the following query: 

# /devices?projection=_id&query={"summary.productClass":"FRITZ!Box"} 
curl -i 'http://localhost:7557/devices?projection=_id&query=%7B%22summary.productClass%22%3A%22FRITZ!Box%22%7D' 

To delete a specific device, you can use the following query: 

# /devices/DEVICE_ID 
curl -i 'http://localhost:7557/devices/DEVICE_ID' -X DELETE 

To do this kind of stuff, it can be annoying sometimes. Thats why i wrote a Perl-Module to communicate 
with the API. You could find it at (sorry for promoting that here) https://github.com/localh0rst/GenieACS-Perl 

However, it might be a little too oversized for doing it only one time since it has a lot of requierements (moose/etc), 
and is not written very well (i'm an admin, not a programmer). 

Kinde regards, 

Sebastian 



----- Original Message -----

From: "Marjan Naumovski" <marjan_macka at yahoo.com> 
To: users at lists.genieacs.com 
Sent: Wednesday, January 13, 2016 10:22:14 AM 
Subject: Deleting multiple devices 

Hi, everyone 

How can I delete multiple devices? For example delete devices based on product class. 


Best regards 


_______________________________________________ 
Users mailing list 
Users at lists.genieacs.com 
http://lists.genieacs.com/mailman/listinfo/users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20160113/391d319c/attachment.html>


More information about the Users mailing list