Migrate a proxy

POST /apim/migrate_proxy

Overview

This API migrates a proxy, including all its endpoints, policies, and files.

Important:
If you are migrating or copying accounts or policies to a different Environment/Org,
  • The source Environment/Org must recognize the destination Environment/Org as a Trusted Environment/Org.
  • The destination Environment/Org must have at least the same security level as the source Environment/Org.
Learn how to add a trusted Environment/Org.

Prerequisites

  • Read access to the source proxy
  • Write access to the target Org

Request

 POST https://{controlplane_path}/api/1/rest/public/apim/migrate_proxy

Path parameters

Key Description
controlplane_path Required. The path to the SnapLogic control plane: elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For example:
  • uat.elastic.snaplogic.com
  • emea.snaplogic.com

Query parameters

None.

Request header

Basic authentication

In the request header, specify Basic for authorization, add your credentials (Login and password of your SnapLogic user or service account), and specify application/json for content type. For more details on accounts refer to Manage accounts.


Authorization: Basic {base64_encoded <email>:<password>}
Content-Type: application/json
          

Example of Basic authenthication using Postman

Request body

 {
  "source_org" : "...",
  "source_proxy_name" : "...",
  "dest_org" : "...",
  "dest_proxy_name" : "...",
  "duplicate_check" : true
}
Key Type Description
source_org string Required. The name of the source Environment/Org.
source_proxy_name string Required. The name of the source proxy.
dest_org string Required. The name of the destination Environment/Org.
dest_proxy_name string The name of the destination proxy. Required if migrating within the same Environment/Org.
duplicate_check Boolean

If true, throws an exception if a proxy with the same name already exists in the destination Environment/Org.

If false, overwrites any existing proxy with the same name in the destination Environment/Org.

Default: true

Response

Response body

 {
  "response_map": {
    "source_proxy_path": "...",
    "destination_proxy_path": "...",
    "proxy_status": {
      "deleted_duplicate_proxy": {
        "proxy_path": "...",
        "snode_id": "..."
      },
      "status": "...",
      "snode_id": "...",
      "migrated_policies": [ ... ],
      "files": [
        {
          "status": "...",
          "file_name": "...",
          "file_path": "...",
          "snode_id": "..."
        }
      ]
    },
    "proxy_endpoint_status": {
      "status": "...",
      "proxy_endpoints": [
        {
          "myEndpoint1": {
            "proxy_endpoint_path": "...",
            "snode_id": "...",
            "policies": [ ... ]
          }
        }
      ],
      "reason": "..."
    }
  },
  "http_status_code": 200
}
Key Type Description
source_proxy_path string The path to the source proxy.

Format: /{env_org}/apim/{proxy_name}

destination_proxy_path string The path to the destination proxy.

Format: /{env_org}/apim/{proxy_name}

proxy_status object Information about the migration of the proxy and its policies.
proxy_status » deleted_duplicate_proxy object If duplicate_check was set to false, information about the existing proxy with the same name, if any, in the destination Environment/Org.
  • proxy_path. (string) The path to the existing proxy with the same name.
  • snode_id. (string) The ID of the JCC node that performed the operation.
proxy_status » status string The status of the migration of the proxy.
Possible values:
  • Migrated proxy.
  • Not migrated.
proxy_status » snode_id string The ID of the JCC node that performed the operation.
proxy_status » migrated_policies array An array of strings containing the friendly names of the policies that were migrated with the proxy.
proxy_status » files array An array of objects containing information about the migrated files. Each object contains the following information:
  • status. (string) The status of the migration of the file.
    Possible values:
    • Migrated file.
    • Not migrated.
  • file_name. (string) The name of the file.
  • file_path. (string) The path to the file.
  • snode_id. (string) The ID of the JCC node that performed the operation.
proxy_endpoint_status object Information about the migration of the proxy's endpoints.
proxy_endpoint_status » status string The status of the migration of the proxy endpoints.
Possible values:
  • Migrated proxy endpoints.
  • Not migrated.
proxy_endpoint_status » proxy_endpoints array An array of objects containing information about the migrated endpoints. Each object contains a key-value pair.
  • Key: The endpoint name.
  • Value: An object with the following information:
    • proxy_endpoint_path. (string) The path to the endpoint.
    • snode_id. (string) The ID of the JCC node that performed the operation.
    • policies. (array) An array of strings containing the friendly names of the policies that were migrated with the endpoint.
reason string If the migration failed, the reason for the failure.