ReleaseRestClient class

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

Extends

Constructors

ReleaseRestClient(IVssRestClientOptions)

Properties

RESOURCE_AREA_ID

Methods

addDefinitionTag(string, number, string)

Adds a tag to a definition

addDefinitionTags(string[], string, number)

Adds multiple tags to a definition

addReleaseTag(string, number, string)

Adds a tag to a releaseId

addReleaseTags(string[], string, number)

Adds tag to a release

createDefinitionEnvironmentTemplate(ReleaseDefinitionEnvironmentTemplate, string)

Creates a definition environment template

createFavorites(FavoriteItem[], string, string, string)
createFolder(Folder, string, string)

Creates a new folder.

createRelease(ReleaseStartMetadata, string)

Create a release.

createReleaseDefinition(ReleaseDefinition, string)

Create a release definition

deleteDefinitionEnvironmentTemplate(string, string)

Delete a definition environment template

deleteDefinitionTag(string, number, string)

Deletes a tag from a definition

deleteFavorites(string, string, string, string)
deleteFolder(string, string)

Deletes a definition folder for given folder name and path and all it's existing definitions.

deleteRelease(string, number, string)

Soft delete a release

deleteReleaseDefinition(string, number, string, boolean)

Delete a release definition.

deleteReleaseTag(string, number, string)

Deletes a tag from a release

getAgentArtifactDefinitions(string, number)

Returns the artifact details that automation agent requires

getApproval(string, number, boolean)

Get an approval.

getApprovalHistory(string, number)

Get approval history.

getApprovals(string, string, ApprovalStatus, number[], ApprovalType, number, number, ReleaseQueryOrder, boolean)

Get a list of approvals

getArtifactTypeDefinitions(string)
getArtifactVersions(string, number)
getArtifactVersionsForSources(Artifact[], string)
getAutoTriggerIssues(string, string, string, string)
getDefinitionEnvironments(string, string, string[])
getDefinitionEnvironmentTemplate(string, string)

Gets a definition environment template

getDefinitionRevision(string, number, number)

Get release definition for a given definitionId and revision

getDefinitionTags(string, number)

Gets the tags for a definition

getDeploymentBadge(string, number, number, string)

Gets a badge that indicates the status of the most recent deployment for an environment.

getDeployments(string, number, number, string, Date, Date, DeploymentStatus, DeploymentOperationStatus, boolean, ReleaseQueryOrder, number, number, string, Date, Date, string)

Get a list of deployments

getDeploymentsForMultipleEnvironments(DeploymentQueryParameters, string)
getFavorites(string, string, string)
getFlightAssignments(string)
getFolders(string, string, FolderPathQueryOrder)

Gets folders.

getGateLog(string, number, number, number, number)

Gets gate logs

getInputValues(InputValuesQuery, string)
getIssues(string, number, string)
getLog(string, number, number, number, number)

Gets logs

getLogs(string, number)

Get logs for a release Id.

getManualIntervention(string, number, number)

Get manual intervention for a given release and manual intervention id.

getManualInterventions(string, number)

List all manual interventions for a given release.

getMetrics(string, Date)
getOrgPipelineReleaseSettings()

Gets Org pipeline release settings

getPipelineReleaseSettings(string)

Gets pipeline release settings

getRelease(string, number, ApprovalFilters, string[], SingleReleaseExpands, number)

Get a Release

getReleaseChanges(string, number, number, number, string)
getReleaseDefinition(string, number, string[])

Get a release definition.

getReleaseDefinitionHistory(string, number)

Get revision history for a release definition

getReleaseDefinitionRevision(string, number, number)

Get release definition of a given revision.

getReleaseDefinitions(string, string, ReleaseDefinitionExpands, string, string, number, string, ReleaseDefinitionQueryOrder, string, boolean, string[], string[], string[], boolean, boolean)

Get a list of release definitions.

getReleaseDefinitionSummary(string, number, number, boolean, number[])

Get release summary of a given definition Id.

getReleaseEnvironment(string, number, number, ReleaseEnvironmentExpands)

Get a release environment.

getReleaseHistory(string, number)
getReleaseProjects(string, string)
getReleaseRevision(string, number, number)

Get release for a given revision number.

getReleases(string, number, number, string, string, ReleaseStatus, number, Date, Date, ReleaseQueryOrder, number, number, ReleaseExpands, string, string, string, string, boolean, string[], string[], number[], string)

Get a list of releases

getReleaseSettings(string)

Gets the release settings

getReleaseTags(string, number)

Gets the tags for a release

getReleaseTaskAttachmentContent(string, number, number, number, string, string, string, string, string)

Get a release task attachment.

getReleaseTaskAttachments(string, number, number, number, string, string)

Get the release task attachments.

