I am relatively new to coding and am attempting to create a script in either Python or Powershell that will retrieve the Hostnames and IP address's of Machines in Trend Micro deep security 12 with an agent status of "critical" as well as the last communications date. Can anyone point me to some sample code or an SDK that could help me get started down the right road. All of the SDK's I have seen so far pull all machines and their agent status.

1

There are 1 best solutions below

0
On

The Search Computers API does not support searching based on ComputerStatus: https://automation.deepsecurity.trendmicro.com/article/12_0/api-reference/#operation/searchComputers so you would have to retrieve all computers and check the status locally, regardless of which SDK you use for the API. You can make the retrieval faster by using the "expand" parameter set to only include the sections of information you need, ie. only the computerStatus info and basic info.

P.S. I work for Trend Micro in R&D