Get status of multiple devices

Using the REST API, is it possible to get the status of multiple devices on a single API call? For example if I want to get the switch status for 10 switches - can that be done with one call? I would like to load the status of many (or all of my devices but I don’t want to make 100+ calls to do that if possible

Hello @jwerfel,

The status of several devices cannot be retrieved in one call because you need to specify the device ID. However, a workaround for this case would be:

  1. Query the devices list and save the devices IDs in an array, list, etc.
  2. Loop through those values and make the requests for the status.

For the last part, I suggest you to use pagination or a loop offset because if several and continuous requests are sent to the API, you may run into some delays in the processing or unexpected behavior.

If this answers your question, can you mark it as Solved, please? If not, let me know what’s going on and we can dig in further

1 Like

That is disappointing there isn’t a way to pass multiple device IDs to get multiple device status results back. Making 100+ calls to get the current status of my devices feels very inefficient.

Could you explain more what you mean for using pagination or a loop offset? Do you mean simply not creating 100 threads and getting their status all at once?

She was just stating that you need to keep in my the request limits. You can use pagination to get groups of devices and query each one, the another group and query each of those. There is currently no way to get the status of all devices in one request, but it is something we are looking into.

Just wondering if there is an update or plan in the future to support retrieving the status of multiple devices at once? If I wanted to populate a dashboard it would take 100+ API calls which would be very inefficient.

Thank you,
Julian