DeploymentService

Deployment management

POST /deployment/ Creates the deployment task.
GET /deployment/dictionary Get the effective dictionary for an environment, optionally filtered by application and container.
GET /deployment/exists Returns whether or not a udm.Version of the udm.Application that is passed in is already deployed to the udm.Environment .
POST /deployment/generate/all Generates all deployeds for the given deployment.
POST /deployment/generate/selected Generates only the deployeds for the given deployables in the deployment.
POST /deployment/generate/selected/deployables Generates only the deployeds for the given deployables in the deployment.
POST /deployment/generate/single Generates a deployed for the given deployable to the given container in the deployment.
POST /deployment/prepare/deployeds Prepares all the deployeds for the given deployment.
GET /deployment/prepare/initial Prepares an initial deployment.
GET /deployment/prepare/undeploy Prepares an undeployment.
GET /deployment/prepare/update Prepares an update deployment.
POST /deployment/preview Calculate the steps that XL Deploy will execute for the given deployment.
POST /deployment/preview/{stepNr} Get details on a step in a deployment, used after
POST /deployment/previewblock Calculate the plan that XL Deploy will execute for the given deployment.
POST /deployment/previewblock/{blockId}/{stepNr} Get details on a step in a step block.
POST /deployment/rollback/{taskid} Rollback a STOPPED or EXECUTED task.
POST /deployment/validate Validates the generated deployment.

POST /deployment/

Creates the deployment task.
Permissions
deploy#initial - for initial deployments
deploy#upgrade - for upgrades
deploy#remove - for undeployments
Parameters
Request body application/xml Deployment The fully prepared Deployment parameter object.
Response body
String - a reference to a Task ID that can be executed by the TaskService .
Content type: application/xml

GET /deployment/dictionary

Get the effective dictionary for an environment, optionally filtered by application and container. This will return the dictionary that is used when deploying to a specific environment. If an application is passed, the dictionary is filtered to apply only to deployments of that application. If a container is passed, the dictionary is filtered to apply only to deployeds pointing to that container in the environment.
Parameters
Query environment String The ID of the environment
Query application String The ID of the application (optional, can be null)
Query container String The ID of the container (optional, can be null)
Response body
Map of String, String - the entries of the dictionary as it applies to a deployment to that environment
Content type: application/xml

GET /deployment/exists

Returns whether or not a udm.Version of the udm.Application that is passed in is already deployed to the udm.Environment .
Parameters
Query application String The ID of the udm.Application .
Query environment String The ID of the udm.Environment .
Response body
boolean - true if there exists a deployed version of the application on the environment, false otherwise.
Content type: application/xml

POST /deployment/generate/all

Generates all deployeds for the given deployment.
Permissions
deploy#initial
Parameters
Request body application/xml Deployment The prepared Deployment parameter object.
Response body
Deployment - An updated Deployment parameter object.
Content type: application/xml

POST /deployment/generate/selected

Generates only the deployeds for the given deployables in the deployment.

Try to generate deployeds from each of the deployables to all the matching Containers in the Environment of the Deployment parameter object.

Permissions
deploy#initial
Parameters
Query deployables List of String The list of IDs of deployables to generate the deployeds for.
Request body application/xml Deployment The prepared Deployment parameter object
Response body
Deployment - An updated Deployment parameter object.
Content type: application/xml

POST /deployment/generate/selected/deployables

Generates only the deployeds for the given deployables in the deployment.

Try to generate deployeds from each of the deployables to all the matching Containers in the Environment of the Deployment parameter object.

This request is same as /deployment/generate/selected but does not use URL query parameters avoiding it becoming too long.

Permissions
deploy#initial
Parameters
Request body application/xml SelectedDeployment The prepared Deployment parameter object with list of IDs of deployables to generate the deployeds for.
Response body
Deployment - An updated Deployment parameter object.
Content type: application/xml

POST /deployment/generate/single

Generates a deployed for the given deployable to the given container in the deployment.

The deployed should be of the given type (which is optional)

