The Start Deployment call starts a deployment of the specified Application into the specified Environment.

API Call


http://host/dmadminweb/API/deploy/app_id/env_id[?wait=Y|N]

[&task=task_identifier]


Where:


Host

Is the hostname and port of the DeployHub Server (e.g.: hostname:8080 or for SaaS console.deployhub.com).

App_Id

Is the identifier of an Application. Either its name, its qualified name (i.e.: with its parent Domain(s) included in dot notation) or its internal ID.

Env_Id

Is the identifier of an Environment. Either its name, its qualified name (i.e.: with its parent Domain(s) included in dot notation) or its internal ID.

Task_Identifier

Is the identifier of a Deploy task to execute in order to perform the deployment. Either its name, its qualified name (i.e.: with its Domain and any parent Domain(s) included in dot notation) or its internal ID. If the task is not specified, the first accessible Deploy task within the Application's Domain is used (or any Deploy task in parent Domains if they are set to be available to sub-Domains).


If the wait parameter is not specified - or is specified and set to ‘Y’ - then the call does not return until the deployment is complete. If the wait parameter is set to ‘N’ then the call returns as soon as the deployment has been instigated but before it completes. In both cases, the deployment id is returned.


In order for API deployments to work through the DeployHub permission model, there has to be a Deploy task either in the Domain in which the specified Application is located or in any of the parent Domains if the Deploy task is set to be available to sub-Domains. If finer control is required, the task can be named via the task parameter.


This mechanism ensures that the invoking user has permission to deploy the Application (since the permissions are checked against the task). Also, by specifying the task to execute, any pre and post link actions are executed just as if the task had been invoked via the Web UI.


NOTE: Any additional parameters are created as Global Variables accessible in DeployHub with a url_ prefix. For example, if you passed “myparam=123” as a parameter in the “deploy” api call, it would be available as $url_myparam in DeployHub.


Example Result:


{

       "success": true,

       "deploymentid": 1713

}