getReleaseWorkItemsRefs(string, number, number, number, string)
getSourceBranches(string, number)
getSummaryMailSections(string, number)
getTags(string)
getTaskAttachmentContent(string, number, number, number, string, string, string, string)

Get a task attachment.

getTaskAttachments(string, number, number, number, string, string)

Get the task attachments.

getTaskLog(string, number, number, number, number, number, number)

Gets the task log of a release as a plain text file.

getTaskLog2(string, number, number, number, string, number, number, number)

Gets the task log of a release as a plain text file.

getTasks(string, number, number, number)
getTasks2(string, number, number, number, string)
getTasksForTaskGroup(string, number, number, number)
listDefinitionEnvironmentTemplates(string, boolean)

Gets a list of definition environment templates

sendSummaryMail(MailMessage, string, number)
undeleteRelease(string, number, string)

Undelete a soft deleted release.

undeleteReleaseDefinition(ReleaseDefinitionUndeleteParameter, string, number)

Undelete a release definition.

undeleteReleaseDefinitionEnvironmentTemplate(string, string)

Undelete a release definition environment template.

updateFolder(Folder, string, string)

Updates an existing folder at given existing path.

updateGates(GateUpdateMetadata, string, number)

Updates the gate for a deployment.

updateManualIntervention(ManualInterventionUpdateMetadata, string, number, number)

Update manual intervention.

updateOrgPipelineReleaseSettings(OrgPipelineReleaseSettingsUpdateParameters)

Updates Org pipeline release settings

updatePipelineReleaseSettings(ProjectPipelineReleaseSettingsUpdateParameters, string)

Updates pipeline release settings

updateRelease(Release, string, number)

Update a complete release object.

updateReleaseApproval(ReleaseApproval, string, number)

Update status of an approval

updateReleaseApprovals(ReleaseApproval[], string)
updateReleaseDefinition(ReleaseDefinition, string)

Update a release definition.

updateReleaseEnvironment(ReleaseEnvironmentUpdateMetadata, string, number, number)

Update the status of a release environment

updateReleaseResource(ReleaseUpdateMetadata, string, number)

Update few properties of a release.

updateReleaseSettings(ReleaseSettings, string)

Updates the release settings

Constructor Details

ReleaseRestClient(IVssRestClientOptions)

new ReleaseRestClient(options: IVssRestClientOptions)

Parameters

Property Details

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Property Value

string

Method Details

addDefinitionTag(string, number, string)

Adds a tag to a definition

function addDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseDefinitionId

number

tag

string

Returns

Promise<string[]>

addDefinitionTags(string[], string, number)

Adds multiple tags to a definition

function addDefinitionTags(tags: string[], project: string, releaseDefinitionId: number): Promise<string[]>

Parameters

tags

string[]

project

string

Project ID or project name

releaseDefinitionId

number

Returns

Promise<string[]>

addReleaseTag(string, number, string)

Adds a tag to a releaseId

function addReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseId

number

tag

string

Returns

Promise<string[]>

addReleaseTags(string[], string, number)

Adds tag to a release

function addReleaseTags(tags: string[], project: string, releaseId: number): Promise<string[]>

Parameters

tags

string[]

project

string

Project ID or project name

releaseId

number

Returns

Promise<string[]>

createDefinitionEnvironmentTemplate(ReleaseDefinitionEnvironmentTemplate, string)

Creates a definition environment template

function createDefinitionEnvironmentTemplate(template: ReleaseDefinitionEnvironmentTemplate, project: string): Promise<ReleaseDefinitionEnvironmentTemplate>

Parameters

template
ReleaseDefinitionEnvironmentTemplate

Definition environment template to create

project

string

Project ID or project name

Returns

createFavorites(FavoriteItem[], string, string, string)

function createFavorites(favoriteItems: FavoriteItem[], project: string, scope: string, identityId?: string): Promise<FavoriteItem[]>

Parameters

favoriteItems

FavoriteItem[]

project

string

Project ID or project name

scope

string

identityId

string

Returns

Promise<FavoriteItem[]>

createFolder(Folder, string, string)

Creates a new folder.

function createFolder(folder: Folder, project: string, path?: string): Promise<Folder>

Parameters

folder
Folder

folder.

project

string

Project ID or project name

path

string

Path of the folder.

Returns

Promise<Folder>

createRelease(ReleaseStartMetadata, string)

Create a release.

function createRelease(releaseStartMetadata: ReleaseStartMetadata, project: string): Promise<Release>

Parameters

releaseStartMetadata
ReleaseStartMetadata

Metadata to create a release.

project

string

Project ID or project name

Returns

Promise<Release>

createReleaseDefinition(ReleaseDefinition, string)

Create a release definition

