Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This POST service is used to create a new FlexDeploy Release, or update an existing one.  This API returns the release id, which is a required input for some of the other APIs.

Info
titleAPI URL
http://host:port/flexdeploy/rest/release/createOrUpdateRelease

...

Note

The authenticated user must be a member of a group which has FlexDeploy Administrator privileges.


Create New Release Sample JSON Request
Anchor
Full
Full


{

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

Opening bracket

Authentication section, used on all types of requests.

Required parameters for creating or editing a release.

"releaseName": "Demo Release",

"status": "NOTSTARTED",


Create a release named Demo Release

The release is to be in "NOTSTARTED" status. Available statuses are: [NOTSTARTED, STARTED, SUSPENDED, COMPLETED, ABORTED]

Optionally, include any of this information.

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

"description": "This release was created using FlexDeploy's REST API",

"pipelineName": "DemoPipeline",

"scheduledBuildExpression": "",

"releaseProjectDetails":

[{

"qualifiedProjectName": "FlexDeploy/MyFolder/MyApp/MyProject",

"priority": 1,

"streamName": "trunk",

"groupName": "Group1",

"buildEnvironmentCode": "DEV"

},

{

"qualifiedProjectName": "FlexDeploy/MyFolder/MyApp/MyPartialDeployProject",

"priority": 2,

"streamName": "branch1",

"groupName": "Group2",

"requestAllFiles": true

}],

"releaseCMSDetails":

[{

"instanceCode": "SERVICENOW",

"overrideDefaultSettings": true,

"overriddenDefaultConfigurations":

{ "requireChangeTicketForDeployment": true },

"overriddenEnvironmentConfigurations":

[{

"environmentCode": "DEV",

"requireChangeTicketForDeployment": false

},

{

"environmentCode": "TEST",

"requireChangeTicketForDeployment": true

}]

}]

An optional Description of the release.

Use the "DemoPipeline" Pipeline for this release

An optional list of Projects and releaseProjectDetails to associate with the release.

An optional cron expression to setup Scheduled Build for release projects. For example, "0 0 12 * * ?" can be used to perform scheduled build at 12 noon everyday.


Add the Project located at "FlexDeploy/MyFolder/MyApp/MyProject" to the release.

Set the Priority of this project to 1.

Build this project in the trunk Stream.

Put this project in "Group1" on the release.

Using build environment as DEV, if there is only one build environment then this parameter can be omitted.



Add the Project located at "FlexDeploy/MyFolder/MyApp/MyPartialDeployProject" to the release.

Set the Priority of this project to 2.

Build this project in the "branch1" Stream.

Put this project in "Group2" on the release.

Optionally Request All Files when performing a build of a Partial Build project.

Configure a Change Management System to be used on the release.

Use the "SERVICENOW" instance for CMS on this release. Required if using releaseCMSDetails.

Optionally Override the Default Properties from the CMS instance for this release.

Use the overriddenDefaultConfigurations object to update the overridden CMS Default Settings

Specify whether or not to Require a Change Ticket for Deployment of the release projects. (Boolean)

Optionally Override Environment Configurations from the CMS instance for this release.

Override settings for the "DEV" Environment.

Do not Require a Change Ticket for Deployment to this environment. (Boolean)

Override settings for the "TEST" Environment.Require a Change Ticket for Deployment to this environment. (Boolean)



}Closing bracket

  

Parameters

Parameter

Required

Type

Description

authentication

Y

Object

The login information for the user connecting to FlexDeploy.

releaseName

Y

String

The name of the release being created or updated.

status

Y

String

An updated status for the release. Can be [NOTSTARTED, STARTED, SUSPENDED, COMPLETED, ABORTED]

description

N

String

A description to give to the release.

primaryManager

N

String

The username of the FlexDeploy user to assign as the Primary Manager for this release.

secondaryManager

N

String

The username of the FlexDeploy user to assign as the Secondary Manager for this release.

pipelineName

N

String

The name of a pipeline to associate to this release.

scheduledBuildExpressionNStringCron expression for scheduled build of release projects. For example, 0 0 12 * * ?, which will initiate build for projects at noon everyday.
releaseProjectDetailsNArrayAn array of projects to be associated to the release.
  qualifiedProjectNameY*StringThe full path within FlexDeploy to a project.
  priorityNIntegerThe deploy priority for this project.
  streamNameNStringThe SCM stream to use when building this project. Defaults to the main stream.
  groupNameNString

A group on the release to put the project in.

  requestAllFilesNBooleanShould the project use all files? If true, don't specify packageName. If false, specify packageName.
  packageNameNStringThe name of the package to be built and deployed. Required if not using all files.
    buildEnvironmentCodeNStringBuild environment code, must be associated with project's build instance. If omitted and only one environment is associated with project's build instance then it will be selected automatically.
releaseCMSDetailsNArrayAn array of CMS properties to be configured on the release.
  instanceCodeY*StringThe instance code of a valid CMS instance
  overrideDefaultSettingsNBooleanOverride the CMS instance's configuration.
  overriddenDefaultConfigurationsY*Object

An object containing the "Default" properties for CMS on the release.

    requireChangeTicketForDeploymentY*BooleanSet this to true to require a change ticket for all deployments.
  overriddenEnvironmentConfigurationsNList

A list of environments and properties to override on this release.

    environmentCodeY*String

The environment code of a valid instance being used in this release.

    requireChangeTicketForDeploymentY*BooleanSet this to true to require a change ticket for deployments to this environment.


Info

Properties marked with an asterisk (*) are only required when using a property that contains them. For example, qualifiedProjectName is only required if releaseProjectDetails is used.

...