deployProject (version 0)

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 (version 0) call to determine when the workflow is complete.

This page lists examples for Full and deployProject (version 0)#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": [
{

   "code":"input1","value":"xyz"

},
{

   "code":"inp2","value":123

}],


"flexFields": [
{

   "code":"Change","value":"101012"

},
{

   "code":"field2","value":"123"

}],

"changeTicket":"REQ0010015"

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 Codes to set


Setting FlexField "Change" to "101012"


Setting FlexField "field2" to "123"


Change Ticket number for configured Change Management System

Setting the value of the Change Ticket to "REQ0010015"

}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 full deployment, see the full deployment example above.

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

"environmentCode":"DEV",

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

"packageDetails": [
{

   "packageName":"Jul_2017",
   "priority":"1",

       "useLatestPackageVersion" : "true"

},
{

   "packageName":"Jun_2017",
   "priority": "2",

       "projectVersion" : "1.0.21"

}]

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 Jul_2017, with priority 1.

useLatestPackageVersion will make sure that latest version of the Package Jul_2017 is deployed.




Deploy package Jun_2017 with version 1.0.21, with priority 2.

Package Name is not unique, so projectVersion or useLatestPackageVersion is necessary.

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

   "code":"input1","value":"xyz"

},
{

   "code":"inp2","value":123

}],


"flexFields": [
{

   "code":"Change","value":"101012"

},
{

   "code":"field2","value":123

}],


"changeTicket":"REQ0010015"

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 Codes to set


Setting FlexField "Change" to "101012"


Setting FlexField "field2" to 123



Change Ticket number for configured Change Management System

Setting the value of the Change Ticket to "REQ0010015"

}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

Array

See Common Parameters below.

flexFields

N

Array

See Common Parameters below.

changeTicketN*StringTicket number for the given deployment, using the configured Change Management System.

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 code/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

This is a list of the code/value pairs for the Flexfields (not the Display Name). 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.

Example Deploy Request

{
   "authentication":
   {
      "userId":"chandresh",
      "password":"welcome1"
   },
   "instanceCodes":["ADF1213"],
   "environmentCode":"QA",
   "qualifiedProjectName":"/FlexDeploy/ADF/HR/FusionHRDemo",
   "forceDeploy":"false",
   "inputs":
   [
      {
         "code":"RESTART_SERVER",
         "value":"true"
      },
      {
         "code":"COMMENT",
         "value":"Deploying from REST API"
      }
   ]
}
The following macros are not currently supported in the footer:
  • style