2 Replies Latest reply on Dec 20, 2019 5:50 AM by Gordon McKeown

    Exporting Modules via Rest API

    Paul Seager-Smith
      Share This:

      I am looking to export a set of modules from a Dev repository and then import them into the Test repository in order to enable automated deployments.

      However, looking at the 8.2 Rest API, I can only see a request to import a module and not a call to export a module (only to remove them strangely).

      Screenshot 2019-11-26 at 15.08.59.png

      Has anyone managed to do something like this?

        • 1. Re: Exporting Modules via Rest API
          Matthew Highcove

          The Repository does not have a REST operation that can download Content to disk. You can use a tool like cURL to download modules on the command line:


          curl -k --user aoadmin:admin123 --request GET https://myserver:28080/baorepo/resources/ro-adapter-ssh_20.19.01.00.aroar --output ro-adapter-ssh_20.19.01.00.aroar


          The -k command allows cURL to skip certificate verification when it connects. The filename is (module name)_(version).(extension), where the extension is .roar for modules and .aroar for adapters.


          This method for downloading modules is not officially supported or certified and may not work with all modules in all versions of BAO/TSO.

          2 of 2 people found this helpful
          • 2. Re: Exporting Modules via Rest API
            Gordon McKeown

            That's useful! Having a play with that, I could see that (in general REST style) you can get a list of modules and adapters using:


            curl -k --user aoadmin:admin123 --request GET https://centauri.int.mckeown.me.uk:28080/baorepo/resources


            There does seem to be some support for filtering based on module and adapter, but I couldn't figure out how to trigger that (I was expecting something like ?type=adapter would work, but it gives a 404).