Runs - Run Pipeline
Runs a pipeline.
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=7.1
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?pipelineVersion={pipelineVersion}&api-version=7.1
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
|
pipeline
|
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 '7.1' to use this version of the api. |
|
pipeline
|
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 |
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 |
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.build_execute | Grants the ability to access build artifacts, including build results, definitions, and requests, and the ability to queue a build, update build properties, and the ability to receive notifications about build events via service hooks. |
Definitions
| Name | Description |
|---|---|
|
Build |
|
| Container | |
|
Container |
|
|
Container |
|
|
Package |
|
|
Pipeline |
A reference to a Pipeline. |
|
Pipeline |
|
|
Pipeline |
|
|
Reference |
The class to represent a collection of REST reference links. |
| Repository | |
|
Repository |
|
|
Repository |
|
|
Repository |
|
| Run | |
|
Run |
Settings which influence pipeline runs. |
|
Run |
|
|
Run |
|
|
Run |
|
|
Run |
|
| Variable |
BuildResourceParameters
| Name | Type | Description |
|---|---|---|
| version |
string |
Container
| Name | Type | Description |
|---|---|---|
| environment |
object |
|
| image |
string |
|
| mapDockerSocket |
boolean |
|
| options |
string |
|
| ports |
string[] |
|
| volumes |
string[] |
ContainerResource
| Name | Type | Description |
|---|---|---|
| container |
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 (int32) |
Pipeline ID |
| name |
string |
Pipeline name |
| revision |
integer (int32) |
Revision number |
| url |
string |
PipelineResource
| Name | Type | Description |
|---|---|---|
| pipeline |
A reference to a Pipeline. |
|
| version |
string |
PipelineResourceParameters
| Name | Type | Description |
|---|---|---|
| version |
string |
ReferenceLinks
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 |
RepositoryResource
| Name | Type | Description |
|---|---|---|
| refName |
string |
|
| 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
| Value | Description |
|---|---|
| unknown | |
| gitHub | |
| azureReposGit | |
| gitHubEnterprise | |
| azureReposGitHyphenated |
Run
| Name | Type | Description |
|---|---|---|
| _links |
The class to represent a collection of REST reference links. |
|
| createdDate |
string (date-time) |
|
| finalYaml |
string |
|
| finishedDate |
string (date-time) |
|
| id |
integer (int32) |
|
| name |
string |
|
| pipeline |
A reference to a Pipeline. |
|
| resources | ||
| result | ||
| state | ||
| templateParameters |
object |
|
| 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 |
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 |
|---|---|---|
| containers |
<string,
Container |
|
| pipelines |
<string,
Pipeline |
|
| repositories |
<string,
Repository |
RunResourcesParameters
| Name | Type | Description |
|---|---|---|
| builds |
<string,
Build |
|
| containers |
<string,
Container |
|
| packages |
<string,
Package |
|
| pipelines |
<string,
Pipeline |
|
| repositories |
<string,
Repository |
RunResult
| Value | Description |
|---|---|
| unknown | |
| succeeded | |
| failed | |
| canceled |
RunState
| Value | Description |
|---|---|
| unknown | |
| inProgress | |
| canceling | |
| completed |
Variable
| Name | Type | Description |
|---|---|---|
| isSecret |
boolean |
|
| value |
string |