Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

POST /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 Org or in different Orgs.

Note

If you are migrating or copying accounts or policies to a different Org, the

  • The source Org must recognize the destination Org as a Trusted Org.

  • The destination Org must have at least the same security level as the source Org.

Learn how to add a trusted Org.

If an asset with the same name already exists in the destination Project, the asset in the destination is overwritten.

A Task remains enabled when copied to the destination, only if the following conditions are met; otherwise, the Task is disabled.

  • 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 Org's shared folder, the destination Project's shared folder, or the destination Project's folder.

Prerequisites

  • Read access to the source Project

  • Write access to the destination Project

Request

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

POST https://{pod_path}/api/1/rest/public/project/copy_assets

Path Parameters

Key

Description

pod_path

Required. The path to your SnapLogic pod.

Example: elastic.snaplogic.com

Query Parameters

None.

Request Header

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

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

Authorization: Basic {your_encoded_security_credentials}

Content-Type: application/json

Request Body

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

{
"dest_path" : "...",
"asset_path_list" : [ ... ]
}

Key

Type

Description

dest_path

string

Required. The path to the destination SnapLogic project.

Format: /{org}/{project_space}/{project_name}

Note

Important: The path comparison is case-sensitive.

asset_path_list

array

Required. A list containing the paths to the assets to copy.

Format: /{org}/{project_space}/{project_name}/{asset_name}

Response

Response Body

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

{
"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.