The following macros are not currently supported in the header:
  • style

deployProject

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 selected in the qualifiedProjectName. The service will return the workflowRequestId which can be used by the getWorkflowRequestStatus call to determine when the workflow is complete.


This page lists examples for Full and Partial Deployment.


API URL

http://host:port/flexdeploy/rest/workflow/deployProject

Full Deployment Sample JSON Request


{
 "authentication": 
 {
    "userId":"fdadmin",
    "password": "password1"
 },

Opening bracket


Authentication section, used on all types of requests.

Required parameters for full deployment.

If deploying with partial deployment, see the Partial deployment example instead.

"instanceCodes":["SOA1","SOA2"],

"environmentCode":"DEV",

"qualifiedProjectName":"/FlexDeploy/folder1/myApp/SimpleProj",

Deploy to the SOA1 and SOA2 instances

Deploy to the DEV environment.

The full path of the FlexDeploy project to run.

Optionally, include any of this information.

Verify that your json is valid; check for trailing commas if you don't include this section.

"projectVersion": "1.2",

"exceptionToWindow":true,

"startTime":"2015-03-16T21:17:52-06:00",

"workflowVersionOverride":"1.8",

"forceDeploy": true,


"inputs":
[
{
"name":"input1","value": "xyz"
},
{
"name":"inp2","value": 123
}
],

"flexFields":
[
{
"name": "Change","value":"101012"
},
{
"name": "field2","value":"123"
}
]

Deploy project version 1.2

Equivalent to the "Exception to Window" checkbox in the UI. Defaults to false.

Time should the deployment start

Version of the workflow to run. Defaults to the currently active version.

boolean equivalent to "Force Deploy" checkbox in the UI. Defaults to false.


List of workflow Input Codes to set

An input named "input1" is being set to "xyz"


An input named "inp2" is being set to 123




List of FlexField Display Names to set


Setting FlexField "Change" to "101012"


Setting FlexField "field2" to "123"

}Closing bracket



Partial Deployment Sample JSON Request


{
 "authentication": 
 {
    "userId":"fdadmin",
    "password": "password1"
 },

Opening bracket


Authentication section, used on all types of requests.

Required parameters for partial deployment.

If deploying with partial deployment, see the full deployment example above.

"instanceCodes":["SOA1","SOA2"],

"environmentCode":"DEV",

"qualifiedProjectName":"/FlexDeploy/folder1/myApp/SimpleProj",

"packageDetails": [
{
"packageName": "1.0.7",
"priority": "1"
},
{
"packageName": "1.0.21",
"priority": "2"
}
]

Deploy to the SOA1 and SOA2 instances

Deploy to the DEV environment.

The full path of the FlexDeploy project to run.

List of packages to deploy

Deploy package 1.0.7, with priority 1.



Deploy package 1.0.21, with priority 2.

Optionally, include any of this information.

Verify that your json is valid; check for trailing commas if you don't include this section.

"exceptionToWindow":true,

"startTime":"2015-03-16T21:17:52-06:00",

"workflowVersionOverride":"1.8",

"forceDeploy": true,


"inputs":
[
{
"name":"input1","value": "xyz"
},
{
"name":"inp2","value": 123
}
],

"flexFields":
[
{
"name": "Change","value":"101012"
},
{
"name": "field2","value":123
}
]

Equivalent to the "Exception to Window" checkbox in the UI. Defaults to false.

Time should the deployment start

Version of the workflow to run. Defaults to the currently active version.

boolean equivalent to "Force Deploy" checkbox in the UI. Defaults to false.


List of workflow Input Codes to set

An input named "input1" is being set to "xyz"


An input named "inp2" is being set to 123



List of FlexFields Display Names to set


Setting FlexField "Change" to "101012"


Setting FlexField "field2" to 123

}Closing bracket

Notice that the packageDetails parameter is included to indicate to FlexDeploy that this request is for a Partial Deploy.

Parameters

Parameter

Required

Type

Description

authentication

Y

Object

See Common Parameters below.

environmentCode

Y

String

This is the environment code, not the environment name that you see on most screens.

instanceCodes

Y

String

The list of Instances where the deployment will occur. Instance codes are all capital letters. Make sure to enter the instance code, not the instance name.

qualifiedProjectName

Y

String

The qualified project name starts with /FlexDeploy and includes any sub folder, then the application and finally the project.

packageDetailsN*String

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

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

Full packageName from build is required for this parameter to be used. The deployment priority is optional; if it is not indicated, then FlexDeploy will deploy the packages in the order they are provided in the JSON request.

forceDeploy

N

Boolean

Values are true or false. Indicates that the deployment should occur even when the projectVersion is already deployed to that instance. Defaults to false.

exceptionToWindow

N

Boolean

Values are true or false. Indicates that the deployment is an exception to the deployment window. Defaults to false.

projectVersion

N

String

The projectVersion to be deployed. If not specified, the most recently built projectVersion will be deployed.

This parameter is ignored for partial deployments. See packageDetails for partial deployments.

startTime

N

DateTime

The time when the deployment will be started.

workflowVersionOverride

N

String

Optionally, the version of the workflow can be overridden.

inputs

N

List

See Common Parameters below.

flexFields

N

List

See Common Parameters below.


Common Parameters

Authentication

The authentication parameter is comprised of 2 fields.

  • userId – a valid user id for FlexDeploy
  • password – the associated password

Inputs

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

FlexFields

Applicable only for deployProject and deployApplication. This is a list of name (Display Name of FlexField)/value pairs for the Flexfields. Not all FlexFields need to be supplied. If a FlexField has a default value or options that are acceptable for the workflow to run, it does not need to be changed. Read more about FlexFields.

The following macros are not currently supported in the footer:
  • style