Exporting Files from A4 Repository to Local File Storage Using REST API and CURL

This entry explains how to export or download files from the Ambience 4.x repository filesystem via REST API and CURL

Using the GET command to export the files from the repository filesystem attached is a code example using two methods of authentication: -

  • For Base-64 authentication, do ensure to revise the values following variables:
    → “urlToDownload”, “destinationPath”, “username”, “password”

  • For Ambience API Token, do ensure to revise the values for the following variables:
    → “pathToFile”, “apiToken”, “destinationPath”

Using CURL with the Ambience 4.x API token keys

For example,
CURL -v -X GET "http://localhost:8080/elx/do/eno/dc/content/wdir/result.pdf?elx.attachment&elx.token=eno:<insert generated api key here>"

Below example to get the API token keys