Import a project exported by another tenant into your tenant.
About this task
If you import a project that includes integrations with custom connectors and the connectors are
not configured automatically during deployment, you must manually configure those components.
- Open the workflow.
- Select the appropriate account for the connector.
- Save the workflow to apply the changes.
This step is required to ensure that the workflow works as intended in the new environment.
Starting with version 12.0, configurations must be included in the import and
deploy APIs to import project parameters and variables.
Procedure
- In a REST client platform, add the authentication details of the tenant where you want to
import a project.
//In case of Instance API key
Headers:
{
"x-instance-api-key": "instance_api_key"
}
// In case of MCSP or ISV token
Headers:
{
"Authorization": "Bearer mcsp_or_isv_token"
}
Body:
{
"project": <zip_file_binary>*
"new_project_name":<new_project_name>$
”visibility”: “<Indicates the project access. It can be either private or public>”,
"configurations":
{
{
"apiVersion": "1.0",
"metadata": {
"source": "<source_env_name>",
"project": "<project>",
"generatedOn": <timestamp>
},
"configurations": {
"packages": [<an_array_of_packages>],
"variables": [<an_array_of_project_variables_and_paramters>],
"connections": [<an_array_of_connections>],
"certificates": [<an_array_of_certificates>],
"servicesSchedule": [<an_array_of_schedules_of_flowservices>]
},
"globals": {
"alertRules": [<an_array_of_workflow_and_flowservice_alertrules>],
"versionControlAccounts": [<an_array_of_version_control_accounts>]
}
}
}
// A field with the asterisk (*) character in the body of the request is a required field.
// The dollar ($) character appended to the project name in the body of the request indicates that you already have a project with the same name and different UID in the target tenant.
Note: The Content-Type for the configurations field must be set to
application/json.
- Make a POST request at the URL of the project.
URL syntax: <domain>/apis/v1/rest/project-import
To import REST or SOAP and other assets without creating a new deployment version or generating
deployment more records, append the version=false query parameter to the URL
path. With this approach, the creation of a new version is skipped. Specify the query parameter
force = true in the URL, if you want to import the project from a higher version environment to a
lower version environment.
The new_project_name parameter is not supported in develop anywhere, deploy
anywhere environments, as these environments follow a different project configuration model that
does not accommodate this naming convention or structure.
Method: POST
If the request is successful, you receive the response code for success.
{
output: {
"status": "<deployment_status>",
"messaging_issues":
{
"issues": [<commaseparated_string_arr>],
"description": "<issue_description>"
}
}
}
If the request is unsuccessful, the error details are included in the output under the message
key.
{
"error":
{
"status": "<deployment_status>",
"message": "Failed to fetch the deployment data.",
"errorSource":
{
"errorCode": "<code>",
"requestID": "<request_id>"
}
}
}
Note:
- Importing a project to the source tenant or environment where the original version of the
project exists is not supported.
- When you make the Project Import API call, a deployment record is automatically created for the
imported project. This deployment contains a unique version number, which is used to deploy the
project with that specific version. In the Project Import API call, the deployment of the project
happens automatically with the latest deployment version that is mentioned in the deployment
record.
- If you are importing the project into a tenant for the first time, the
version=false parameter is ignored. In this case, a deployment entry is
created.