Share via


Gates - Update

Updates the gate for a deployment.

PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/gates/{gateStepId}?api-version=7.1

URI Parameters

Name In Required Type Description
gateStepId
path True

integer (int32)

Gate step Id.

organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1' to use this version of the api.

Request Body

Name Type Description
comment

string

Comment.

gatesToIgnore

string[]

Name of gate to be ignored.

Responses

Name Type Description
200 OK

ReleaseGates

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.release_execute Grants the ability to read and update release artifacts, including folders, releases, release definitions and release environment, and the ability to queue a new release.

Examples

Ignore a gate

Sample request

PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/gates/{gateStepId}?api-version=7.1

{
  "gatesToIgnore": [
    "Query Work Items"
  ],
  "comment": "Ignore gate"
}

Sample response

{
  "id": 112,
  "status": "inProgress",
  "runPlanId": "d941f441-b188-4819-ac83-533cdf2e0c9d",
  "startedOn": "2018-12-11T06:45:56.837Z",
  "lastModifiedOn": "2018-12-11T06:45:57.523Z",
  "ignoredGates": [
    {
      "name": "Query Work Items",
      "lastModifiedOn": "2018-12-11T06:46:02.9243109Z"
    }
  ]
}

Definitions

Name Description
DeploymentJob
GateStatus

Status of release gates.

GateUpdateMetadata
IgnoredGate
Issue
ReleaseGates
ReleaseTask
TaskStatus

Status of release task.

WorkflowTaskReference

DeploymentJob

Name Type Description
job

ReleaseTask

Parent task of all executed tasks.

tasks

ReleaseTask[]

List of executed tasks with in job.

GateStatus

Status of release gates.

Value Description
canceled

The gate execution cancelled.

failed

The gate execution failed.

inProgress

The gate is currently in progress.

none

The gate does not have the status set.

pending

The gate is in pending state.

succeeded

The gate completed successfully.

GateUpdateMetadata

Name Type Description
comment

string

Comment.

gatesToIgnore

string[]

Name of gate to be ignored.

IgnoredGate

Name Type Description
lastModifiedOn

string (date-time)

Gets the date on which gate is last ignored.

name

string

Name of gate ignored.

Issue

Name Type Description
data

object

Issue data.

issueType

string

Issue type, for example error, warning or info.

message

string

Issue message.

ReleaseGates

Name Type Description
deploymentJobs

DeploymentJob[]

Contains the gates job details of each evaluation.

id

integer (int32)

ID of release gates.

ignoredGates

IgnoredGate[]

List of ignored gates.

lastModifiedOn

string (date-time)

Gates last modified time.

runPlanId

string (uuid)

Run plan ID of the gates.

stabilizationCompletedOn

string (date-time)

Gates stabilization completed date and time.

startedOn

string (date-time)

Gates evaluation started time.

status

GateStatus

Status of release gates.

succeedingSince

string (date-time)

Date and time at which all gates executed successfully.

ReleaseTask

Name Type Description
agentName

string

Agent name on which task executed.

finishTime

string (date-time)

Finish time of the release task.

id

integer (int32)

ID of the release task.

issues

Issue[]

List of issues occurred while execution of task.

lineCount

integer (int64)

Number of lines log release task has.

logUrl

string

Log URL of the task.

name

string

Name of the task.

percentComplete

integer (int32)

Task execution complete precent.

rank

integer (int32)

Rank of the release task.

resultCode

string

Result code of the task.

startTime

string (date-time)

ID of the release task.

status

TaskStatus

Status of release task.

task

WorkflowTaskReference

Workflow task reference.

timelineRecordId

string (uuid)

Timeline record ID of the release task.

TaskStatus

Status of release task.

Value Description
canceled

The task execution canceled.

failed

The task execution failed.

failure

The task execution failed.

inProgress

The task is currently in progress.

partiallySucceeded

The task execution partially succeeded.

pending

The task is in pending status.

skipped

The task execution skipped.

succeeded

The task completed successfully.

success

The task completed successfully.

unknown

The task does not have the status set.

WorkflowTaskReference

Name Type Description
id

string (uuid)

Task identifier.

name

string

Name of the task.

version

string

Version of the task.