Forum Discussion

MartinO's avatar
MartinO
Icon for Contributor rankContributor
4 months ago

CPU utilisation data in bulk from API

How can I get server device CPU or Memory utilisation data from the API in bulk. I can get this from individual servers by specifying the device_id (i.e. /api/device/<device_id>/performance_data/838/...
  • EricChambers's avatar
    4 months ago

    Hi Martin,

    This is the correct way to get the data, the RestAPI does not have a faster method. What I've seen before is that this use case to have the devices that you want to get the data from in a Device Group. There is a Device Group API (/api/device_group/guid) that provides the Device ID's, it lists out the first part of the URI:

    So your code can get that list and loop through them to get the /performance_data/838/data?duration=24h part.