I have seen many BF users inquire about the cleanup approach for stopped/expired actions. We implemented a python script some time ago to allow automatic cleanup/deletion of stopped/expired actions to ultimately allow the Bigfix Audit Trail Cleaner to perform it’s routine cleanup and include those now deleted actions within it’s cleanup. Here’s our approach at a high-level. Hope it helps others!
- Bigfix API Call to return stopped/expired actions
https://<ROOT Server>:52311/api/query?output=json&relevance=(id of it, name of it) of top level bes actions whose ("Open" != state of it)
- Parse/iterate through returned items (if any) and run the following API call to purge those actions
requests.delete('https://<ROOT Server>:52311/api/action/<Action ID>')