
Rushit Ajudiya (Customer) asked a question.
GET "/api/v1/device-groups/<group_id>/devices/-/config/template?limit=50&options=simple" returns 0 devices even though WhatsUp Gold instance has 1500+ devices across different groups
I want to list all the devices with the WhatsUp Gold REST API. The instance has 1500+ devices across many groups, but for a given group:
- GET /api/v1/device-groups/<group_id>/devices/-/config/template?limit=50&options=simple
returns HTTP 200 with an empty data.templates (0 devices). I've tried this for the group IDs returned by GET /api/v1/device-groups/- and get 0 for all of them. What could be the reason behind this, can you please help me to resolve this?
Thanks!
Do you want a list of devices or do you want the template for all devices which will show tons of details about the device?
If you want just a list of devices use ....:9644/api/v1/device-groups/0/devices?view=basic
Hi @Mike Rockwell (Progress Software) I retrieved all groups using the /api/v1/device-groups/- endpoint and found 7 groups with IDs: 2, 58, 3, 398, 396, 427, and 0. I then called GET /api/v1/device-groups/<group_id>/devices/-/config/template?limit=50&options=simple for each group ID, but I'm getting the following response:
In the WhatsUp Gold UI, I am seeing around 1500 devices. What could be the reason for this behaviour?
just try this
GET /api/v1/device-groups/<group_id>/devices/-/config/template?limit=50
Hi @Mike Rockwell (Progress Software) I tried by using this API endpoint but still I am getting 0 devices. I have also checked the IDs from /api/v1/device-groups/- endpoint and used GET /api/v1/device-groups/<group_id>/devices/-/config/template?limit=50&options=simple endpoint to fetch devices but still getting below response of 0 devices.
What group are you using? GroupID of 0 (zero) is the My Network, but if you don't have any devices in that group ... GroupID 2 is the All Devices Dynamic group, unless you deleted it.