How to use API calls to remove a device from UIM

Document ID : KB000107941
Last Modified Date : 26/07/2018
Show Technical Document Details
Introduction:
We are looking for API to remove the devices from UIM, right now it has to be deleted manually from Admin Console, net connect and UMP (Inventory) which we want to automate through API.

What are the API commands needed to remove a device from monitoring?
 
Environment:
UIM 9.0 and earlier
UMP 9.0 and earlier.
 
Instructions:
There is no single API call to remove a system from UIM currently.
Please make sure you have installed the webservices_rest probe to your UMP robot
as this will be required for the information I am providing below.

There are several factors that have to be taken into consideration:
1) does the target device have a robot on it?
2) has it been stopped and removed?
3) are there remote probes monitoring the device?
4) if so which ones?

NOTE: Support is generally not setup to help client build custom automation solution as you are requesting.
This usually would be refereed to our services department.



Information the API calls available are located here:
https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/probe-development-tools/restful-web-services

with the release of UIM 9.0 there will be a NEW UIMAPI release that is much easier to use that provide Swagger documentation and endpoints

if there was was a robot on the device that needs to be removed the following steps need to be followed
1) deactivate and uninstall the robot
2) from the hub remove the robot from the hub robots.sds file.
you will need to use the Callback on the robot hub can call the removerobot PU call back

To remove the device from inventory you will need the cs_key from the cm_computer_system table.
You can use the computer_system calls to get this information.

you will then need to use the discovery_server call back to remove master device by cs_key
there is a KB article on how to do this manually.
https://comm.support.ca.com/kb/how-to-reset-discovery-in-ca-uim-810-or-later/kb000009544

NOTE:see the section on deleting an individual system

if you have remote probes such as net_connect or rsp you will need to run a probe call.
you could use the callback or callback2 function
or the Delete a Probe Configuration function.

please review the calls to see which will best meat your needs.