KSC Open API
Kaspersky Security Center API description
HostGroup::RemoveHosts ( array  pHostNames,
boolean  bForceDestroy 
)

Removes the multiple hosts.

When you use this function, consider the bForceDestroy flag. If the bForceDestroy is true, then the host records are deleted. If the bForceDestroy is false, the host records will be deleted only for the hosts located in the group "Unassigned computers" or its subgroups. Other hosts will be moved to the appropriate subgroups of the group "Unassigned computers".

Parameters:
pHostNames(array) array of the host names.
bForceDestroy(boolean) true if it is necessary to force deleting hosts records.

See also how to use the KlAkOAPI Python package:

            server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
            oHostGroup = KlAkOAPI.HostGroup.KlAkHostGroup(server)
            # fill array with host names
            oHosts2Delete = [...]
            # delete host records
            oHostGroup.RemoveHosts(oHosts2Delete, False)