function createReleaseDefinition(releaseDefinition: ReleaseDefinition, project: string): Promise<ReleaseDefinition>

Parameters

releaseDefinition
ReleaseDefinition

release definition object to create.

project

string

Project ID or project name

Returns

deleteDefinitionEnvironmentTemplate(string, string)

Delete a definition environment template

function deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<void>

Parameters

project

string

Project ID or project name

templateId

string

Id of the definition environment template

Returns

Promise<void>

deleteDefinitionTag(string, number, string)

Deletes a tag from a definition

function deleteDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseDefinitionId

number

tag

string

Returns

Promise<string[]>

deleteFavorites(string, string, string, string)

function deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise<void>

Parameters

project

string

Project ID or project name

scope

string

identityId

string

favoriteItemIds

string

Returns

Promise<void>

deleteFolder(string, string)

Deletes a definition folder for given folder name and path and all it's existing definitions.

function deleteFolder(project: string, path: string): Promise<void>

Parameters

project

string

Project ID or project name

path

string

Path of the folder to delete.

Returns

Promise<void>

deleteRelease(string, number, string)

Soft delete a release

function deleteRelease(project: string, releaseId: number, comment?: string): Promise<void>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

comment

string

Comment for deleting a release.

Returns

Promise<void>

deleteReleaseDefinition(string, number, string, boolean)

Delete a release definition.

function deleteReleaseDefinition(project: string, definitionId: number, comment?: string, forceDelete?: boolean): Promise<void>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the release definition.

comment

string

Comment for deleting a release definition.

forceDelete

boolean

'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'.

Returns

Promise<void>

deleteReleaseTag(string, number, string)

Deletes a tag from a release

function deleteReleaseTag(project: string, releaseId: number, tag: string): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseId

number

tag

string

Returns

Promise<string[]>

getAgentArtifactDefinitions(string, number)

Returns the artifact details that automation agent requires

function getAgentArtifactDefinitions(project: string, releaseId: number): Promise<AgentArtifactDefinition[]>

Parameters

project

string

Project ID or project name

releaseId

number

Returns

getApproval(string, number, boolean)

Get an approval.

function getApproval(project: string, approvalId: number, includeHistory?: boolean): Promise<ReleaseApproval>

Parameters

project

string

Project ID or project name

approvalId

number

Id of the approval.

includeHistory

boolean

'true' to include history of the approval. Default is 'false'.

Returns

Promise<ReleaseApproval>

getApprovalHistory(string, number)

Get approval history.

function getApprovalHistory(project: string, approvalStepId: number): Promise<ReleaseApproval>

Parameters

project

string

Project ID or project name

approvalStepId

number

Id of the approval.

Returns

Promise<ReleaseApproval>

getApprovals(string, string, ApprovalStatus, number[], ApprovalType, number, number, ReleaseQueryOrder, boolean)

Get a list of approvals

function getApprovals(project: string, assignedToFilter?: string, statusFilter?: ApprovalStatus, releaseIdsFilter?: number[], typeFilter?: ApprovalType, top?: number, continuationToken?: number, queryOrder?: ReleaseQueryOrder, includeMyGroupApprovals?: boolean): Promise<PagedList<ReleaseApproval>>

Parameters

project

string

Project ID or project name

assignedToFilter

string

Approvals assigned to this user.

statusFilter
ApprovalStatus

Approvals with this status. Default is 'pending'.

releaseIdsFilter

number[]

Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.

typeFilter
ApprovalType

Approval with this type.

top

number

Number of approvals to get. Default is 50.

continuationToken

number

Gets the approvals after the continuation token provided.

queryOrder
ReleaseQueryOrder

Gets the results in the defined order of created approvals. Default is 'descending'.

includeMyGroupApprovals

boolean

'true' to include my group approvals. Default is 'false'.

Returns

getArtifactTypeDefinitions(string)

function getArtifactTypeDefinitions(project: string): Promise<ArtifactTypeDefinition[]>

Parameters

project

string

Project ID or project name

Returns

getArtifactVersions(string, number)

function getArtifactVersions(project: string, releaseDefinitionId: number): Promise<ArtifactVersionQueryResult>

Parameters

project

string

Project ID or project name

releaseDefinitionId

number

Returns

getArtifactVersionsForSources(Artifact[], string)

function getArtifactVersionsForSources(artifacts: Artifact[], project: string): Promise<ArtifactVersionQueryResult>

Parameters

artifacts

Artifact[]

project

string

Project ID or project name

Returns

getAutoTriggerIssues(string, string, string, string)

function getAutoTriggerIssues(artifactType: string, sourceId: string, artifactVersionId: string, project?: string): Promise<AutoTriggerIssue[]>

Parameters

artifactType

string

sourceId

string

artifactVersionId

string

