Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 (version 0) call to determine when the workflow is complete.

API URLs

http://host:port/flexdeploy/rest/v1/project/{id}/execute

Request

Attributes

Required

Type

Description

idYURLThis 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: yyyy-MM-dd'T'HH:mm:ssXXX

workflowVersionOverride

N

String

Optionally, specify a workflow version to override the active workflow version.

inputs

N

Array

This is a list of code/value pairs for the inputs. Not all inputs need to be supplied. If an input has a default value that is acceptable for the Workflow to run, it does not need to be supplied.

flexFields

N

Array

This is a list of the code/value pairs for the Flexfields. Not all FlexFields need to be supplied. If a FlexField has a default value or options that are acceptable for the workflow to run, it does not need to be changed.

Response

Attributes

Type

Description

warningMessageString

Indicates any warning message in the event where the request was successful but no execution was initiated.  

warningCodeStringMatching warning code for the warning message.  

workflowRequests

Array

Array of workflow request objects

Response Codes

HTTP CodeDescription
201Project was found and executed
400Bad request
401Unauthorized
500Unexpected 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 an array of workflowRequests:

{
    "warningCode": null,
    "warningMessage": null,
    "wfrequests": [
        {
            "packageName": null,
            "workflowOverrideVersion": null,
            "stopOnPackageError": null,
            "workflowRequestStatus": "READY",
            "exceptionToWindow": false,
            "projectName": "Util",
            "workflowRequestId": 11819,
            "requestAllFiles": false,
            "projectStreamId": 29802,
            "projectVersionName": "1.0.1",
            "projectVersionId": 29809,
            "environmentId": 11210,
            "folderRequestId": null,
            "folderPath": "FlexDeploy/HR Utils",
            "flexFields": [],
            "projectId": 29801,
            "folderId": 10001,
            "requestedStartTime": null,
            "folderVersionId": null,
            "folderName": "HR Utils",
            "requestedBy": "fdadmin",
            "releaseDefinitionId": null,
            "cmsissues": "",
            "force": true,
            "releaseSnapshotId": null
        }
    ]
}


  • No labels