Removal of Multiple computers via REST API

Hi Team,

Can we remove multiple computers from Bigfix by using its computer ids ?
I want to use REST API Request for this.
DELETE computer/{computer id} .

Note : I know it works for one computer can it be done for Multiple computers.

See https://developer.bigfix.com/rest-api/api/computer.html but yes its only a single computer ID at a time as of now

I have checked the Curl action in Bigfix.me which says computer ids which we put in “;” can be removed.

concatenations “;” of (“curl -k -X DELETE --user userName https://rootServer:52311/api/computer/” & it) of (it as string) of unique values of ids of bes computers whose(now - last report time of it > 10 * day)

Reference Link :—
https://bigfix.me/search/~last%20report%20time~

The Bigfix.me item is session relevance that is looking for computer ID’s that are older than 10 days and concatenating the curl command in from of each result so not really a reusable action. If you are looking for a method to remove machines older than a specific number of days, there are options, depending on the version you are using. In 9.5 you can use BESAdmin to schedule the deletion of computer old computers.

The Schedule Now option is not usable if we are passing the text with the list of servers.
Either can we get the latest executable for Removal.

There are command line options that may help you. https://www.ibm.com/support/knowledgecenter/SSQL82_9.5.0/com.ibm.bigfix.doc/Platform/Installation/c_additional_besadmin_onwindows.html#c_additional_besadmin_onwindows

.\BESAdmin.exe /removecomputers /run [ /deleteexpiredcomputers= ]
[ /removeDeletedComputers= ] [ /removeDeletedUploads ]
[ /eraseUploadFilesForRemovedComputers ]
[ /purgedeletedcomputers= [ /batchsize= ] ]
[ /deleteduplicatedcomputers [ /duplicatedpropertyname= ] ]
[ /removecomputersfile=<path> ] [ /hideUI ]

2 Likes

The issue is we have multiple computers with same name. Example : 5 machines with same name but 2 active. 3 are shutdown , so computer id is helpful in this case .
as parsing the text file will remove all entries.
The Machine names are same as they are on AWS.

Please suggest if any one has better solution on this.

Question : Can we parse individual computer id to the API recursively. Like parsing each line of text (text file will have computer id ) to the delete computerid ?