project

string

Project ID or project name

Returns

Promise<AutoTriggerIssue[]>

getDefinitionEnvironments(string, string, string[])

function getDefinitionEnvironments(project: string, taskGroupId?: string, propertyFilters?: string[]): Promise<DefinitionEnvironmentReference[]>

Parameters

project

string

Project ID or project name

taskGroupId

string

propertyFilters

string[]

Returns

getDefinitionEnvironmentTemplate(string, string)

Gets a definition environment template

function getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseDefinitionEnvironmentTemplate>

Parameters

project

string

Project ID or project name

templateId

string

Id of the definition environment template

Returns

getDefinitionRevision(string, number, number)

Get release definition for a given definitionId and revision

function getDefinitionRevision(project: string, definitionId: number, revision: number): Promise<string>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the definition.

revision

number

Id of the revision.

Returns

Promise<string>

getDefinitionTags(string, number)

Gets the tags for a definition

function getDefinitionTags(project: string, releaseDefinitionId: number): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseDefinitionId

number

Returns

Promise<string[]>

getDeploymentBadge(string, number, number, string)

Gets a badge that indicates the status of the most recent deployment for an environment.

function getDeploymentBadge(projectId: string, releaseDefinitionId: number, environmentId: number, branchName?: string): Promise<string>

Parameters

projectId

string

The ID of the Project.

releaseDefinitionId

number

The ID of the Release Definition.

environmentId

number

The ID of the Environment.

branchName

string

The name of the branch.

Returns

Promise<string>

getDeployments(string, number, number, string, Date, Date, DeploymentStatus, DeploymentOperationStatus, boolean, ReleaseQueryOrder, number, number, string, Date, Date, string)

Get a list of deployments

function getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: DeploymentStatus, operationStatus?: DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: ReleaseQueryOrder, top?: number, continuationToken?: number, createdFor?: string, minStartedTime?: Date, maxStartedTime?: Date, sourceBranch?: string): Promise<PagedList<Deployment>>

Parameters

project

string

Project ID or project name

definitionId

number

List the deployments for a given definition id.

definitionEnvironmentId

number

List the deployments for a given definition environment id.

createdBy

string

List the deployments for which deployments are created as identity specified.

minModifiedTime

Date

List the deployments with LastModified time >= minModifiedTime.

maxModifiedTime

Date

List the deployments with LastModified time <= maxModifiedTime.

deploymentStatus
DeploymentStatus

List the deployments with given deployment status. Default is 'All'.

operationStatus
DeploymentOperationStatus

List the deployments with given operation status. Default is 'All'.

latestAttemptsOnly

boolean

'true' to include deployments with latest attempt only. Default is 'false'.

queryOrder
ReleaseQueryOrder

List the deployments with given query order. Default is 'Descending'.

top

number

List the deployments with given top. Default top is '50' and Max top is '100'.

continuationToken

number

List the deployments with deployment id >= continuationToken.

createdFor

string

List the deployments for which deployments are requested as identity specified.

minStartedTime

Date

List the deployments with StartedOn time >= minStartedTime.

maxStartedTime

Date

List the deployments with StartedOn time <= maxStartedTime.

sourceBranch

string

List the deployments that are deployed from given branch name.

Returns

Promise<PagedList<Deployment>>

getDeploymentsForMultipleEnvironments(DeploymentQueryParameters, string)

function getDeploymentsForMultipleEnvironments(queryParameters: DeploymentQueryParameters, project: string): Promise<Deployment[]>

Parameters

queryParameters
DeploymentQueryParameters
project

string

Project ID or project name

Returns

Promise<Deployment[]>

getFavorites(string, string, string)

function getFavorites(project: string, scope: string, identityId?: string): Promise<FavoriteItem[]>

Parameters

project

string

Project ID or project name

scope

string

identityId

string

Returns

Promise<FavoriteItem[]>

getFlightAssignments(string)

function getFlightAssignments(flightName?: string): Promise<string[]>

Parameters

flightName

string

Returns

Promise<string[]>

getFolders(string, string, FolderPathQueryOrder)

Gets folders.

function getFolders(project: string, path?: string, queryOrder?: FolderPathQueryOrder): Promise<Folder[]>

Parameters

project

string

Project ID or project name

path

string

Path of the folder.

queryOrder
FolderPathQueryOrder

Gets the results in the defined order. Default is 'None'.

Returns

Promise<Folder[]>

getGateLog(string, number, number, number, number)

Gets gate logs

function getGateLog(project: string, releaseId: number, environmentId: number, gateId: number, taskId: number): Promise<string>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of release environment.

gateId

number

Id of the gate.

taskId

number

ReleaseTask Id for the log.

Returns

Promise<string>

getInputValues(InputValuesQuery, string)

