Pull Request Labels - Get
擷取已指派給提取要求的單一標籤(標籤)。
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}?projectId={projectId}&api-version=7.1
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
label
|
path | True |
string |
所要求的標籤名稱或識別碼。 |
|
organization
|
path | True |
string |
Azure DevOps 組織的名稱。 |
|
pull
|
path | True |
integer (int32) |
提取要求的標識碼。 |
|
repository
|
path | True |
string |
提取要求目標分支的存放庫標識碼。 |
|
project
|
path |
string |
項目識別碼或項目名稱 |
|
|
api-version
|
query | True |
string |
要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。 |
|
project
|
query |
string |
項目識別碼或項目名稱。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
成功作業 |
安全性
oauth2
類型:
oauth2
Flow:
accessCode
授權 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 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
範圍
| 名稱 | Description |
|---|---|
| vso.code | 授與讀取有關認可、變更集、分支和其他版本控制成品之原始程式碼和元數據的能力。 也授與搜尋程式代碼的能力,並透過服務攔截取得版本控制事件的通知。 |
定義
WebApiTagDefinition
透過網路傳送的標記定義表示。
| 名稱 | 類型 | Description |
|---|---|---|
| active |
boolean |
標籤定義是否為使用中。 |
| id |
string (uuid) |
標籤定義的識別碼。 |
| name |
string |
標籤定義的名稱。 |
| url |
string |
標籤定義的資源 URL。 |