Versions Compared

Key

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

This POST service will perform the same action found on the Release Screen. This is used to complete an approval gate without having to log into the FlexDeploy serverapprove or reject an External Approval Gate for a pipeline stage execution. 

The pipeline execution for the release is located by using the given snapshotName, or the most recent snapshot if not provided.  The pipeline stage execution from within the pipeline execution is determined by finding the latest execution for the given environmentCode and gateName.  An error will be returned if the stage executing in not currently in the gates or if the gateName provided is not pending an approval.

The provided change tickets are uploaded to the stage execution, and the gate is approved or rejected based on the status provided.

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


Note

The authenticated user must be a member of the pipeline role assigned to gate in order to approve or reject it.


Complete External Gate 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",

"gateName": "MyExternalGate",

"environmentCode": "DEV",

"changeTicket": "CHG0030153",

"status": "APPROVED",

Complete the gate on the release named Demo Release

The Gate we want to complete is named "MyExternalGate".

The gate we're approving is in the DEV Environment.

The Change Ticket(s) associated with the gate being approved.  Mulitiple tickets can be provided, delimited by coma.

The Status to give to the gate. Options are [PENDING, APPROVED, REJECTED, VOIDED]

Optionally, include any of this information.

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

"snapshotName": "09-24-2017 14:26:47"The name of the Snapshot we want to approve is "09-24-2017 14:26:47". If this is not specified, FlexDeploy will use the latest running snapshot.
}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 containing the gate we want to complete.

gateName

Y

String

The name of the gate to update the status on.

snapshotName

N

String

The name of the executing snapshot that is waiting on the gate. If not provided, latest Stage Execution will be used.

changeTicket

Y

String

The change ticket associated with this approval.

environmentCode

Y

String

The code for the environment the gate is executing in.

status

Y

String

The updated status to apply to the gate. Options are [APPROVED, REJECTED]

Example Request

Code Block
languagejs
themeRDark
{
   "authentication": 
    {
       "userId": "fdadmin",
       "password": "welcome1"
    },
   "releaseName": "Release 3",
   "environmentCode": "TEST",
   "gateName": "ServiceNow Approval",
   "changeTicket": "CHG0030153",
   "status" : "APPROVED"
}