Migrate an API version

POST /apim/migrate_version/{version_path}

Overview

This API migrates an API version, including the selected asset types, to another version.

The destination version can be in the same or another API, Project, Environment/Org, or Snaplex.

Prerequisites

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

Request

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

Path Parameters

Key Description
controlplane_path Required. The path to the SnapLogic control plane.

Example: cdn.elastic.snaplogic.com

For other control planes, substitute the subdomain name for elastic. For example:
  • cdn.uat.snaplogic.com
  • cdn.emea.snaplogic.com
version_path Required. The path of the source API version.

Format: {org}/apim/{apiname}/{apiversion}

Example: snaplogic/apim/My%20User%20API/1.0

Query Parameters

None.

Request Header

Specify Basic for authorization and application/json for content type.


Authorization: Basic {your_encoded_security_credentials}
Content-Type: application/json
          

Request Body

 {
  "dest_version_path" : "...",
  "dest_plex_path" : "...",
  "asset_types" : [ ... ],
  "duplicate_check" : true,
  "async_mode" : true
}
Key Type Description
dest_version_path string
The path to the destination API version.
  • The path comparison is case-sensitive.
  • The path must be URL-escaped. That is, spaces must be replaced with %20.

Format: /{env_org}/apim/{api_name}/{api_version}

dest_plex_path string
The path to the destination Snaplex.
  • The path comparison is case-sensitive.
  • The path must be URL-escaped. That is, spaces must be replaced with %20.

Format: /{env_org}/{project_space}/{project_name}/{snaplex_name}

asset_types array The list of asset types to migrate.
Valid values:
  • Account
  • File
  • Job (task)
  • Pipeline
  • Policy

Default: All valid asset types.

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.
duplicate_check Boolean

If true, throws an exception if a project with the same name already exists at the destination path.

If false, overwrites any existing project with the same name at the destination path.

Default: true

async_mode Boolean If true, the migration is done asynchronously.

A response is immediately returned with status_token and status_url, which you can use to check on the status of the migration (Started, Completed, or Failed).

Default: true

Response

Response Body

 {
  "response_map": {
    "successful": [
      {
        "snode_id": "...",
        "name": "..."
      },
      ...
    ],
    "failed": [ ... ],
    "warnings": [ ... ]
  },
  "http_status_code": 200
}
Key Type Description
successful array An array of objects containing information about assets that were successfully migrated.
failed array An array of objects containing information about assets that were not migrated.
warnings array An array of warnings encountered during the migration.
snode_id string The ID of the asset in the destination JCC node.
name string The name of the copied asset.