Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleAPI URL

http://host:port/flexdeploy/rest/v1/project/{Id}/deploy

...

AttributeTypeDescription
warningMessageString

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

warningCodeStringMatching warning code for the warning message.  
workflowRequestsArray

Array of workflow request objects

...

We can deploy a project with Id 10004 with the following request:

Example 1:

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/project/10004/deploy

...

Code Block
languagejs
themeEclipse
{
    "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
        }
    ]
}


We can deploy a project with Id 6298858 with the following request:

Example 2:

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/project/6298858/deploy

We send request by this payload:

Code Block
languagejs
themeEclipse
{
        "instanceIds" : [3535],
        "environmentId" : 418564,
        "forceDeploy" : "true",
        "projectVersionId" : 11053771
}


In response, we will receive an array of workflowRequests:

Code Block
languagejs
themeEclipse
{
    "isException": false,
    "requestedStartTime": null,
    "predeployRequestedStartTime": null,
    "stopOnPkgError": false,
    "groupRequestId": null,
    "requestStatus": "READY",
    "deploymentStrategy": null,
    "oldWeight": null,
    "newWeight": null,
    "routeRule": null,
    "finishDeployment": null,
    "instances": [
        {
            "instanceCode": "EBS2",
            "createdOn": null,
            "createdBy": null,
            "instanceId": 3535,
            "workflowRequestId": 208087
        }
    ],
    "projectWorkflowId": 6298861,
    "predeployWorkflowExecId": null,
    "flexField1": null,
    "flexField3": null,
    "flexField4": null,
    "flexField2": null,
    "flexField5": null,
    "flexField6": null,
    "flexField7": null,
    "flexField8": null,
    "flexField9": null,
    "flexField10": null,
    "allFilesRequested": false,
    "workflowVersionOverride": null,
    "force": true,
    "createdOn": "2023-01-24T15:40:10.296+0000",
    "createdBy": "fdadmin",
    "updatedOn": "2023-01-24T15:40:10.517+0000",
    "updatedBy": "fdadmin",
    "versionNumber": 2,
    "pipelineStageStepExecId": null,
    "pipelineStageExecId": null,
    "relDefinitionId": null,
    "relSnapshotId": null,
    "triggerType": "MANUAL",
    "folderId": 943036,
    "workflowRequestId": 208087,
    "projectId": 6298858,
    "environmentId": 418564,
    "inputs": [],
    "projectStreamId": 6298859,
    "projectVersionId": 11053771,
    "workflowId": 481140,
    "workflowType": "DEPLOY",
    "priority": 1
}