Thank you for your message.
To export a list of the devices configured, you can use the following API call:
Please, replace the information according to your configuration. You will find your passhash in Setup > Account Settings > My Account ("/myaccount.htm?tabid=1") by clicking on the corresponding button.
You can also generate a list with the XML format by using table.csv in the request above.
Here are the other information you can get as well:
Finally, I just want to notice that it's not possible to get the entire hierarchy of the device. The information returned by Group is only the name of the parent group, parent_id also return the id of the parent group (not above).