Hierarchy (View Summary)

Implements

Constructors

Properties

Methods

addBuildTag addBuildTags addDefinitionTag addDefinitionTags addRetentionLeases authorizeDefinitionResources authorizeProjectResources createAcceptHeader createArtifact createDefinition createFolder createRequestOptions deleteBuild deleteBuildTag deleteDefinition deleteDefinitionTag deleteFolder deleteRetentionLeasesById deleteTag deleteTemplate formatResponse getArtifact getArtifactContentZip getArtifacts getAttachment getAttachments getBadge getBuild getBuildBadge getBuildBadgeData getBuildChanges getBuildController getBuildControllers getBuildGeneralSettings getBuildLog getBuildLogLines getBuildLogs getBuildLogsZip getBuildLogZip getBuildOptionDefinitions getBuildProperties getBuildReport getBuildReportHtmlContent getBuilds getBuildSettings getBuildTags getBuildTimeline getBuildWorkItemsRefs getBuildWorkItemsRefsFromCommits getChangesBetweenBuilds getDefinition getDefinitionMetrics getDefinitionProperties getDefinitionResources getDefinitionRevisions getDefinitions getDefinitionTags getDefinitionYaml getFile getFileContents getFolders getLatestBuild getPathContents getProjectMetrics getProjectResources getPullRequest getResourceUsage getRetentionHistory getRetentionLease getRetentionLeasesByMinimalRetentionLeases getRetentionLeasesByOwnerId getRetentionLeasesByUserId getRetentionLeasesForBuild getRetentionSettings getStatusBadge getTags getTemplate getTemplates getWorkItemsBetweenBuilds listBranches listRepositories listSourceProviders listWebhooks queueBuild restoreDefinition restoreWebhooks saveTemplate updateBuild updateBuildGeneralSettings updateBuildProperties updateBuilds updateBuildSettings updateBuildTags updateDefinition updateDefinitionProperties updateDefinitionTags updateFolder updateRetentionLease updateRetentionSettings updateStage

Constructors

Properties

baseUrl: string
http: HttpClient
rest: RestClient
userAgent: string
vsoClient: VsoClient
RESOURCE_AREA_ID: "965220d5-5bb9-42cf-8d67-9b146df2a5a4"

