On this page
Every repository in ADx comes with default content storage settings, defining where binary resources are stored. These settings, specifically the storage type and the path are determined by the
ADX_DEFAULT_STORAGE_CONTENT_PATH runtime properties, respectively. However, you can also configure alternative storage locations in ADx Administration Area and easily move repository contents into these locations. This page explains how to relocate binary resources into alternative locations with ADx REST API.
- Alternative repository storage must be configured on the repository. For more information, see Configuring Alternative Repository Storage.
The example below shows how to authenticate to ADx and run the relocation request.
Adapt the following parts of the below requests:
https://[HOST]:[PORT]- adjust the protocol (
https) and host name.
[USER_NAME]- replace with your user name
[PASSWORD]- replace with your password
[CONTENT_ID]- replace with the target content ID
# 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) # relocate content to ALTERNATIVE_STORAGE curl --location --request POST 'https://[HOST]:[PORT]/tribefire-services/api/v1/access.adx.content.[REPOSITORY_NAME]/v1/content/relocate?sessionId=20200904135026161-61f7fb33-422d-4e6c-806e-e25bb00999fc' \ --form 'contentId=[CONTENT_ID]' \ --form 'storageName=[ALTERNATIVE_STORAGE]'
You can use two endpoints described below to relocate single binary resource or all repository resources. 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 type||Service description||Endpoint||Request query parameters||Form data||Returns|
|POST||Relocate (single) Content by ID||sessionId||contentId, storageName|
|sessionId||string||Session ID returned when you authenticate|
|contentId||string||Content ID of the target content|
|storageName||string||Unique name of the target storage. If you don't send anything, content will be moved to the default storage.|
All of the above endpoints are documented and exposed in our OpenAPI and Swagger pages, where you can try them out.
Log in to ADx. Open Repository 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 Open API page:
/access.adx.content.test/v1/content/relocateendpoint. Expand it to see the available parameters.
Click Try it Out! to activate the fields.
- Log in to ADx. Open Repository API from the landing page:
You can execute the services described above via ADx UI. See the following pages for more information: