logicmonitor_sdk ... what do I do with api responses (getDeviceList)
https://www.logicmonitor.com/support-files/rest-api-developers-guide/sdks/docs/#api-LM-getDeviceList
I'm new to using the logicmonitor_sdk so forgive me for this newbie question. I usually find the LM API and SDK documentation I see to be a bit simple, or maybe I'm just not up to the level I'm expected to be. :)/emoticons/smile@2x.png 2x" title=":)" width="20" />
So I can successfully create a filter to call getDeviceList and I get an api response and I can print it out, just like the example, basically. And I can see when I print the response that its basically json.
But when I import the json library and try to interact with the response, I get an error "JSON object must be str, bytes or bytearray, not DevicePaginationResponse".
api_response = api_instance.get_device_list(fields=fields, filter=filter)
What I want to ask is, where is the documentation to tell me what comes back from these logicmonitor_sdk calls?
Literally NONE of the api docs on the link above that I spot checked had an example of how to interact with response. At least that I saw.
Help? :)/emoticons/smile@2x.png 2x" title=":)" width="20" />
Thanks!
- Anonymous3 years ago
Try this: https://www.logicmonitor.com/support-files/rest-api-developers-guide/sdks/docs/
The SDK returns a custom object, but you can use the .to_dict() method to convert it into a dictionary. No JSON involved.