Use of API to log decom assets

Hello everyone,

I am trying to find a way to automate and pull states of machines using API. We have a group that decoms the assets and we remove them from Rapid7. However, for log purposes we would like to create the last known state of the machine before removal.

I have been able to create custom reports but wondered if there is a better way of performing this action. Thanks in advance for any feedback!

Instead of doing this manually have you checked out the retention settings on the console to reduce the amount of time you retain stale assets either via the scans or the agents?

Otherwise the API doesn’t specifically have a key for status or anything that is returned through the “GET Asset” endpoint. However it does have an array for scan history so you could see the last assessment date wether it was from a scan or an agent-import