Deleting multiple devices

Marjan Naumovski marjan_macka at yahoo.com
Fri Jan 29 09:20:33 EST 2016


Hi Sebastian,
Thank you for the help. That did the trick.
Best Regards,
Marjan
 

    On Wednesday, January 13, 2016 1:50 PM, h0rst <h0rst at localh0rst.de> wrote:
 

 Hi!
Afaik it is not possible using the webinterface. However you can use the API plus a little Bash-Scriptingto 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 communicatewith 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


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/20160129/31967a61/attachment.html>


More information about the Users mailing list