Runs - Run Pipeline

Runs a pipeline.

POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=6.0-preview.1
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?pipelineVersion={pipelineVersion}&api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

pipelineId
path True

integer

int32

The pipeline ID.

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 '6.0-preview.1' to use this version of the api.

pipelineVersion
query

integer

int32

The pipeline version.

Request Body

Name Type Description
previewRun

boolean

If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.

resources

RunResourcesParameters

The resources the run requires.

stagesToSkip

string[]

templateParameters

object

variables

<string,  Variable>

yamlOverride

string

If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.

Responses

Name Type Description
200 OK

Run

successful operation

Security

accessToken

Personal access token. Use any value for the user name and the token as the password.

Type: basic

Definitions

Name Description
BuildResourceParameters
ContainerResourceParameters
PackageResourceParameters
PipelineReference

A reference to a Pipeline.

PipelineResourceParameters
ReferenceLinks

The class to represent a collection of REST reference links.

Repository
RepositoryResource
RepositoryResourceParameters
RepositoryType
Run
RunPipelineParameters

Settings which influence pipeline runs.

RunResources
RunResourcesParameters
RunResult
RunState
Variable

BuildResourceParameters

Name Type Description
version

string

ContainerResourceParameters

Name Type Description
version

string

PackageResourceParameters

Name Type Description
version

string

PipelineReference

A reference to a Pipeline.

Name Type Description
folder

string

Pipeline folder

id

integer

Pipeline ID

name

string

Pipeline name

revision

integer

Revision number

url

string

PipelineResourceParameters

Name Type Description
version

string

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

Repository

Name Type Description
type

RepositoryType

RepositoryResource

Name Type Description
refName

string

repository

Repository

version

string

RepositoryResourceParameters

Name Type Description
refName

string

token

string

This is the security token to use when connecting to the repository.

tokenType

string

Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.

version

string

RepositoryType

Name Type Description
azureReposGit

string

azureReposGitHyphenated

string

gitHub

string

unknown

string

Run

Name Type Description
_links

ReferenceLinks

The class to represent a collection of REST reference links.

createdDate

string

finalYaml

string

finishedDate

string

id

integer

name

string

pipeline

PipelineReference

A reference to a Pipeline.

resources

RunResources

result

RunResult

state

RunState

url

string

variables

<string,  Variable>

RunPipelineParameters

Settings which influence pipeline runs.

Name Type Description
previewRun

boolean

If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.

resources

RunResourcesParameters

The resources the run requires.

stagesToSkip

string[]

templateParameters

object

variables

<string,  Variable>

yamlOverride

string

If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.

RunResources

Name Type Description
repositories

<string,  RepositoryResource>

RunResourcesParameters

Name Type Description
builds

<string,  BuildResourceParameters>

containers

<string,  ContainerResourceParameters>

packages

<string,  PackageResourceParameters>

pipelines

<string,  PipelineResourceParameters>

repositories

<string,  RepositoryResourceParameters>

RunResult

Name Type Description
canceled

string

failed

string

succeeded

string

unknown

string

RunState

Name Type Description
canceling

string

completed

string

inProgress

string

unknown

string

Variable

Name Type Description
isSecret

boolean

value

string