Automic Workload Automation

 View Only
  • 1.  REST API - Delete objects

    Posted Oct 28, 2019 11:52 AM
    How can I delete objects using the AE REST API in Automic Automation 12.3?


  • 2.  RE: REST API - Delete objects
    Best Answer

    Posted Oct 29, 2019 01:41 AM
    The REST API does not have an object delete endpoint as of AE V12.3. What you can do as a workaround is to use the new "CallAPI" endpoint (POST /{client_id}/scripts) to run a REMOVE_OBJECT script instruction which will end up with the same result.

    ------------------------------
    Swisscom & WorkflowCommander
    ------------------------------



  • 3.  RE: REST API - Delete objects

    Posted Apr 14, 2021 06:08 PM
    I'm attempting to use the workaround above. I get back a run_id from the call to the /scripts end point, but when I then try to get execution details for that run, I receive a 403 with the following body:

    {
    "code": 9,
    "error": "Permission check failed.",
    "details": "'*SCRIPT': Access denied"
    }

    Any ideas how I can proceed here?


  • 4.  RE: REST API - Delete objects

    Posted Apr 14, 2021 06:09 PM
    I've attempted to use the workaround above and do get back a run_id in the response to the call to the scripts endpoint, however when I then query the status for that run_id (using the /{client_id}/executions/{run_id} endpoint) I get a 403 response with the following body:

    {
        "code"9,
        "error""Permission check failed.",
        "details""'*SCRIPT': Access denied"
    }
    and the object I've attempted to remove is still present. Any ideas on how I can resolve this?


  • 5.  RE: REST API - Delete objects

    Posted Apr 15, 2021 03:16 AM

    Well... Permission check might mean that there are some permissions to be set... like...

    :-)



    ------------------------------
    Juergen Lechner
    Senior Consultant
    setis GmbH
    Germany
    ------------------------------



  • 6.  RE: REST API - Delete objects

    Posted Jun 30, 2021 10:20 AM
    Does deleting objects using the CALL API degrade system performance?

    I need to delete about 200,000 objects from a client, that would be impossibly slow from the GUI very manual.
    Deleting the client and recreating is also an issue i think as there are another 300,000 objects I need to retain, or would need to reload.

    Is there a better way to delete en-mass/in bulk?

    Thanks.



  • 7.  RE: REST API - Delete objects

    Posted Jun 30, 2021 05:22 PM
    I tried the CallAPI method, get an error if i try with 500 or so objects but it seems to work.
    Waiting time ('120' seconds) has expired. The connection has been terminated.
    Alas you cant use wildcards.
    Ideally we need a method to delete folders and subfolders including objects.


  • 8.  RE: REST API - Delete objects

    Posted Jul 05, 2021 02:38 PM
    Hi,
    You need to have some settings modified in the UC_SYTEM_SETTINGS (client 0000) variable to have a long loop time for running large script sequence.
    CallAPI is limited in the size of the code you can run through it. So better use an object variable with the list of the objects to remove and a simple PREP_PROCESS_VAR command to execute the delete command for each object recorded in the variable object.
    To remove folders and sub-folders you will need to record the folder and full path of it to be able to remove it using a similar process.

    summary :
    1 - remove objects using a list as input for a delete loop using script commands
    2 - remove folders and subfolders using similar process. You may need to use object Idnr as you can have multiple folders with the same name. and you need to remove lowest folder level first then upper level, etc ... until you reach top folder level.

    Good luck with your cleanup process.

    Regards.
    Alain


  • 9.  RE: REST API - Delete objects

    Posted Jul 06, 2021 05:10 PM
    Thanks Alain good advice.

    If folks have similar issues deleting folder and subfolder trees please vote for this Ideation topic!

    https://community.broadcom.com/participate/ideation-home/viewidea?IdeationKey=47b9d707-1da1-4300-bf58-6d3cf4cc13cd#ItemCommentPanel