function getInputValues(query: InputValuesQuery, project: string): Promise<InputValuesQuery>

Parameters

project

string

Project ID or project name

Returns

Promise<InputValuesQuery>

getIssues(string, number, string)

function getIssues(project: string, buildId: number, sourceId?: string): Promise<AutoTriggerIssue[]>

Parameters

project

string

Project ID or project name

buildId

number

sourceId

string

Returns

Promise<AutoTriggerIssue[]>

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

Gets logs

function getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise<string>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of release environment.

taskId

number

ReleaseTask Id for the log.

attemptId

number

Id of the attempt.

Returns

Promise<string>

getLogs(string, number)

Get logs for a release Id.

function getLogs(project: string, releaseId: number): Promise<ArrayBuffer>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

Returns

Promise<ArrayBuffer>

getManualIntervention(string, number, number)

Get manual intervention for a given release and manual intervention id.

function getManualIntervention(project: string, releaseId: number, manualInterventionId: number): Promise<ManualIntervention>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

manualInterventionId

number

Id of the manual intervention.

Returns

getManualInterventions(string, number)

List all manual interventions for a given release.

function getManualInterventions(project: string, releaseId: number): Promise<ManualIntervention[]>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

Returns

Promise<ManualIntervention[]>

getMetrics(string, Date)

function getMetrics(project: string, minMetricsTime?: Date): Promise<Metric[]>

Parameters

project

string

Project ID or project name

minMetricsTime

Date

Returns

Promise<Metric[]>

getOrgPipelineReleaseSettings()

Gets Org pipeline release settings

function getOrgPipelineReleaseSettings(): Promise<OrgPipelineReleaseSettings>

Returns

getPipelineReleaseSettings(string)

Gets pipeline release settings

function getPipelineReleaseSettings(project: string): Promise<ProjectPipelineReleaseSettings>

Parameters

project

string

Project ID or project name

Returns

getRelease(string, number, ApprovalFilters, string[], SingleReleaseExpands, number)

Get a Release

function getRelease(project: string, releaseId: number, approvalFilters?: ApprovalFilters, propertyFilters?: string[], expand?: SingleReleaseExpands, topGateRecords?: number): Promise<Release>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

approvalFilters
ApprovalFilters

A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default

propertyFilters

string[]

A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included.

expand
SingleReleaseExpands

A property that should be expanded in the release.

topGateRecords

number

Number of release gate records to get. Default is 5.

Returns

Promise<Release>

getReleaseChanges(string, number, number, number, string)

function getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<Change[]>

Parameters

project

string

Project ID or project name

releaseId

number

baseReleaseId

number

top

number

artifactAlias

string

Returns

Promise<Change[]>

getReleaseDefinition(string, number, string[])

Get a release definition.

function getReleaseDefinition(project: string, definitionId: number, propertyFilters?: string[]): Promise<ReleaseDefinition>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the release definition.

propertyFilters

string[]

A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included.

Returns

getReleaseDefinitionHistory(string, number)

Get revision history for a release definition

function getReleaseDefinitionHistory(project: string, definitionId: number): Promise<ReleaseDefinitionRevision[]>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the definition.

Returns

getReleaseDefinitionRevision(string, number, number)

Get release definition of a given revision.

function getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise<string>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the release definition.

revision

number

Revision number of the release definition.

Returns

Promise<string>

getReleaseDefinitions(string, string, ReleaseDefinitionExpands, string, string, number, string, ReleaseDefinitionQueryOrder, string, boolean, string[], string[], string[], boolean, boolean)

Get a list of release definitions.

function getReleaseDefinitions(project: string, searchText?: string, expand?: ReleaseDefinitionExpands, artifactType?: string, artifactSourceId?: string, top?: number, continuationToken?: string, queryOrder?: ReleaseDefinitionQueryOrder, path?: string, isExactNameMatch?: boolean, tagFilter?: string[], propertyFilters?: string[], definitionIdFilter?: string[], isDeleted?: boolean, searchTextContainsFolderName?: boolean): Promise<PagedList<ReleaseDefinition>>

Parameters

project

string

Project ID or project name

searchText

string

Get release definitions with names containing searchText.

expand
ReleaseDefinitionExpands

The properties that should be expanded in the list of Release definitions.

artifactType

string

Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.

artifactSourceId

string

Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.

top

number

Number of release definitions to get.

continuationToken

string

Gets the release definitions after the continuation token provided.

queryOrder
ReleaseDefinitionQueryOrder

Gets the results in the defined order. Default is 'IdAscending'.

path

string

Gets the release definitions under the specified path.

isExactNameMatch

boolean

'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'.

tagFilter

string[]

A comma-delimited list of tags. Only release definitions with these tags will be returned.

