This POST service will perform the same action found on the Execute Utility Project Request Form off the project screen. It will initiate a request to execute the project with the Project ID specified in the URL. The service will return the workflowRequestId
which can be used by the getWorkflowRequestStatus
call to determine when the workflow is complete.
API URLs
http://host:port/flexdeploy/rest/v1/project/{id}/execute
Request
Attributes | Required | Type | Description |
---|---|---|---|
id | Y | URL | This is a URL path parameter for the id which is used to execute a project. |
environmentId | Y | Long | The Id of the Environment the project should be executed in. |
instanceIds | N | List<Long> | A list of Instance Ids that the project should be executed on. If not supplied, the project will execute on the instances that are associated to the utility project. |
exceptionToWindow | N | Boolean | Values are true or false. Indicates that the deployment is an exception to the deployment window. Defaults to false. |
startTime | N | DateTime | The time when the deployment will be started. The expected time format is: |
workflowVersionOverride | N | String | Optionally, specify a workflow version to override the active workflow version. |
inputs | N | Array | This is a list of |
flexFields | N | Array | This is a list of the |
Response
Attributes | Type | Description |
---|---|---|
workflowRequestId | String | Returns just String for workflow request id that was submitted. |
Response Codes
HTTP Code | Description |
---|---|
201 | Project was found and executed |
400 | Bad request |
401 | Unauthorized |
500 | Unexpected internal server error |
Example
We can execute a Utility Project with Id 10004 with this request:
URL: http://host:port/flexdeploy/rest/v1/project/10004/execute
{ "environmentId":10045, "instanceIds":[10044], "exceptionToWindow":false, "startTime":"2018-07-20T11:31:06Z", "workflowVersionOverride":"1.0", "inputs":[ {"code":"INPUT1","value":"Test"}, {"code":"INPUT2","value":"1234"} ], "flexFields":[ {"code":"FLEXFIELD1","value":"123"}, {"code":"FLEXFIELD2","value":"abc"} ] }
In response, we will receive the workflowRequestId:
10001