Approving an Application allows the API to approve/reject an Application for a specified Domain.


For this to work through the DeployHub permission model, there has to be an Approve task either in the Domain in which the specified Application is located or in any of the parent Domains if the Approve 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 approve the Application (since the permissions are checked against the named task). Also the target Domain (i.e.: the Domain to which the Application is being approved/rejected) is determined from the task. 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.

API Call


http://host/dmadminweb/API/approve/app_identifier?

[&task=task_identifier]

[&approve=Y|N]

[&notes=<notes>]


Where:

Host

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

App_Identifier

Is the identifier of the Application to be approved/rejected. 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 task to execute in order to approve the Application. 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 Approve task within the Application's Domain is used (or any Approve task in parent Domains if they are set to be available to Sub-Domains).

Approve

Is optional. If specified and set to ‘N’ then the Application is rejected. If this parameter is not specified or is set to ‘Y’ then the Application is approved.

<Notes>

Any free-text notes that should be associated with the approval/rejection.













Example Result:


{

       "success": true

}


Assign a Server to an Environment

This call allows an existing server to be associated with an existing Environment. Once the server is associated with an Environment it can receive Components during a deployment.


NOTE: Servers can be associated with more than one Environment. Assigning a server to an Environment will not disassociate the server from any other Environment with which it may be already associated. To move a server between Environments you must use the API/server/unassign call to remove the server from the original Environment – see next section for more information.

API Call:


http://host/dmadminweb/API/assign/server/server_id/env_id


Where:


Host

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

server_id

Is the identifier of the server to be assigned. 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 the Environment to which the server should be assigned. Either its name, its qualified name (i.e.: with its parent Domain(s) included in dot notation) or its internal ID.


Example Result:


{

       "success": true

}