Automic Workload Automation

API - Delete open object

  • 1.  API - Delete open object

    Posted 06-04-2018 06:11 AM

    Hello,

     

    I am trying to write a process that will remove unwanted agents and objects from clients using the API.

     

    I have written the logic that will, given an agent name passed in:

     

    • find all the attached/associated clients
    • look for a folder similar to the agent name in the client
    • delete all the objects in that folder
    • delete the folder
    • delete the agent once all client iterations have taken place

     

    If any of the objects are open when we try and delete them the process complains.  Is there a way we can see if the object is open, close if it is and then continue with the delete?

     

    If this process deems the objects and agents need deleting then ideally any jobs that are open/active should still be removed.  i.e. It would just ignore the fact they are open/active.

     

    Cheers,

     

    Dan