Using the Rest API to delete devices that have neither Access nor Password Manager nor A2A type set
search cancel

Using the Rest API to delete devices that have neither Access nor Password Manager nor A2A type set

book

Article ID: 259740

calendar_today

Updated On:

Products

CA Privileged Access Manager (PAM)

Issue/Introduction

Your production cluster has over 155k device entries that have none of the three device types set. You get this list from the Devices > Manage Devices page when filtering on column Device Type with value Not Configured. You want to remove these devices. Your understanding is that this can be accomplished using Rest API calls and you are looking for a sample script that demonstrates the Rest API calls you should be using for this purpose.

Resolution

Attached is a sample UNIX/Linux shell script that finds devices with all types set to false ("f"), and in a second run deletes those devices using Rest API calls.

Attachments

1676069795665__delete_no_type_devices.sh.txt get_app