Work Item Types Field - Get
取得具有詳細參考的工作專案類型的欄位。
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?api-version=7.1-preview.3
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?$expand={$expand}&api-version=7.1-preview.3
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
field
|
path | True |
string |
|
organization
|
path | True |
string |
Azure DevOps 組織的名稱。 |
project
|
path | True |
string |
專案識別碼或專案名稱 |
type
|
path | True |
string |
工作專案類型。 |
api-version
|
query | True |
string |
要使用的 API 版本。 這應該設定為 '7.1-preview.3',以使用此版本的 API。 |
$expand
|
query |
展開 API 回應的層級。 屬性:包含允許的值、預設值、isRequired 等。作為回應的一部分;無:略過這些屬性。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功的作業 |
安全性
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.work | 授與讀取工作專案、查詢、面板、區域和反復專案路徑,以及其他工作專案追蹤相關中繼資料的能力。 也授與執行查詢、搜尋工作專案,以及透過服務勾點接收工作專案事件通知的能力。 |
範例
Get project scoped work item type field data |
Get project scoped work item type field data with expand option |
Get project scoped work item type field data
Sample Request
GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/workitemtypes/Bug/fields/System.IterationPath?api-version=7.1-preview.3
Sample Response
{
"helpText": "The iteration within which this bug will be fixed",
"alwaysRequired": false,
"defaultValue": null,
"referenceName": "System.IterationPath",
"name": "Iteration Path",
"url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.IterationPath"
}
Get project scoped work item type field data with expand option
Sample Request
GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/workitemtypes/Bug/fields/System.ChangedBy?$expand=All&api-version=7.1-preview.3
Sample Response
{
"alwaysRequired": false,
"defaultValue": null,
"allowedValues": [
{
"displayName": "Jamal Hartnett",
"id": "df828ec3-71d8-6e69-9afd-e736c5a32145",
"uniqueName": "fabrikamfiber4@hotmail.com",
"descriptor": "s2s.M2FjODRhZmItYWIwNC00ZWM0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNCFhZi05MWFiLTJkN2NkMDExZGI0Nw"
},
{
"displayName": "Norman Paulk",
"id": "df828ec3-71d8-6e69-9afd-e736c5b32145",
"uniqueName": "Fabrikamfiber16@hotmail.com",
"descriptor": "s2s.M2FjODRhZmIeYWIwNC00ZWM0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Nw"
},
{
"displayName": "Chuck Reinhart",
"id": "df828ec3-71d8-6e69-9afd-g736c5a32145",
"uniqueName": "fabrikamfiber3@hotmail.com",
"descriptor": "s2s.M2FjODRhZmItYWIwNC00SWG0LWEyZWItOGEyYWJmNGJlNDQ3QDcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Nw"
}
],
"dependentFields": [],
"referenceName": "System.ChangedBy",
"name": "Changed By",
"url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.ChangedBy"
}
定義
名稱 | Description |
---|---|
Work |
工作專案中欄位的參考 |
Work |
展開 API 回應的層級。 屬性:包含允許的值、預設值、isRequired 等。作為回應的一部分;無:略過這些屬性。 |
Work |
具有詳細參考之 workItemype 的欄位實例。 |
WorkItemFieldReference
工作專案中欄位的參考
名稱 | 類型 | Description |
---|---|---|
name |
string |
欄位的易記名稱。 |
referenceName |
string |
欄位的參考名稱。 |
url |
string |
資源的 REST URL。 |
WorkItemTypeFieldsExpandLevel
展開 API 回應的層級。 屬性:包含允許的值、預設值、isRequired 等。作為回應的一部分;無:略過這些屬性。
名稱 | 類型 | Description |
---|---|---|
all |
string |
包含欄位的允許值和相依欄位。 |
allowedValues |
string |
包含欄位允許的值。 |
dependentFields |
string |
包含欄位的相依欄位。 |
none |
string |
只包含欄位的基本屬性。 |
WorkItemTypeFieldWithReferences
具有詳細參考之 workItemype 的欄位實例。
名稱 | 類型 | Description |
---|---|---|
allowedValues |
object[] |
允許的欄位值清單。 |
alwaysRequired |
boolean |
指出是否一律需要域值。 |
defaultValue |
object |
表示欄位的預設值。 |
dependentFields |
相依欄位的清單。 |
|
helpText |
string |
取得欄位的解說文字。 |
name |
string |
欄位的易記名稱。 |
referenceName |
string |
欄位的參考名稱。 |
url |
string |
資源的 REST URL。 |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應