Copy assets between projects
POST https://{controlplane_path}/api/1/rest/public/project/copy_assets
Overview
This API copies a list of assets from one or more projects to a single project. The source projects and the destination project can be within the same Environment/Org or in different Environments/Orgs.
- 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.
If the destination project does not exist, it will be created.
If an asset with the same name already exists in the destination project, the asset in the destination is overwritten.
- Its associated pipeline is also copied in the same transaction.
- The runtime path of the Task is also valid in the destination Project.
- The Snaplex associated with the Task is defined in the Environment/Org's
sharedfolder, the destination Project'ssharedfolder, or the destination Project's folder.
Prerequisites
- Read access to the source project
- Write access to the destination project
Request
POST https://{controlplane_path}/api/1/rest/public/project/copy_assets
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:
|
Query parameters
None.
Request header
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 authentication using Postman
When using JWT authentication, the API requests includes specific headers. In the
request header, specify Bearer Token for authorization, add the token,
and specify application/json for content type. These headers are
automatically added when you configure bearer token authentication in your API client.
The authorization header contains the word Bearer followed by a
space and your JWT token.
Authorization: Bearer Token {token}
Content-Type: application/json
Example of JWT authenthication using Postman
Request body
{
"dest_path" : "...",
"asset_path_list" : [ ... ]
}
| Key | Type | Description |
|---|---|---|
dest_path |
string |
Required. The path to the destination SnapLogic project.
Format: Important: The path comparison is case-sensitive.
|
asset_path_list |
array | Required. A list containing the paths to the assets to copy.
Format: |
Response
{
"copied_assets_new_path" : [ ... ],
"skipped_assets" : [ ... ]
}
| Key | Type | Description |
|---|---|---|
copied_assets_new_path |
array | A list containing the paths of the newly copied assets in the destination project. |
skipped_assets |
array | A list containing the paths of assets that were not copied from the source project. |