AnsweredAssumed Answered

Purge Assets API Call

Question asked by Kevin Trojak on Mar 26, 2019

Hi everyone,

I am attempting to create an API call that will automate our purging process. We manually run an asset search with the parameters in this image: 

We then purge the results, and repeat with a few different networks in addition to "Global Default Network".

I got some help from Busby as he created the below PowerShell script:

And then a call like: 

PurgeTest.ps1 -userid xxxx -password xxxx -notscanneddays 14 -ipaddress_or_cidr xxxx -verbose

 

Are there issues with the script/better, simpler ways to do it? I get an error with the IP address not being able to be converted to int32...do I even need to list an IP if I am searching all anyways?

 

Thank you all! This will be a big time saver for my org and once this gets cleaned up we will look at options to run automatically on a set schedule.

Outcomes