Permissions
deploy#initial
Parameters
Query deployable String The ID of the deployable to generate a deployed for
Query container String The ID of the container to generate a deployed to
Query deployedtype Type (Optional) The type of the deployed to generate
Request body application/xml Deployment The prepared Deployment parameter object
Response body
Deployment - An updated Deployment parameter object.
Content type: application/xml

POST /deployment/prepare/deployeds

Prepares all the deployeds for the given deployment. This will keep any previous deployeds present in the deployment object that are already present, unless they cannot be deployed with regards to their tags. It will add all the deployeds that are still missing.

Also filters out the deployeds that do not have any source attached anymore (deployables that were previously present).

Permissions
deploy#initial
Parameters
Request body application/xml Deployment The prepared Deployment parameter object
Response body
Deployment - An updated Deployment parameter object.
Content type: application/xml

GET /deployment/prepare/initial

Prepares an initial deployment.
Permissions
deploy#initial
Parameters
Query version String The ID of the udm.Version that is the source of the deployment.
Query environment String The ID of the udm.Environment that is the target of the deployment.
Response body
Deployment - A new Deployment object to which you can add deployeds.
Content type: application/xml

GET /deployment/prepare/undeploy

Prepares an undeployment.
Permissions
deploy#undeploy
Parameters
Query deployedApplication String The ID of the udm.DeployedApplication that is to be undeployed.
Response body
Deployment - A new Deployment object which contains no deployeds (ie. all deployeds of the previous deployment will be deleted).
Content type: application/xml

GET /deployment/prepare/update

Prepares an update deployment.
Permissions
deploy#upgrade
Parameters
Query version String The ID of the new udm.Version that is the source of the deployment.
Query deployedApplication String The ID of the udm.DeployedApplication that is to be updated.
Response body
Deployment - A new Deployment object which contains the updated deployeds.
Content type: application/xml

POST /deployment/preview

Calculate the steps that XL Deploy will execute for the given deployment. Note: The steps returned here are not a task yet, and as such can not be skipped or re-ordered.
Permissions
deploy#initial - for initial deployments
deploy#upgrade - for upgrades
deploy#remove - for undeployments
Parameters
Request body application/xml Deployment The deployment to generate the steps for.
Response body
TaskPreview - A List of generated steps.
Content type: application/xml

POST /deployment/preview/{stepNr}

Get details on a step in a deployment, used after
Response body
StepState
Content type: application/xml

POST /deployment/previewblock

Calculate the plan that XL Deploy will execute for the given deployment. A plan consists of one or more nested blocks. Blocks can be sequential, parallel, or a block containing steps. Note: The block returned is not a task yet, and as such can not be skipped or re-ordered.
Permissions
deploy#initial - for initial deployments
deploy#upgrade - for upgrades
deploy#remove - for undeployments
Parameters
Request body application/xml Deployment The deployment to generate the block for.
Response body
TaskPreviewBlock - The block.
Content type: application/xml

POST /deployment/previewblock/{blockId}/{stepNr}

Get details on a step in a step block.
Permissions
deploy#initial - for initial deployments
deploy#upgrade - for upgrades
deploy#remove - for undeployments
task#preview_step - to see all details about a step
Parameters
Request body application/xml Deployment The deployment to generate the block for.
Path blockId String The id of the step block to query the steps for.
Path stepNr int The number of the step to retrieve.
Response body
StepState - The step.
Content type: application/xml

POST /deployment/rollback/{taskid}

Rollback a STOPPED or EXECUTED task. Reverting the deployment to the previous state. The task will be set to CANCELLED when it was STOPPED , and DONE when it was EXECUTED .
Parameters
Path taskid String the ID of the task
Response body
String - the ID of the new task.
Content type: application/xml

POST /deployment/validate

Validates the generated deployment. Checks whether all the deployeds that are in the deployment are valid.
Parameters
Request body application/xml Deployment The deployment to validate.
Response body
Deployment - The validated deployment.
Content type: application/xml