Skip to main content
Version: 2.8

Relocating binary content resources via REST

General

Every repository in Document.One (D1) 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_TYPE and ADX_DEFAULT_STORAGE_CONTENT_PATH runtime properties, respectively. However, you can also configure alternative storage locations in the D1 Administration Area and easily move repository contents into these locations. This page explains how to relocate binary resources into alternative locations with the D1 REST API.

REQUIREMENT

Alternative repository storage must be configured on the repository. For more information, see Configuring an alternative repository storage.

Task 1: Relocating a single binary resource

The example below shows how to authenticate to D1 and run the relocation request.

cURL example

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.
  • [CONTENT_ID] Replace with the target content ID.
  1. Open a session to the D1 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)
  1. Relocate the content to the 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]'

Endpoints

You can use two endpoints described below to relocate a single binary resource or all repository resources. Check Parameters below for information on request parameters and their values.

NOTE

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

HTTP requestEndpointService descriptionRequest query parametersForm dataReturns
POSThttps://host:port/tribefire-services/api/v1/access.adx.REPOSITORY_NAME/v1/content/relocateRelocate (single) content by ID.sessionIdcontentId, storageName.zip file with repository configuration.

Parameters

ParameterData typeDescription
sessionIdstringThe session ID returned when you authenticate.
contentIdstringThe content ID of the target content.
storageNamestringThe unique name of the target storage. If you do not send anything, the content will be moved to the default storage.

Try It Out in OpenAPI

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

To try out the relocation of a single binary resource in OpenAPI, follow these steps:

  1. Log in to D1. 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 OpenAPI page:

    Using OpenAPI

  2. Find the /access.adx.content.test/v1/content/relocate endpoint. Expand it to see the available parameters.

  3. Click Try it Out! to activate the fields.

For a code sample, see

Relocate content by ID

Exporting via D1 user interface

You can execute the services described above via the D1 user interface. See the following pages for more information: