In this article
Use the Project Migration API to migrate a SnapLogic Project from one Org to another.
Parameters
Parameter Name | Description | Default Value | Example | |
---|---|---|---|---|
dest_path | The path of the target destination.
| N/A | "/myotherorg/clientprojects/sales" | |
asset_types | A list of the asset types to be included in the Project for migration. | N/A | ["File", "Job", "Account", "Pipeline"] | |
async_mode | If true, then the request is returned immediately with message to wait for motd notification. | true | "false" | |
duplicate_check | If true, then the request raises a conflict error if the Project with the same name exists in the specified destination path. | true | "false" | |
content-type | Binary header specifying the content type. Since all SnapLogic assets are JSON files, this parameter's value must always be application/json.
| application/json | "application/json" |
{ "dest_path":"/<org_name>/<project_space>/<project_name>", "asset_types":["File","Job","Account","Pipeline"], "async_mode":"true", "duplicate_check":"false" } |
When the async_mode parameter is set to true, the request returns immediately with status_token
and status_url
.
{ "response_map": {"status_token": "xxxxxxxxxxxxxx", "status_url": "https://<pod_name>/api/1/rest/public/project/migrate/<status_token>"} , "http_status_code": 200 } |
The status URL is a public API that checks the migration status: Started, Completed, or Failed. If the status is Failed, the response includes error messages.
The following example shows a status document:
{ "_id" : "a8f70684-f422-42ed-83d1-78fa3aa1759a", "status" : "Completed", "user_id" : "inttest@snaplogic.com", "src_path" : "exportorg/projects/acct", "create_time" : ISODate("2017-03-21T18:37:46.249Z"), "dest_path" : "/importorg/projects/acct", "asset_types" : [ "File", "Job", "Account", "Pipeline" ], "successful" : [ { "snode_id" : "58d172f773fe032daac6350c", "name" : "rest_account" } , { "snode_id" : "58d172fa73fe032daac63510", "name" : "import_pipe" } ], "failed" : [ ], "warnings" : [ ] } |