logoBack to home screen

Exporting and Importing Repository Configuration via REST

This page explains how to execute REST calls allowing you to export and import repositories.


ADx provides REST services allowing you to export and import repository configuration. All export services allow you to export all repositories, but you can also retrieve configuration by any of the following categories:

  • Repository ID (/export/configuration/ endpoint)
  • Repository name (/export/configuration/by-names endpoint)
  • Repository technical name (/export/configuration/by-technical-names)

Import is always done through the /import/configuration endpoint. Check Endpoints for detailed information on what each endpoint can do.

You can get all of the export parameters in the Administration Area in the UI. Name and technical name are visible in the preview:

ID is visible in the detailed view of the repository (select Details to open):

cURL Example - Repository Migration Between Hosts

The example below shows a typical workflow consisting of 4 cURL requests, where you export a configuration from one host and import it into another one.

Adapt the following parts of the below requests:

  • https://[HOST]:[PORT] - adjust the protocol (http or https) and host name.
  • [USER_NAME] - replace with your user name
  • [PASSWORD] - replace with your password
  • repositoryNames - replace with real repository names, as in -F repositoryNames=["Real name 1","Real name 2"]
  • @/path/to/myrepo-export.zip - replace with the actual path (for example @/mnt/c/Downloads/myrepo-export.zip)
# open session to ADx host
ADX_DEV_SESSION_ID=$(curl --silent --location --insecure --request POST 'https://[HOST]:[PORT]/tribefire-services/api/v1/authenticate?user=[USER_NAME]&password=[PASSWORD]' --header 'Content-Type: application/json' | cut -d '"' -f 2)

# export repository from ADx-dev to myrepo-export.zip
curl --insecure --request GET  "https:///[HOST]:[PORT]/tribefire-services/api/v1/access.adx.admin/v1/export/configuration/by-names?sessionId=${ADX_DEV_SESSION_ID}" --header "accept: application/json" -F repositoryNames="[Real name 1,Real name 2]" --output /path/to/myrepo-export.zip 

# open session to ADx host (ignore if you're calling the same ADx instance)
ADX_TEST_SESSION_ID=$(curl --silent --location --insecure --request POST 'https://[host]:[port]/tribefire-services/api/v1/authenticate?user=admin&password=password' --header 'Content-Type: application/json' | cut -d '"' -f 2)

# import repository from myrepo-export.zip to ADx
curl --insecure --request POST "https://[host]:[port]/tribefire-services/api/v1/access.adx.admin/v1/import/configuration?sessionId=${ADX_TEST_SESSION_ID}" --header "accept: application/json" --header "Content-Type: multipart/form-data" --form "autoSync=true" --form "importRepositoryOption=full" --form "importUsersOption=none" --form "useRuntimeValues=false" --form "resource=@/path/to/myrepo-export.zip;type=application/zip"

The video below shows how to send adopted cURL requests to ADx:


You can use three different endpoints to export repositories (by ID, by name or by technical name). Importing is always done via the import/configuration endpoint. Export query parameters are optional - if you don't enter them, all repositories will be exported. Check Parameters below for information on request parameters and their values.

You need to authenticate before using any of the below endpoints - session ID must be passed as a query parameter.

Request typeService descriptionEndpointRequest query parametersForm dataReturns
GETExport repository configuration by IDshttps://host:port/tribefire-services/api/v1/access.adx.admin/v1/export/configuration/sessionId, repositoryIds (array)none.zip file with repository configuration
GETExport repository configuration by nameshttps://host:port/tribefire-services/api/v1/access.adx.admin/v1/export/configuration/by-namessessionId, repositoryNames (array)none.zip file with repository configuration
GETExport repository configuration by technical namehttps://host:port/tribefire-services/api/v1/access.adx.admin/v1/export/configuration/by-technical-namesrepositoryTechnicalNames (array)none.zip file with repository configuration
POSTImport repository configurationhttps://host:port/tribefire-services/api/v1/access.adx.admin/v1/import/configurationnoneautoSync, importRepositoryOption, importUsersOption, resource, useRuntimeValues


ParameterData typeDescription
sessionIdstringSession ID returned when you authenticate
repositoryIdsarrayArray of one or more repository IDs, for example ["ab-cd-1234", "ef-gh-5678"]
repositoryNamesarrayArray of one or more repository names, for example ["Repository name 1", "Repository name 2"]
repositoryTechnicalNamesarrayArray of one or more repository technical names, for example ["Technical name 1", "Technical name 2"]
autoSyncbooleanIndicates whether affected repositories should be automatically synchronized after import.
importRepositoryOptionstringSpecifies option for repository import. delta - import only missing configuration, full - do a full import, none - do not import repository configuration (in case you only want to import users)
importUsersbooleanIndicates whether users/roles/groups should be imported.
resourcestringFile system path to the previously exported .zip archive with repository configuration to be imported.
useRuntimeValuesbooleanIndicates whether environment specific runtime values should be used instead of the values from the export package.

Try It Out in OpenAPI/Swagger

All of the above endpoints are documented and exposed in our OpenAPI and Swagger pages, where you can try them out.

  1. Log in to ADx. Open Administrator API from the landing page:

    A list of repository endpoints is exposed. Switch to Swagger 2.0 in case of any issues in the default page:

  2. Find the Export/Import section (on top of the page):

  3. Expand and try out the endpoints yourself, following the guidelines provided in Swagger.

Exporting via ADx UI

You can execute the services described above via ADx Administration UI. See Exporting and Importing Repository Configuration via ADx UI for more information.