propertyFilters

string[]

A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not.

definitionIdFilter

string[]

A comma-delimited list of release definitions to retrieve.

isDeleted

boolean

'true' to get release definitions that has been deleted. Default is 'false'

searchTextContainsFolderName

boolean

'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'.

Returns

getReleaseDefinitionSummary(string, number, number, boolean, number[])

Get release summary of a given definition Id.

function getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean, definitionEnvironmentIdsFilter?: number[]): Promise<ReleaseDefinitionSummary>

Parameters

project

string

Project ID or project name

definitionId

number

Id of the definition to get release summary.

releaseCount

number

Count of releases to be included in summary.

includeArtifact

boolean

Include artifact details.Default is 'false'.

definitionEnvironmentIdsFilter

number[]

Returns

getReleaseEnvironment(string, number, number, ReleaseEnvironmentExpands)

Get a release environment.

function getReleaseEnvironment(project: string, releaseId: number, environmentId: number, expand?: ReleaseEnvironmentExpands): Promise<ReleaseEnvironment>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of the release environment.

expand
ReleaseEnvironmentExpands

A property that should be expanded in the environment.

Returns

getReleaseHistory(string, number)

function getReleaseHistory(project: string, releaseId: number): Promise<ReleaseRevision[]>

Parameters

project

string

Project ID or project name

releaseId

number

Returns

Promise<ReleaseRevision[]>

getReleaseProjects(string, string)

function getReleaseProjects(artifactType: string, artifactSourceId: string): Promise<ProjectReference[]>

Parameters

artifactType

string

artifactSourceId

string

Returns

Promise<ProjectReference[]>

getReleaseRevision(string, number, number)

Get release for a given revision number.

function getReleaseRevision(project: string, releaseId: number, definitionSnapshotRevision: number): Promise<string>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

definitionSnapshotRevision

number

Definition snapshot revision number.

Returns

Promise<string>

getReleases(string, number, number, string, string, ReleaseStatus, number, Date, Date, ReleaseQueryOrder, number, number, ReleaseExpands, string, string, string, string, boolean, string[], string[], number[], string)

Get a list of releases

function getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[], path?: string): Promise<Release[]>

Parameters

project

string

Project ID or project name

definitionId

number

Releases from this release definition Id.

definitionEnvironmentId

number

searchText

string

Releases with names containing searchText.

createdBy

string

Releases created by this user.

statusFilter
ReleaseStatus

Releases that have this status.

environmentStatusFilter

number

minCreatedTime

Date

Releases that were created after this time.

maxCreatedTime

Date

Releases that were created before this time.

queryOrder
ReleaseQueryOrder

Gets the results in the defined order of created date for releases. Default is descending.

top

number

Number of releases to get. Default is 50.

continuationToken

number

Gets the releases after the continuation token provided.

expand
ReleaseExpands

The property that should be expanded in the list of releases.

artifactTypeId

string

Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.

sourceId

string

Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.

artifactVersionId

string

Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.

sourceBranchFilter

string

Releases with given sourceBranchFilter will be returned (Not to be used with environmentStatusFilter).

isDeleted

boolean

Gets the soft deleted releases, if true.

tagFilter

string[]

A comma-delimited list of tags. Only releases with these tags will be returned.

propertyFilters

string[]

A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not.

releaseIdFilter

number[]

A comma-delimited list of releases Ids. Only releases with these Ids will be returned.

path

string

Releases under this folder path will be returned

Returns

Promise<Release[]>

getReleaseSettings(string)

Gets the release settings

function getReleaseSettings(project: string): Promise<ReleaseSettings>

Parameters

project

string

Project ID or project name

Returns

Promise<ReleaseSettings>

getReleaseTags(string, number)

Gets the tags for a release

function getReleaseTags(project: string, releaseId: number): Promise<string[]>

Parameters

project

string

Project ID or project name

releaseId

number

Returns

Promise<string[]>

getReleaseTaskAttachmentContent(string, number, number, number, string, string, string, string, string)

Get a release task attachment.

function getReleaseTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise<ArrayBuffer>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of the release environment.

attemptId

number

Attempt number of deployment.

planId

string

Plan Id of the deploy phase.

timelineId

string

Timeline Id of the task.

recordId

string

Record Id of attachment.

type

string

Type of the attachment.

name

string

Name of the attachment.

Returns

Promise<ArrayBuffer>

getReleaseTaskAttachments(string, number, number, number, string, string)

Get the release task attachments.

function getReleaseTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, type: string): Promise<ReleaseTaskAttachment[]>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of the release environment.

attemptId

number

Attempt number of deployment.

planId

string

Plan Id of the deploy phase.

type

string

Type of the attachment.

Returns

getReleaseWorkItemsRefs(string, number, number, number, string)

function getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise<ReleaseWorkItemRef[]>

Parameters

project

string

Project ID or project name

releaseId

number

baseReleaseId

number

top

number

artifactAlias

string

Returns

Promise<ReleaseWorkItemRef[]>

getSourceBranches(string, number)

function getSourceBranches(project: string, definitionId: number): Promise<string[]>

Parameters

project

string

Project ID or project name

definitionId

number

Returns

Promise<string[]>

getSummaryMailSections(string, number)

function getSummaryMailSections(project: string, releaseId: number): Promise<SummaryMailSection[]>

Parameters

project

string

Project ID or project name

releaseId

number

Returns

Promise<SummaryMailSection[]>

getTags(string)

function getTags(project: string): Promise<string[]>

Parameters

project

string

Project ID or project name

Returns

Promise<string[]>

getTaskAttachmentContent(string, number, number, number, string, string, string, string)

Get a task attachment.

function getTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, recordId: string, type: string, name: string): Promise<ArrayBuffer>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of the release environment.

attemptId

number

Attempt number of deployment.

timelineId

string

Timeline Id of the task.

recordId

string

Record Id of attachment.

type

string

Type of the attachment.

name

string

Name of the attachment.

Returns

Promise<ArrayBuffer>

getTaskAttachments(string, number, number, number, string, string)

Get the task attachments.

function getTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, type: string): Promise<ReleaseTaskAttachment[]>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of the release environment.

attemptId

number

Attempt number of deployment.

timelineId

string

Timeline Id of the task.

type

string

Type of the attachment.

Returns

getTaskLog(string, number, number, number, number, number, number)

Gets the task log of a release as a plain text file.

function getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number, startLine?: number, endLine?: number): Promise<string>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of release environment.

releaseDeployPhaseId

number

Release deploy phase Id.

taskId

number

ReleaseTask Id for the log.

startLine

number

Starting line number for logs

endLine

number

Ending line number for logs

Returns

Promise<string>

getTaskLog2(string, number, number, number, string, number, number, number)

Gets the task log of a release as a plain text file.

function getTaskLog2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, taskId: number, startLine?: number, endLine?: number): Promise<string>

Parameters

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of release environment.

attemptId

number

timelineId

string

taskId

number

ReleaseTask Id for the log.

startLine

number

Starting line number for logs

endLine

number

Ending line number for logs

Returns

Promise<string>

getTasks(string, number, number, number)

function getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise<ReleaseTask[]>

Parameters

project

string

Project ID or project name

releaseId

number

environmentId

number

attemptId

number

Returns

Promise<ReleaseTask[]>

getTasks2(string, number, number, number, string)

function getTasks2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string): Promise<ReleaseTask[]>

Parameters

project

string

Project ID or project name

releaseId

number

environmentId

number

attemptId

number

timelineId

string

Returns

Promise<ReleaseTask[]>

getTasksForTaskGroup(string, number, number, number)

function getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): Promise<ReleaseTask[]>

Parameters

project

string

Project ID or project name

releaseId

number

environmentId

number

releaseDeployPhaseId

number

Returns

Promise<ReleaseTask[]>

listDefinitionEnvironmentTemplates(string, boolean)

Gets a list of definition environment templates

function listDefinitionEnvironmentTemplates(project: string, isDeleted?: boolean): Promise<ReleaseDefinitionEnvironmentTemplate[]>

Parameters

project

string

Project ID or project name

isDeleted

boolean

'true' to get definition environment templates that have been deleted. Default is 'false'

Returns

sendSummaryMail(MailMessage, string, number)

function sendSummaryMail(mailMessage: MailMessage, project: string, releaseId: number): Promise<void>

Parameters

mailMessage
MailMessage
project

string

Project ID or project name

releaseId

number

Returns

Promise<void>

undeleteRelease(string, number, string)

Undelete a soft deleted release.

function undeleteRelease(project: string, releaseId: number, comment: string): Promise<void>

Parameters

project

string

Project ID or project name

releaseId

number

Id of release to be undeleted.

comment

string

Any comment for undeleting.

Returns

Promise<void>

undeleteReleaseDefinition(ReleaseDefinitionUndeleteParameter, string, number)

Undelete a release definition.

function undeleteReleaseDefinition(releaseDefinitionUndeleteParameter: ReleaseDefinitionUndeleteParameter, project: string, definitionId: number): Promise<ReleaseDefinition>

Parameters

releaseDefinitionUndeleteParameter
ReleaseDefinitionUndeleteParameter

Object for undelete release definition.

project

string

Project ID or project name

definitionId

number

Id of the release definition to be undeleted

Returns

undeleteReleaseDefinitionEnvironmentTemplate(string, string)

Undelete a release definition environment template.

