共用方式為


Builds - Get Changes Between Builds

取得在兩個指定組建之間對存放庫所做的變更。

GET https://dev.azure.com/{organization}/{project}/_apis/build/changes?api-version=7.0
GET https://dev.azure.com/{organization}/{project}/_apis/build/changes?fromBuildId={fromBuildId}&toBuildId={toBuildId}&$top={$top}&api-version=7.0

URI 參數

名稱 位於 必要 類型 Description
organization
path True

string

Azure DevOps 組織的名稱。

project
path True

string

專案識別碼或專案名稱

api-version
query True

string

要使用的 API 版本。 這應該設定為 '7.0' 以使用此版本的 API。

$top
query

integer

int32

要傳回的變更數目上限。

fromBuildId
query

integer

int32

第一個組建的識別碼。

toBuildId
query

integer

int32

上一個組建的識別碼。

回應

名稱 類型 Description
200 OK

Change[]

成功的作業

安全性

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

名稱 Description
vso.build 授與存取組建成品的能力,包括建置結果、定義和要求,以及透過服務勾點接收建置事件相關通知的能力。

定義

名稱 Description
Change

表示與組建相關聯的變更。

IdentityRef
ReferenceLinks

表示 REST 參考連結集合的類別。

Change

表示與組建相關聯的變更。

名稱 類型 Description
author

IdentityRef

變更的作者。

displayUri

string

使用者易記資源表示的位置。

id

string

變更的識別碼。 針對認可,這會是 SHA1。 如果是 TFVC 變更集,這會是變更集識別碼。

location

string

資源完整表示的位置。

message

string

變更的描述。 這可能是認可訊息或變更集描述。

messageTruncated

boolean

指出訊息是否已截斷。

pusher

string

推送變更的人員或程式。

timestamp

string

變更的時間戳記。

type

string

變更的類型。 「commit」、「changeset」 等。

IdentityRef

名稱 類型 Description
_links

ReferenceLinks

此欄位包含有關圖表主旨的零個或多個有趣連結。 您可以叫用這些連結來取得其他關聯性,或取得此圖表主體的詳細資訊。

descriptor

string

描述項是在系統執行時參考圖形主旨的主要方式。 此欄位可唯一識別帳戶和組織之間的相同圖表主旨。

directoryAlias

string

已淘汰 - 藉由查詢 IdentityRef 「_links」 字典之 「self」 專案中參考的 Graph 使用者,即可擷取

displayName

string

這是圖表主旨的非唯一顯示名稱。 若要變更此欄位,您必須在來源提供者中變更其值。

id

string

imageUrl

string

已淘汰 - 可在 IdentityRef 「_links」 字典的 「avatar」 專案中使用

inactive

boolean

已淘汰 - 您可以查詢 GraphUser 「_links」 字典的 「membershipState」 專案中參考的 Graph 成員資格狀態來擷取

isAadIdentity

boolean

已被取代 - 可以從描述元的主旨類型推斷 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已被取代 - 可以從描述元的主旨類型推斷 (Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

已淘汰 - 不在 ToIdentityRef 的大多數既有實作中使用

uniqueName

string

已淘汰 - 請改用 Domain+PrincipalName

url

string

此 URL 是此圖表主體來源資源的完整路由。

表示 REST 參考連結集合的類別。

名稱 類型 Description
links

object

連結的唯讀檢視。 因為參考連結是唯讀的,所以我們只想要將它們公開為唯讀。