Redeploy Deployment

Re-deploys an existing deployment.

The deployment resources to re-deploy can be restricted by using the properties resourceIds or resourceNames. If no deployment resources to re-deploy are passed then all existing resources of the given deployment are re-deployed.

Security Consideration

Deployments can contain custom code in form of scripts or EL expressions to customize process behavior. This may be abused for remote execution of arbitrary code. See the section on security considerations for custom code in the user guide for details.

Method

POST /deployment/{id}/redeploy

Parameters

Path Parameters

Name Description
id The id of the deployment to re-deploy.

Request Body

A JSON object with the following properties:

Name Description
resourceIds A list of deployment resource ids to re-deploy.
resourceNames A list of deployment resource names to re-deploy.
source Sets the source of the deployment.

Result

A JSON object corresponding to the Deployment interface in the engine. Its properties are as follows:

Name Value Description
links List Link to the newly created deployment with method, href and rel.
id String The id of the deployment.
name String The name of the deployment.
source String The source of the deployment.
deploymentTime String The time when the deployment was created.

Response Codes

Code Media type Description
200 application/json Request successful.
404 application/json Deployment or a deployment resource for the given deployment does not exist. See the Introduction for the error response format.

Example

Request

POST /deployment/anDeploymentId/redeploy

Request Body:

{
  "resourceIds": [ "aResourceId" ],
  "resourceNames": [ "aResourceName" ],
  "source" : "cockpit"
}

Response

Status 200.

{
  "links": [
    {
      "method": "GET",
      "href": "http://localhost:38080/rest-test/deployment/anotherDeploymentId",
      "rel": "self"
    }
  ],
  "id": "anotherDeploymentId",
  "name": "aName",
  "source": "cockpit",
  "deploymentTime": "2015-10-13T13:59:43"
}

On this Page: