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 6 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 the workflowRequestId which can be used by the getWorkflowRequestStatus call to determine the workflow is complete.

API URL

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

Request

ParameterRequiredTypeDescription
environmentIdYLongThis is the environment id, not the environment name that is seen on most screens.
instanceIdYLongThe 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.
projectIdYLongThe Id of the project to deploy.
packageDetailsN*List<PackageInfo>

This is required for partial deployments, but not for full deployments.

Included to indicate what should be deployed in a partial deployment.

See more info on PackageInfo below.

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.
projectVersionIdNLongThe id of the project version to be deployed. If not specified, the most recently built projectVersionId will be deployed.
startTimeNDateTimeThe time when the deployment will be started.
workflowVersionOverrideNStringOptionally, the version of the workflow can be overridden.
inputs NArraySee Common Parameters below.
flexFieldsNArraySee Common Parameters below.
changeNumberN*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

PackageInfo

AttributeRequiredTypeDescription
packageNameNStringThe name of the package to deploy. If blank, all files will be assumed.
priorityNIntegerThe 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.
projectVersionIdY*LongThe id of the project version to deploy. This parameter is not required if useLatestPackageVersion is true.
useLatestPackageVersionNBooleanUses the most recent package version. Defaults to false.

Response

AttributeTypeDescription
workflowRequestIdStringReturns the workflow request id that was just submitted.

Response Codes

HTTP CodeDescription
201Project was built successfully
400Bad request
401Unauthorized
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 the workflowRequestId:

12100

  • No labels