Methods

  • Adds tags to a build.

    Parameters

    • tags: string[]

      The tags to add. Request body is composed directly from listed tags.

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    Returns Promise<string[]>

  • Adds a tag to a definition

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • tag: string

      The tag to add.

    Returns Promise<string[]>

  • Adds multiple tags to a definition.

    Parameters

    • tags: string[]

      The tags to add.

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    Returns Promise<string[]>

  • Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • tag: string

      The tag to remove.

    Returns Promise<string[]>

  • Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • tag: string

      The tag to remove.

    Returns Promise<string[]>

  • Deletes a definition folder. Definitions and their corresponding builds will also be deleted.

    Parameters

    • project: string

      Project ID or project name

    • path: string

      The full path to the folder.

    Returns Promise<void>

  • Gets a specific artifact for a build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • artifactName: string

      The name of the artifact.

    Returns Promise<ReadableStream>

  • Gets a specific attachment.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • timelineId: string

      The ID of the timeline.

    • recordId: string

      The ID of the timeline record.

    • type: string

      The type of the attachment.

    • name: string

      The name of the attachment.

    Returns Promise<ReadableStream>

  • Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge.

    Parameters

    • project: string

      The project ID or name.

    • definitionId: number

      The ID of the definition.

    • OptionalbranchName: string

      The name of the branch.

    Returns Promise<string>

  • Gets a badge that indicates the status of the most recent build for the specified branch.

    Parameters

    • project: string

      Project ID or project name

    • repoType: string

      The repository type.

    • OptionalrepoId: string

      The repository ID.

    • OptionalbranchName: string

      The branch name.

    Returns Promise<BuildBadge>

  • Gets a badge that indicates the status of the most recent build for the specified branch.

    Parameters

    • project: string

      Project ID or project name

    • repoType: string

      The repository type.

    • OptionalrepoId: string

      The repository ID.

    • OptionalbranchName: string

      The branch name.

    Returns Promise<string>

  • Gets the changes associated with a build

    Parameters

    • project: string

      Project ID or project name

    • buildId: number
    • OptionalcontinuationToken: string
    • Optionaltop: number

      The maximum number of changes to return

    • OptionalincludeSourceChange: boolean

    Returns Promise<PagedList<Change>>

  • Gets an individual log file for a build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • logId: number

      The ID of the log file.

    • OptionalstartLine: number

      The start line.

    • OptionalendLine: number

      The end line.

    Returns Promise<ReadableStream>

  • Gets an individual log file for a build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • logId: number

      The ID of the log file.

    • OptionalstartLine: number

      The start line.

    • OptionalendLine: number

      The end line.

    Returns Promise<string[]>

  • Gets an individual log file for a build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • logId: number

      The ID of the log file.

    • OptionalstartLine: number

      The start line.

    • OptionalendLine: number

      The end line.

    Returns Promise<ReadableStream>

  • Gets properties for a build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • Optionalfilter: string[]

      A comma-delimited list of properties. If specified, filters to these specific properties.

    Returns Promise<any>

  • Gets a list of builds.

    Parameters

    • project: string

      Project ID or project name

    • Optionaldefinitions: number[]

      A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.

    • Optionalqueues: number[]

      A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.

    • OptionalbuildNumber: string

      If specified, filters to builds that match this build number. Append * to do a prefix search.

    • OptionalminTime: Date

      If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.

    • OptionalmaxTime: Date

      If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.

    • OptionalrequestedFor: string

      If specified, filters to builds requested for the specified user.

    • OptionalreasonFilter: BuildReason

      If specified, filters to builds that match this reason.

    • OptionalstatusFilter: BuildStatus

      If specified, filters to builds that match this status.

    • OptionalresultFilter: BuildResult

      If specified, filters to builds that match this result.

    • OptionaltagFilters: string[]

      A comma-delimited list of tags. If specified, filters to builds that have the specified tags.

    • Optionalproperties: string[]

      A comma-delimited list of properties to retrieve.

    • Optionaltop: number

      The maximum number of builds to return.

    • OptionalcontinuationToken: string

      A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.

    • OptionalmaxBuildsPerDefinition: number

      The maximum number of builds to return per definition.

    • OptionaldeletedFilter: QueryDeletedOption

      Indicates whether to exclude, include, or only return deleted builds.

    • OptionalqueryOrder: BuildQueryOrder

      The order in which builds should be returned.

    • OptionalbranchName: string

      If specified, filters to builds that built branches that built this branch.

    • OptionalbuildIds: number[]

      A comma-delimited list that specifies the IDs of builds to retrieve.

    • OptionalrepositoryId: string

      If specified, filters to builds that built from this repository.

    • OptionalrepositoryType: string

      If specified, filters to builds that built from repositories of this type.

    Returns Promise<PagedList<Build>>

  • Gets details for a build

    Parameters

    • project: string

      Project ID or project name

    • buildId: number
    • OptionaltimelineId: string
    • OptionalchangeId: number
    • OptionalplanId: string

    Returns Promise<Timeline>

  • Gets the work items associated with a build. Only work items in the same project are returned.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • Optionaltop: number

      The maximum number of work items to return.

    Returns Promise<ResourceRef[]>

  • Gets the work items associated with a build, filtered to specific commits.

    Parameters

    • commitIds: string[]

      A comma-delimited list of commit IDs.

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • Optionaltop: number

      The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.

    Returns Promise<ResourceRef[]>

  • Gets the changes made to the repository between two given builds.

    Parameters

    • project: string

      Project ID or project name

    • OptionalfromBuildId: number

      The ID of the first build.

    • OptionaltoBuildId: number

      The ID of the last build.

    • Optionaltop: number

      The maximum number of changes to return.

    Returns Promise<Change[]>

  • Gets a definition, optionally at a specific revision.

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • Optionalrevision: number

      The revision number to retrieve. If this is not specified, the latest version will be returned.

    • OptionalminMetricsTime: Date

      If specified, indicates the date from which metrics should be included.

    • OptionalpropertyFilters: string[]

      A comma-delimited list of properties to include in the results.

    • OptionalincludeLatestBuilds: boolean

    Returns Promise<BuildDefinition>

  • Gets properties for a definition.

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • Optionalfilter: string[]

      A comma-delimited list of properties. If specified, filters to these specific properties.

    Returns Promise<any>

  • Gets a list of definitions.

    Parameters

    • project: string

      Project ID or project name

    • Optionalname: string

      If specified, filters to definitions whose names match this pattern.

    • OptionalrepositoryId: string

      A repository ID. If specified, filters to definitions that use this repository.

    • OptionalrepositoryType: string

      If specified, filters to definitions that have a repository of this type.

    • OptionalqueryOrder: DefinitionQueryOrder

      Indicates the order in which definitions should be returned.

    • Optionaltop: number

      The maximum number of definitions to return.

    • OptionalcontinuationToken: string

      A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.

    • OptionalminMetricsTime: Date

      If specified, indicates the date from which metrics should be included.

    • OptionaldefinitionIds: number[]

      A comma-delimited list that specifies the IDs of definitions to retrieve.

    • Optionalpath: string

      If specified, filters to definitions under this folder.

    • OptionalbuiltAfter: Date

      If specified, filters to definitions that have builds after this date.

    • OptionalnotBuiltAfter: Date

      If specified, filters to definitions that do not have builds after this date.

    • OptionalincludeAllProperties: boolean

      Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.

    • OptionalincludeLatestBuilds: boolean

      Indicates whether to return the latest and latest completed builds for this definition.

    • OptionaltaskIdFilter: string

      If specified, filters to definitions that use the specified task.

    • OptionalprocessType: number

      If specified, filters to definitions with the given process type.

    • OptionalyamlFilename: string

      If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true

    Returns Promise<PagedList<BuildDefinitionReference>>

  • Gets the tags for a definition.

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • Optionalrevision: number

      The definition revision number. If not specified, uses the latest revision of the definition.

    Returns Promise<string[]>

  • Converts a definition to YAML, optionally at a specific revision.

    Parameters

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • Optionalrevision: number

      The revision number to retrieve. If this is not specified, the latest version will be returned.

    • OptionalminMetricsTime: Date

      If specified, indicates the date from which metrics should be included.

    • OptionalpropertyFilters: string[]

      A comma-delimited list of properties to include in the results.

    • OptionalincludeLatestBuilds: boolean

    Returns Promise<YamlBuild>

  • Gets a file from the build.

    Parameters

    • project: string

      Project ID or project name

    • buildId: number

      The ID of the build.

    • artifactName: string

      The name of the artifact.

    • fileId: string

      The primary key for the file.

    • fileName: string

      The name that the file will be set to.

    Returns Promise<ReadableStream>

  • Gets the contents of a file in the given source code repository.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.

    • OptionalcommitOrBranch: string

      The identifier of the commit or branch from which a file's contents are retrieved.

    • Optionalpath: string

      The path to the file to retrieve, relative to the root of the repository.

    Returns Promise<ReadableStream>

  • Gets the latest build for a definition, optionally scoped to a specific branch.

    Parameters

    • project: string

      Project ID or project name

    • definition: string

      definition name with optional leading folder path, or the definition id

    • OptionalbranchName: string

      optional parameter that indicates the specific branch to use. If not specified, the default branch is used.

    Returns Promise<Build>

  • Gets the contents of a directory in the given source code repository.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.

    • OptionalcommitOrBranch: string

      The identifier of the commit or branch from which a file's contents are retrieved.

    • Optionalpath: string

      The path contents to list, relative to the root of the repository.

    Returns Promise<SourceRepositoryItem[]>

  • Gets build metrics for a project.

    Parameters

    • project: string

      Project ID or project name

    • OptionalmetricAggregationType: string

      The aggregation type to use (hourly, daily).

    • OptionalminMetricsTime: Date

      The date from which to calculate metrics.

    Returns Promise<BuildMetric[]>

  • Gets a pull request object from source provider.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • pullRequestId: string

      Vendor-specific id of the pull request.

    • OptionalrepositoryId: string

      Vendor-specific identifier or the name of the repository that contains the pull request.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    Returns Promise<PullRequest>

  • Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.

    Parameters

    • project: string

      Project ID or project name

    • OptionalownerId: string
    • OptionaldefinitionId: number

      An optional parameter to limit the search to a specific pipeline definition.

    • OptionalrunId: number

      An optional parameter to limit the search to a single pipeline run. Requires definitionId.

    Returns Promise<RetentionLease[]>

  • Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.

    Parameters

    • project: string

      Project ID or project name

    • userOwnerId: string

      The user id to search for.

    • OptionaldefinitionId: number

      An optional parameter to limit the search to a specific pipeline definition.

    • OptionalrunId: number

      An optional parameter to limit the search to a single pipeline run. Requires definitionId.

    Returns Promise<RetentionLease[]>

  • Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.

    If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.

    Parameters

    • project: string

      Project ID or project name

    • definition: string

      Either the definition name with optional leading folder path, or the definition id.

    • OptionalbranchName: string

      Only consider the most recent build for this branch. If not specified, the default branch is used.

    • OptionalstageName: string

      Use this stage within the pipeline to render the status.

    • OptionaljobName: string

      Use this job within a stage of the pipeline to render the status.

    • Optionalconfiguration: string

      Use this job configuration to render the status

    • Optionallabel: string

      Replaces the default text on the left side of the badge.

    Returns Promise<string>

  • Gets all the work items between two builds.

    Parameters

    • project: string

      Project ID or project name

    • fromBuildId: number

      The ID of the first build.

    • toBuildId: number

      The ID of the last build.

    • Optionaltop: number

      The maximum number of work items to return.

    Returns Promise<ResourceRef[]>

  • Gets a list of branches for the given source code repository.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.

    • OptionalbranchName: string

      If supplied, the name of the branch to check for specifically.

    Returns Promise<string[]>

  • Gets a list of source code repositories.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      If specified, the vendor-specific identifier or the name of a single repository to get.

    • OptionalresultSet: ResultSet

      'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.

    • OptionalpageResults: boolean

      If set to true, this will limit the set of results and will return a continuation token to continue the query.

    • OptionalcontinuationToken: string

      When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.

    Returns Promise<SourceRepositories>

  • Gets a list of webhooks installed in the given source code repository.

    Parameters

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.

    Returns Promise<RepositoryWebhook[]>

  • Queues a build

    Parameters

    • build: Build
    • project: string

      Project ID or project name

    • OptionalignoreWarnings: boolean
    • OptionalcheckInTicket: string
    • OptionalsourceBuildId: number
    • OptionaldefinitionId: number

      Optional definition id to queue a build without a body. Ignored if there's a valid body

    Returns Promise<Build>

  • Recreates the webhooks for the specified triggers in the given source code repository.

    Parameters

    • triggerTypes: DefinitionTriggerType[]

      The types of triggers to restore webhooks for.

    • project: string

      Project ID or project name

    • providerName: string

      The name of the source provider.

    • OptionalserviceEndpointId: string

      If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.

    • Optionalrepository: string

      If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.

    Returns Promise<void>

  • Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.

    Parameters

    • definition: BuildDefinition

      The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted.

    • project: string

      Project ID or project name

    • definitionId: number

      The ID of the definition.

    • OptionalsecretsSourceDefinitionId: number
    • OptionalsecretsSourceDefinitionRevision: number

    Returns Promise<BuildDefinition>