Automic Workload Automation

Expand all | Collapse all

REST API for exporting a folder of AE objects

Jump to Best Answer
  • 1.  REST API for exporting a folder of AE objects

    Posted 11-07-2019 11:31 AM
    In the AE v12.3 REST APIs, the object (GET) endpoint allows one to export a single AE object.

    Is there a way using the REST APIs to to export a whole folder of objects including folder structure? If not, is this coming in a future release?

  • 2.  RE: REST API for exporting a folder of AE objects
    Best Answer

    Posted 11-08-2019 06:12 AM
    I've implemented an Automic Workflow containing 3 UNIX Jobs. This Workflow is able to export several Automic-FOLDERs with their sub-FOLDERs and all objects :

    • A PROMPT displays the DEFAULT list of FOLDERs to be exported (defined in a static VARA)
    • User can accept / modify / overwrite this list (absolute paths of FOLDERs)
    • Result: 
      • all objects from all FOLDERs in this list are exported into single XML files
      • directory structure matches the FOLDERs structure from Automic
      • CHILD_FOLDER_1
        • OBJECT_A.xml
        • OBJECT_B.xml
      • CHILD_FOLDER_2
        • OBJECT_C.xml
        • OBJECT_D.xml
      • OBJECT_E.xml
      • CHILD_FOLDER_3
        • OBJECT_F.xml
        • OBJECT_G.xml
      • OBJECT_H.xml
      • OBJECT_I.xml
      • ...


    Exported FOLDERs and Automic-Objects:

    Our AE is running on SLES. In consequence my recursive export works on Linux only.

  • 3.  RE: REST API for exporting a folder of AE objects

    Posted 11-08-2019 10:47 AM
    Edited by Michael Lowry 11-08-2019 10:59 AM
    I think we'll probably build our own wrapper around ExportObject - this constructor specifically:
    ExportObject(UC4ObjectName[] names, List<IFolder> folders, File export, boolean exportLinks)
    Export given folder list and objects
    It’ll be straightforward, taking advantage of the AE’s built-in support (since v11) for encoding AE folder structures in the FolderStruct element in the XML files. The only downside to this approach is that we’ll have to fetch the entire folder tree just to get the IFolder object required by the constructor. (There’s unfortunately no other way to get an IFolder of a particular AE folder. See this enhancement request: More ways to get IFolder objects.)