PipelinesRestClient class

Base class that should be used (derived from) to make requests to VSS REST apis

Extends

Constructors

PipelinesRestClient(IVssRestClientOptions)

Methods

createPipeline(CreatePipelineParameters, string)

Create a pipeline.

getArtifact(string, number, number, string, GetArtifactExpandOptions)

Get a specific artifact from a pipeline run

getLog(string, number, number, number, GetLogExpandOptions)

Get a specific log from a pipeline run

getPipeline(string, number, number)

Gets a pipeline, optionally at the specified version

getRun(string, number, number)

Gets a run for a particular pipeline.

listLogs(string, number, number, GetLogExpandOptions)

Get a list of logs from a pipeline run.

listPipelines(string, string, number, string)

Get a list of pipelines.

listRuns(string, number)

Gets top 10000 runs for a particular pipeline.

preview(RunPipelineParameters, string, number, number)

Queues a dry run of the pipeline and returns an object containing the final yaml.

runPipeline(RunPipelineParameters, string, number, number)

Runs a pipeline.

Constructor Details

PipelinesRestClient(IVssRestClientOptions)

new PipelinesRestClient(options: IVssRestClientOptions)

Parameters

Method Details

createPipeline(CreatePipelineParameters, string)

Create a pipeline.

function createPipeline(inputParameters: CreatePipelineParameters, project: string): Promise<Pipeline>

Parameters

inputParameters
CreatePipelineParameters

Input parameters.

project

string

Project ID or project name

Returns

Promise<Pipeline>

getArtifact(string, number, number, string, GetArtifactExpandOptions)

Get a specific artifact from a pipeline run

function getArtifact(project: string, pipelineId: number, runId: number, artifactName: string, expand?: GetArtifactExpandOptions): Promise<Artifact>

Parameters

project

string

Project ID or project name

pipelineId

number

ID of the pipeline.

runId

number

ID of the run of that pipeline.

artifactName

string

Name of the artifact.

expand
GetArtifactExpandOptions

Expand options. Default is None.

Returns

Promise<Artifact>

getLog(string, number, number, number, GetLogExpandOptions)

Get a specific log from a pipeline run

function getLog(project: string, pipelineId: number, runId: number, logId: number, expand?: GetLogExpandOptions): Promise<Log>

Parameters

project

string

Project ID or project name

pipelineId

number

ID of the pipeline.

runId

number

ID of the run of that pipeline.

logId

number

ID of the log.

expand
GetLogExpandOptions

Expand options. Default is None.

Returns

Promise<Log>

getPipeline(string, number, number)

Gets a pipeline, optionally at the specified version

function getPipeline(project: string, pipelineId: number, pipelineVersion?: number): Promise<Pipeline>

Parameters

project

string

Project ID or project name

pipelineId

number

The pipeline ID

pipelineVersion

number

The pipeline version

Returns

Promise<Pipeline>

getRun(string, number, number)

Gets a run for a particular pipeline.

function getRun(project: string, pipelineId: number, runId: number): Promise<Run>

Parameters

project

string

Project ID or project name

pipelineId

number

The pipeline id

runId

number

The run id

Returns

Promise<Run>

listLogs(string, number, number, GetLogExpandOptions)

Get a list of logs from a pipeline run.

function listLogs(project: string, pipelineId: number, runId: number, expand?: GetLogExpandOptions): Promise<LogCollection>

Parameters

project

string

Project ID or project name

pipelineId

number

ID of the pipeline.

runId

number

ID of the run of that pipeline.

expand
GetLogExpandOptions

Expand options. Default is None.

Returns

Promise<LogCollection>

listPipelines(string, string, number, string)

Get a list of pipelines.

function listPipelines(project: string, orderBy?: string, top?: number, continuationToken?: string): Promise<Pipeline[]>

Parameters

project

string

Project ID or project name

orderBy

string

A sort expression. Defaults to "name asc"

top

number

The maximum number of pipelines to return

continuationToken

string

A continuation token from a previous request, to retrieve the next page of results

Returns

Promise<Pipeline[]>

listRuns(string, number)

Gets top 10000 runs for a particular pipeline.

function listRuns(project: string, pipelineId: number): Promise<Run[]>

Parameters

project

string

Project ID or project name

pipelineId

number

The pipeline id

Returns

Promise<Run[]>

preview(RunPipelineParameters, string, number, number)

Queues a dry run of the pipeline and returns an object containing the final yaml.

function preview(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PreviewRun>

Parameters

runParameters
RunPipelineParameters

Optional additional parameters for this run.

project

string

Project ID or project name

pipelineId

number

The pipeline ID.

pipelineVersion

number

The pipeline version.

Returns

Promise<PreviewRun>

runPipeline(RunPipelineParameters, string, number, number)

Runs a pipeline.

function runPipeline(runParameters: RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<Run>

Parameters

runParameters
RunPipelineParameters

Optional additional parameters for this run.

project

string

Project ID or project name

pipelineId

number

The pipeline ID.

pipelineVersion

number

The pipeline version.

Returns

Promise<Run>