Rushit Ajudiya (Customer) asked a question.

How to fetch all the devices from my networks tab using WhatsUp Gold REST API?

Hi Team,

 

We are currently fetching devices using the following WhatsUp Gold REST API endpoint: /api/v1/device-groups/-2/devices/-/config/template

 

We understand that the device group ID -2 is intended to fetch all devices. Initially, this endpoint returned all devices as expected. However, we have recently observed that device group -2 is no longer returning all devices across all device groups.

 

Could you please help us understand why this is happening and advise on the correct approach to fetch all devices from the Networks tab using the WhatsUp Gold REST API?

 

Thank you for your support.


  • Mike Rockwell (Progress Software)

    I'm not sure why it would have stopped working with device group ID -2. I just tested on my system running the current version of WhatsUp Gold, v25.0.2 Build 2804, and it worked fine. You could try device group ID of 2 which should be the ID for the All Devices Dynamic group.

  • Rushit Ajudiya (Customer)

    Hi @Mike Rockwell (Progress Software)​ Can we hardcode the device group value as -2 or 2 to fetch all the devices from the WhatsUp Gold?

    • Mike Rockwell (Progress Software)

      Are you writing a script to pull them? Then yes, write it in your code. If you are using the Swagger, no, you will have to type it in every time.

  • Rushit Ajudiya (Customer)

    Thanks @Mike Rockwell (Progress Software)​ For the quick answer. I tried fetching all the groups by using /api/v1/device-groups/- API endpoint, but the All Devices Dynamic group is not present in the API response. Is this possible?

     

    Additionally, Can a device be present in multiple groups at same time?

    • Mike Rockwell (Progress Software)

      Go into the web interface and select a group. Look on the address bar and you will see '.....groupId"%3A2%2C"...' take off the %3A and %2C and what is in between is the group ID. Someone may have deleted the defaul all devices group then added it back, which would have changed the group ID.

  • Rushit Ajudiya (Customer)

    Hi @Jason Alberino (Progress Software Company)​ we are getting 0 devices in the -1 group. However, we are getting all the devices in the -2 and 2 device groups.

     

    @Jason Alberino (Progress Software Company) for Get-WUGDevice​, what does this mean and if the -1 group id is to fetch all the devices than why it is not working in our case?