Creating a device group structure
Hi all,
I'm quite new to LM and trying to learn how the api can help me automate tasks.
The big question i'm running into right now is: how do i create a folder structure (device group structure)?
I'm currently trying to do this using Python and the api.
I have a structure in mind that looks like this
Department
Client
project
acc (8x5)
prod (24x7)
project2
acc (8x5)
prod (24x7)
etc
hope someone can help me out.
There is an official LogicMonitor python SDK at https://www.logicmonitor.com/support/rest-api-developers-guide/logicmonitor-sdks and its documentation is at https://www.logicmonitor.com/support-files/rest-api-developers-guide/sdks/docs/#api-LM-addDeviceGroup. I don't really use python myself and I've never used it so I can't really provide more details there myself. I would start there.
If you want to look at the more generic API calls, they are documented at https://www.logicmonitor.com/swagger-ui-master/dist/ and the one to create folders (LM calls them Groups) is /device/groups/ for resources and /website/groups/ for websites. I find the Swagger documentation good for knowing what is available but very lacking in parameters and examples but they are better documented with the older v1 documentation (Swagger is v2) at https://www.logicmonitor.com/support/rest-api-developers-guide/v1/devices/about-the-device-resource (see tree on the left).