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 workflow request. Workflow request id from return data can be used with Workflow Request API to determine when the execution is complete.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/project/{Id}/deploy |
...
Attribute | Type | Description |
---|---|---|
warningMessage | String | 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 |
...
HTTP Code | Description |
---|---|
200 | Project version already deployed |
201 | Deploy request initiated successfully |
400 | Bad request |
401 | 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:
Example 1:
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 an array of workflowRequests:
...
language | js |
---|---|
theme | Eclipse |
...
We can deploy a project with Id 6298858 with the following request:
Example
...
1:
Info | ||
---|---|---|
| ||
We send request by this payload:
...