Publishing projects

Publish a particular project along with its valid assets to the target tenant.

Before you begin

  • You must have admin access to publish a project to the tenant.
  • If you do not have admin access but have a custom role, ensure that you have write access for the project you want to publish.

About this task

Note: Single sign-on is not supported.

Procedure

  1. In a REST client platform, add the authentication details of the tenant where you want to publish a project.
    
    Headers: 
    { 
      "content-type": "application/json", 
      "x-instance-api-key": "<source_tenant_api_key>" 
    } 
    
    Body:  
    { 
    
      "name": "deployment_name", 
    
      "destination_tenant_detail": { 
    
      "x-instance-api-key": "<destination_tenant_api_key>", 
    
        "url": "https://destination.tenant.url" 
    
      }, 
    
      "workflows": [ 
    
        "<workflow1_uid>", 
    
        "<workflow2_uid>" 
    
      ], 
    
      "flows": [ 
    
        "<flowservice1_name>", 
    
        "<flowservice2_name>" 
    
      ], 
    
      "rest_api": [ 
    
        "<rest_api1_name>", 
    
        "<rest_api2_name>" 
    
      ], 
    
      "soap_api": [ 
    
        "<soap_api1_name>", 
    
        "<soap_api2_name>" 
    
      ], 
    
      "messaging": [ 
    
        "<subscriber1_name>", 
    
        "<subscriber2_name>" 
    
      ] 
    
    } 

    The x-instance-api-key header is required. Include the source tenant API key to authenticate the request.

  2. Send a POST request to the project URL.
    URL Syntax - <domain>/apis/v1/rest/projects/:project/publish
    • Replace :project with the name of the project you want to publish.
    • Use the query parameter force=true to publish the project from a higher version environment to a lower version environment.

    Method - POST

    If the request is successful, you receive the response code for success.
    {
    	output : 
    	{
    		"uid": "<deployment_uid>",        
    		"name": "<deployment_name>",
    		"description": "<deployment_description>",
    		"version": "<deployment_version>",
    		"project_name": "<project_name>",
    		"project_uid": "<project_uid>",
    		"tenant_uid": "<tenant_uid>",
    		"to_tenant": "<target_tenant_name>"
    		"from_tenant": "<source_tenant_name>",
    		"contains_asset": 
    			{
    			"sap_assets": <true || false>,
    			"messaging_assets": <true || false>
    			}       
    	}
    }