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

...

HTTP CodeDescription
200Project version already deployed
201Deploy request initiated successfully
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Project not found
500Unexpected internal server error

Example Deploy Request

...

Example 1:

Info
titleAPI URLs

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

We send request by this payload:

Code Block
languagejs
themeEclipse
{
	
        "instanceIds" : [1000013535],
	        "environmentId" :12345 418564,
	"forceDeploy":"false",
	"inputs":
	[
		{
			"code":"RESTART_SEVER",
			"value":"true"
		},
		{
			"code":"COMMENT",
			"value":"Deploying from REST API"
		}
	]        "forceDeploy" : "true",
        "projectVersionId" : 11053771
}


In response, we will receive an array of workflowRequests:

Code Block
languagejs
themeEclipse
{
    "warningMessageisException": nullfalse,
    "warningCoderequestedStartTime": null,
    "workflowRequestspredeployRequestedStartTime": [null,
    "stopOnPkgError": false,
  {  "groupRequestId": null,
    "requestStatus": "READY",
    "packageNamedeploymentStrategy": null,
       "oldWeight": null,
    "folderNamenewWeight": "Human Resources"null,
       "routeRule": null,
    "releaseSnapshotIdfinishDeployment": null,
    "instances": [
       "workflowRequestStatus": "READY", {
            "folderIdinstanceCode": 10001"EBS2",
            "exceptionToWindowcreatedOn": falsenull,
            "releaseDefinitionIdcreatedBy": null,
            "cmsissuesinstanceId": ""3535,
            "workflowRequestId": 12001,208087
        }
    ],
    "projectNameprojectWorkflowId": "ProcessHRRequest"6298861,
    "predeployWorkflowExecId": null,
       "flexField1": null,
    "projectStreamIdflexField3": 10502null,
    "flexField4": null,
      "projectVersionNameflexField2": "1.0.8"null,
       "flexField5": null,
    "requestAllFilesflexField6": falsenull,
    "flexField7": null,
      "projectVersionIdflexField8": 29201null,
      "flexField9": null,
     "environmentIdflexField10": 11210null,
       "allFilesRequested": false,
    "folderRequestIdworkflowVersionOverride": null,
    "force": true,
      "flexFieldscreatedOn": []"2023-01-24T15:40:10.296+0000",
      "createdBy": "fdadmin",
     "folderPathupdatedOn": "FlexDeploy/Human Resources2023-01-24T15:40:10.517+0000",
       "updatedBy": "fdadmin",
    "projectIdversionNumber": 105012,
      "pipelineStageStepExecId": null,
     "requestedBypipelineStageExecId": "fdadmin"null,
    "relDefinitionId": null,
      "requestedStartTimerelSnapshotId": null,
    "triggerType": "MANUAL",
    "folderId": 943036,
    "forceworkflowRequestId": true208087,
    "projectId": 6298858,
      "stopOnPackageErrorenvironmentId": null418564,
       "inputs": [],
    "workflowOverrideVersionprojectStreamId": null6298859,
       "projectVersionId": 11053771,
    "folderVersionIdworkflowId": null481140,
    "workflowType": "DEPLOY",
  }     ]"priority": 1
}