function undeleteReleaseDefinitionEnvironmentTemplate(project: string, templateId: string): Promise<ReleaseDefinitionEnvironmentTemplate>

Parameters

project

string

Project ID or project name

templateId

string

Id of the definition environment template to be undeleted

Returns

updateFolder(Folder, string, string)

Updates an existing folder at given existing path.

function updateFolder(folder: Folder, project: string, path: string): Promise<Folder>

Parameters

folder
Folder

folder.

project

string

Project ID or project name

path

string

Path of the folder to update.

Returns

Promise<Folder>

updateGates(GateUpdateMetadata, string, number)

Updates the gate for a deployment.

function updateGates(gateUpdateMetadata: GateUpdateMetadata, project: string, gateStepId: number): Promise<ReleaseGates>

Parameters

gateUpdateMetadata
GateUpdateMetadata

Metadata to patch the Release Gates.

project

string

Project ID or project name

gateStepId

number

Gate step Id.

Returns

Promise<ReleaseGates>

updateManualIntervention(ManualInterventionUpdateMetadata, string, number, number)

Update manual intervention.

function updateManualIntervention(manualInterventionUpdateMetadata: ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): Promise<ManualIntervention>

Parameters

manualInterventionUpdateMetadata
ManualInterventionUpdateMetadata

Meta data to update manual intervention.

project

string

Project ID or project name

releaseId

number

Id of the release.

manualInterventionId

number

Id of the manual intervention.

Returns

updateOrgPipelineReleaseSettings(OrgPipelineReleaseSettingsUpdateParameters)

Updates Org pipeline release settings

function updateOrgPipelineReleaseSettings(newSettings: OrgPipelineReleaseSettingsUpdateParameters): Promise<OrgPipelineReleaseSettings>

Parameters

Returns

updatePipelineReleaseSettings(ProjectPipelineReleaseSettingsUpdateParameters, string)

Updates pipeline release settings

function updatePipelineReleaseSettings(newSettings: ProjectPipelineReleaseSettingsUpdateParameters, project: string): Promise<ProjectPipelineReleaseSettings>

Parameters

project

string

Project ID or project name

Returns

updateRelease(Release, string, number)

Update a complete release object.

function updateRelease(release: Release, project: string, releaseId: number): Promise<Release>

Parameters

release
Release

Release object for update.

project

string

Project ID or project name

releaseId

number

Id of the release to update.

Returns

Promise<Release>

updateReleaseApproval(ReleaseApproval, string, number)

Update status of an approval

function updateReleaseApproval(approval: ReleaseApproval, project: string, approvalId: number): Promise<ReleaseApproval>

Parameters

approval
ReleaseApproval

ReleaseApproval object having status, approver and comments.

project

string

Project ID or project name

approvalId

number

Id of the approval.

Returns

Promise<ReleaseApproval>

updateReleaseApprovals(ReleaseApproval[], string)

function updateReleaseApprovals(approvals: ReleaseApproval[], project: string): Promise<ReleaseApproval[]>

Parameters

approvals

ReleaseApproval[]

project

string

Project ID or project name

Returns

Promise<ReleaseApproval[]>

updateReleaseDefinition(ReleaseDefinition, string)

Update a release definition.

function updateReleaseDefinition(releaseDefinition: ReleaseDefinition, project: string): Promise<ReleaseDefinition>

Parameters

releaseDefinition
ReleaseDefinition

Release definition object to update.

project

string

Project ID or project name

Returns

updateReleaseEnvironment(ReleaseEnvironmentUpdateMetadata, string, number, number)

Update the status of a release environment

function updateReleaseEnvironment(environmentUpdateData: ReleaseEnvironmentUpdateMetadata, project: string, releaseId: number, environmentId: number): Promise<ReleaseEnvironment>

Parameters

environmentUpdateData
ReleaseEnvironmentUpdateMetadata

Environment update meta data.

project

string

Project ID or project name

releaseId

number

Id of the release.

environmentId

number

Id of release environment.

Returns

updateReleaseResource(ReleaseUpdateMetadata, string, number)

Update few properties of a release.

function updateReleaseResource(releaseUpdateMetadata: ReleaseUpdateMetadata, project: string, releaseId: number): Promise<Release>

Parameters

releaseUpdateMetadata
ReleaseUpdateMetadata

Properties of release to update.

project

string

Project ID or project name

releaseId

number

Id of the release to update.

Returns

Promise<Release>

updateReleaseSettings(ReleaseSettings, string)

Updates the release settings

function updateReleaseSettings(releaseSettings: ReleaseSettings, project: string): Promise<ReleaseSettings>

Parameters

releaseSettings
ReleaseSettings
project

string

Project ID or project name

Returns

Promise<ReleaseSettings>