Set Up Cold Storage Using REST APIs

JFrog Platform Administration Documentation

Content Type
Administration / Platform
ft:sourceType
Paligo

The preferred method of binding the two instances is using the flow described in Set Up Cold Storage Using the Platform UI. However, you can also bind them using the API as described below.

  1. First, generate the Pairing Token to connect the Live and Cold instances.

  2. On the Cold instance, execute the following POST request.

    curl -u admin:password -X POST https://<cold_instance_ip_address>/artifactory/api/v1/service_trust/pairing/artifactory-cold
    

    This generates the pairing token. For example:

    {
      "pairing_token":"IiwiYWxnIjoiUlMyNTYiLCJraWQiOiJaWkhkQzBzenlqd2d..."
    }
  3. Next, on the Live instance, use the generated pairing token to execute the following PUT request. This sets up trust between the Live instance and the Cold instance:

    curl -u admin:password -X PUT
    -H "Content-Type: application/json"
    -d '{"pairing_token" : "IiwiYWxnIjoiUlMyNTYiLCJraWQiOiJaWkhkQzBzenlqd2d..."}' https://<live_instance_ip_address>/artifactory/api/v1/service_trust/pairing/artifactory-cold

    If the two instances are paired successfully, the request returns the following status:

    Trust with service artifactory-cold was established successfully