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 20 Next »

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.

API URL

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

Request

ParameterRequiredTypeDescriptio
environmentIdYLongThis is the environment id, not the environment name that is seen on most screens.
instanceIdsNArray of Long

The list of instances where the deployment will occur. Make sure to enter the instance id, not the instance name that is seen on most screens.

If not provided, all deploy instances configured for Project will be used for deployment.

projectIdYLongThe Id of the project to deploy.
forceDeployNBooleanValues are true or false. Indicates that the deployment should occur even when the projectVersionId is already deployed to that instance. Defaults to false.
exceptionToWindowNBooleanValues are true or false. Indicates that the deployment is an exception to the deployment window. Defaults to false.
projectVersionIdYLongThe id of the project version to be deployed. 
startTimeNString

The time when the deployment will be started. Format should yyyy-MM-dd'T'HH:mm:ssXXX.

For example, 2019-03-16T21:17:52-06:00

workflowVersionOverrideNStringOptionally, the version of the workflow can be overridden.
inputs NArraySee Common Parameters below.
flexFieldsNArraySee Common Parameters below.
changeTicketsNArray of StringTicket number for the given deployment, using the configured Change Management System.

Input

This is a list of code/value pairs for the workflow 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.

AttributeRequiredTypeDescription
codeYStringThe code of the input
valueNStringThe value of the input

FlexField

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

AttributeRequiredTypeDescription
codeYStringThe code of the FlexField
valueNStringThe value of the FlexField

Response

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

Response Codes

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

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

API URLs

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

{
	"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:

{
    "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
        }
    ]
}
  • No labels