This POST service will perform the same action found on the Deployment Request Form off the project screen. It will initiate a request to deploy the project specified with the project Id. The service will return the workflowRequestId which workflow request. Workflow request id from return data can be used by the getWorkflowRequestStatus call with Workflow Request API to determine when the workflow execution is complete.
Info |
---|
|
http://host:port/flexdeploy/rest/v1/project/{Id}/deploy |
...
Attribute | Required | Type | Description |
---|
code | Y | String | The code of the FlexField |
value | N | String | The value of the FlexField |
...
PackageInfo
Attribute | Required | Type | Description |
---|
packageName | N | String | The name of the package to deploy. If blank, all files will be assumed. |
priority | N | Integer | The priority of the package. If it is not indicated, then FlexDeploy will deploy the packages in the order they are provided in the JSON request. |
projectVersionId | Y* | Long | The id of the project version to deploy. This parameter is not required if useLatestPackageVersion is true. |
useLatestPackageVersion | N | Boolean | Uses the most recent package version. Defaults to false. |
Response
Attribute | Type | Description | workflowRequestId
---|
warningMessage | String | Returns the workflow request id that was just submitted. | Indicates any warning message in the event where the request was successful but no new deployment was initiated. For example: Project Version is already deployed and force deploy wasn't specified |
warningCode | String | Matching warning code for the warning message. |
workflowRequests | Array | Array of workflow request objects |
Response Codes
HTTP Code | Description |
---|
200 | Project version already deployed |
201 |
Project was built Deploy request initiated successfully |
400 | Bad request |
401 |
Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Project not found |
500 | Unexpected internal server error |
Example Deploy Request
We can deploy a project with Id 10004 with the following request:
Info |
---|
|
http://host:port/flexdeploy/rest/v1/project/10004/deploy |
Code Block |
---|
|
{
"instanceIds":[100001],
"environmentId":12345,
"forceDeploy":"false",
"inputs":
[
{
"code":"RESTART_SEVER",
"value":"true"
},
{
"code":"COMMENT",
"value":"Deploying from REST API"
}
]
} |
In response, we will receive the workflowRequestId:12100
an array of workflowRequests:
Code Block |
---|
|
{
"warningMessage": null,
"warningCode": null,
"workflowRequests": [
{
"packageName": null,
"folderName": "Human Resources",
"releaseSnapshotId": null,
"workflowRequestStatus": "READY",
"folderId": 10001,
"exceptionToWindow": false,
"releaseDefinitionId": null,
"cmsissues": "",
"workflowRequestId": 12001,
"projectName": "ProcessHRRequest",
"projectStreamId": 10502,
"projectVersionName": "1.0.8",
"requestAllFiles": false,
"projectVersionId": 29201,
"environmentId": 11210,
"folderRequestId": null,
"flexFields": [],
"folderPath": "FlexDeploy/Human Resources",
"projectId": 10501,
"requestedBy": "fdadmin",
"requestedStartTime": null,
"force": true,
"stopOnPackageError": null,
"workflowOverrideVersion": null,
"folderVersionId": null
}
]
} |