Automic Workload Automation

 View Only

  • 1.  Need to get folder data on the Recycle Bin via the REST API

    Posted 23 days ago

    I'm assuming that I would use a call like that below to get information returned about what's in the Recycle Bin folder. Does anyone know the correct folder path I would use?

    I've tried "RECYCLEBIN",  "RECYCLE BIN", and "RECYCLE%20BIN". They do not exist.

    URL="$REST_ENDPOINT/ae/api/v1/$CLIENT/folderobjects/RECYCLE BIN"

     



  • 2.  RE: Need to get folder data on the Recycle Bin via the REST API

    Broadcom Employee
    Posted 23 days ago

    The Recycle Bin is not actually a folder.  It is a view of all the objects with the deletion flag set (OH_DeleteFlag = 1 in the OH table)

    In v26 the REST API was extended to enable you to retrieve content and to empty the recycle bin.

    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/26.0/REST%20API/Automation.Engine/index.html#/recycle%20bin/listRecycleBinContent




  • 3.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 23 days ago

    Mike,

    Thank you for your reply!

    Although we are working toward upgrading our instance to 26.0, we're not there yet. Is there a way to show what's in the Recycle Bin in each client in  24.4.1+hf1, the version we are currently running via the REST API?




  • 4.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 23 days ago

    Would doing what I want in v24 entail getting a list of all objects in a client and reporting those that have a property that says it's been deleted?




  • 5.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 23 days ago

    Looks like I'll have to walk ALL folders via "GET /{client_id}/folderobjects/{folder_path}" to get all of the objects, and then look for a property that indicates it's been deleted. Thoughts?




  • 6.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 22 days ago

    Running, "$REST_ENDPOINT/ae/api/v1/$CLIENT/folderobjects/%2F" doesn't seem to work. What's returned contains none of the objects that are shown in the Recycle Bin. ANy suggestions?




  • 7.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 22 days ago

    You will likely have to come at this sideways.
    Create a SQL JOBS, use a connection for your Automic Database do a query like:

    select OH_name, OH_Indr
    From OH
    Where OH_DeleteFlag = 1
    and Oh_Client = $&CLIENT#

    Then execute this via the Rest API POST /{client}/executions/{object_name}
    Then get the report using the runid you got as a response to the above call GET /{client_id}/executions/{run_id}/reports/REP




  • 8.  RE: Need to get folder data on the Recycle Bin via the REST API

    Broadcom Employee
    Posted 22 days ago

    From my memory (but this isn't too reliable anymore), deleted objects are filtered out from Get Requests, but I don't have an opportunity to test this at the moment to confirm.  I guess this is one of the reasons the API was extended to have a 'recyclebin' option!

    I think the SQL query method above may be the best option until you get to v26.x.

    One more thing, if you have versioning enabled, you probably want to add and OH_RefIdnr = 0 to the query, to only show the current version of the object.




  • 9.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 21 days ago

    Since we will be upgrading to v26 in the not-too-distant future, I decided to use the v26 REST API and the "recyclebin" functionality.  My issue now is that the API returns SOME of the records when there are several and sets the "hasmore" value to true.  How do I get ALL of the records for each recycle bin?




  • 10.  RE: Need to get folder data on the Recycle Bin via the REST API

    Posted 20 days ago

    Nevermind. I figured that out. I am all set. Thanks for the attention!