Preview - Preview
Queues a dry run of the pipeline and returns an object containing the final yaml.
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/preview?api-version=7.0
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/preview?pipelineVersion={pipelineVersion}&api-version=7.0
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.0' 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
accessToken
Personal access token. Use any value for the user name and the token as the password.
Type:
basic
Definitions
Name | Description |
---|---|
Build |
|
Container |
|
Package |
|
Pipeline |
|
Preview |
|
Repository |
|
Run |
Settings which influence pipeline runs. |
Run |
|
Variable |
BuildResourceParameters
Name | Type | Description |
---|---|---|
version |
string |
ContainerResourceParameters
Name | Type | Description |
---|---|---|
version |
string |
PackageResourceParameters
Name | Type | Description |
---|---|---|
version |
string |
PipelineResourceParameters
Name | Type | Description |
---|---|---|
version |
string |
PreviewRun
Name | Type | Description |
---|---|---|
finalYaml |
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 |
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. |
RunResourcesParameters
Name | Type | Description |
---|---|---|
builds |
<string,
Build |
|
containers |
<string,
Container |
|
packages |
<string,
Package |
|
pipelines |
<string,
Pipeline |
|
repositories |
<string,
Repository |
Variable
Name | Type | Description |
---|---|---|
isSecret |
boolean |
|
value |
string |