Migrate an API version
POST https://{controlplane_path}/api/1/rest/public/apim/migrate_version/{version_path}
Migrate 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
Example
This example uses Basic authentication. For a JWT example, refer to Authentication.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/apim/migrate_version/acme/apim/BookStore/1.0' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"dest_version_path": "/acme-staging/apim/BookStore/1.0",
"dest_plex_path": "/acme-staging/shared/my-snaplex",
"asset_types": ["Pipeline", "Account", "File"],
"duplicate_check": true,
"async_mode": true
}'
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:
|
version_path |
Required. The path of the source API version. Format:
Example:
|
Query parameters
None.
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
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.
Format:
|
dest_plex_path |
string |
The path to the destination Snaplex.
Format:
|
asset_types |
array | The list of asset types to migrate. Valid values:
Default: All valid asset types. Important:
If you are migrating or copying accounts or policies to
a different environment (Org):
|
duplicate_check |
Boolean |
If If Default:
|
async_mode |
Boolean | If true, the migration
proceeds asynchronously. A response is immediately returned with
Default:
|
Response
{
"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. |
Error handling
| HTTP status codes | Message | Resolution |
|---|---|---|
| 400 | {dest_version_path} is not an Api Version | Verify the destination path points to a valid API version. |
| 400 | The Plex assigned to an Api Version must be a groundplex or have a load balancer | Assign a valid Snaplex to the destination API version. |
| 401 | Unauthorized | Verify your credentials and permissions on both source and destination. |
| 404 | Not Found | Verify the source version path, Org, and Snaplex path are correct and exist. |
| 409 | There is an Api Version with same name in the destination path. Use duplicate_check=False to overwrite the assets on migration | Set duplicate_check to false to overwrite, or use a different destination path. |