Marco, you can achieve the desired behavior by leveraging the CA RA REST API.
One simple option to do it in one REST Call is to use the run-deployment-plan operation.
From the official documentation:
run-deployment-plan
Creates a deployment plan from an existing deployment template.
An existing artifact package (by name) or a new one (supplied by XML) could be assigned to the deployment plan.
The deployment plan is also assigned an artifact package, when supplied the artifact package name.
The deployment plan can also load a manifest file when supplied one.
Keep in mind that while this small description does not mention it clearly, you can provide a list of environments to run this newly created deployment plan on.
Example
Request:
{ "deploymentPlan": "deployREST151", "build": "buildREST2", "project": "newVersion", "deploymentTemplate": "deploymentTemplate", "templateCategory": "newTmp", "application": "Parameters test", "deployment": "run_deployment61", "environments": [ "Environment for Default Architecture" ], "deploymentStageToPerform": "none" }
Response:
{ "result": true, "deploymentResults": [ { "envName": "Environment for Default Architecture", "envId": "4", "id": "9", "description": "Successfully created deployment [run_deployment61] with id [9] on environment [Environment for Default Architecture] with id [4]", "result": true } ], "deploymentPlanDescription": "Successfully created a deployment plan [deployREST151] with id [74]", "deploymentPlan": "deployREST151", "deploymentPlanId": "74" }
Detailed information regarding this operation is available here:
/run-deployment-plan - CA Release Automation - 6.4 - CA Technologies Documentation
Please also see detailed information regarding the request and response parameters/JSON
RunDeploymentPlanApiDto - CA Release Automation - 6.4 - CA Technologies Documentation - Request
DeploymentPlanResponseApiDto - CA Release Automation - 6.4 - CA Technologies Documentation - Response
General information regarding the CA RA RESTful API is available at:
REST API Reference - CA Release Automation - 6.4 - CA Technologies Documentation
As a reminder, you can also use the CARA provided CLI for integrations if you're more comfortable with CLI than REST, more details here:
Release Operations Center CLI Commands - CA Release Automation - 6.4 - CA Technologies Documentation