Fields - Update
フィールドを更新します。
PATCH https://dev.azure.com/{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
field
|
path | True |
string |
更新するフィールドの名前/参照名 |
organization
|
path | True |
string |
Azure DevOps 組織の名前。 |
project
|
path |
string |
プロジェクト ID またはプロジェクト名 |
|
api-version
|
query | True |
string |
使用する API のバージョン。 このバージョンの API を使用するには、これを '7.1' に設定する必要があります。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
isDeleted |
boolean |
ユーザーがフィールドを復元するかどうかを示します。 |
isLocked |
boolean |
ユーザーがフィールドをロックするかどうかを示します。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
成功した操作 |
セキュリティ
oauth2
型:
oauth2
フロー:
accessCode
Authorization URL (承認 URL):
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL (トークン 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
スコープ
名前 | 説明 |
---|---|
vso.work_write | 作業項目とクエリの読み取り、作成、更新、ボード メタデータの更新、領域の読み取り、反復パスに関連するメタデータの追跡、クエリの実行、サービス フックを介した作業項目イベントに関する通知の受信を行う機能を付与します。 |
例
Set field locked |
Undelete a field |
Set field locked
要求のサンプル
PATCH https://dev.azure.com/{organization}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1
{
"isLocked": true
}
応答のサンプル
persistent-Auth: true
lfs-Authenticate: NTLM
wwW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAAAMDzOy0XQtlQAAAAA=
{
"name": "New Work Item Field3",
"referenceName": "Custom.TestField",
"description": "New work item field for testing",
"type": "string",
"usage": "workItem",
"readOnly": false,
"canSortBy": true,
"isQueryable": true,
"supportedOperations": [
{
"referenceName": "SupportedOperations.Equals",
"name": "="
},
{
"referenceName": "SupportedOperations.NotEquals",
"name": "<>"
},
{
"referenceName": "SupportedOperations.GreaterThan",
"name": ">"
},
{
"referenceName": "SupportedOperations.LessThan",
"name": "<"
},
{
"referenceName": "SupportedOperations.GreaterThanEquals",
"name": ">="
},
{
"referenceName": "SupportedOperations.LessThanEquals",
"name": "<="
},
{
"referenceName": "SupportedOperations.Contains",
"name": "Contains"
},
{
"referenceName": "SupportedOperations.NotContains",
"name": "Does Not Contain"
},
{
"referenceName": "SupportedOperations.In",
"name": "In"
},
{
"name": "Not In"
},
{
"referenceName": "SupportedOperations.InGroup",
"name": "In Group"
},
{
"referenceName": "SupportedOperations.NotInGroup",
"name": "Not In Group"
},
{
"referenceName": "SupportedOperations.Ever",
"name": "Was Ever"
},
{
"referenceName": "SupportedOperations.EqualsField",
"name": "= [Field]"
},
{
"referenceName": "SupportedOperations.NotEqualsField",
"name": "<> [Field]"
},
{
"referenceName": "SupportedOperations.GreaterThanField",
"name": "> [Field]"
},
{
"referenceName": "SupportedOperations.LessThanField",
"name": "< [Field]"
},
{
"referenceName": "SupportedOperations.GreaterThanEqualsField",
"name": ">= [Field]"
},
{
"referenceName": "SupportedOperations.LessThanEqualsField",
"name": "<= [Field]"
}
],
"isIdentity": false,
"isPicklist": false,
"isLocked": true,
"isPicklistSuggested": false,
"url": "http://localhost/DefaultCollection/_apis/wit/fields/Custom.TestField"
}
Undelete a field
要求のサンプル
PATCH https://dev.azure.com/{organization}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1
{
"isDeleted": false
}
応答のサンプル
persistent-Auth: true
lfs-Authenticate: NTLM
wwW-Authenticate: Negotiate oRswGaADCgEAoxIEEAEAAAAMDzOy0XQtlQAAAAA=
{
"name": "New Work Item Field3",
"referenceName": "Custom.TestField",
"description": "New work item field for testing",
"type": "string",
"usage": "workItem",
"readOnly": false,
"canSortBy": true,
"isQueryable": true,
"supportedOperations": [
{
"referenceName": "SupportedOperations.Equals",
"name": "="
},
{
"referenceName": "SupportedOperations.NotEquals",
"name": "<>"
},
{
"referenceName": "SupportedOperations.GreaterThan",
"name": ">"
},
{
"referenceName": "SupportedOperations.LessThan",
"name": "<"
},
{
"referenceName": "SupportedOperations.GreaterThanEquals",
"name": ">="
},
{
"referenceName": "SupportedOperations.LessThanEquals",
"name": "<="
},
{
"referenceName": "SupportedOperations.Contains",
"name": "Contains"
},
{
"referenceName": "SupportedOperations.NotContains",
"name": "Does Not Contain"
},
{
"referenceName": "SupportedOperations.In",
"name": "In"
},
{
"name": "Not In"
},
{
"referenceName": "SupportedOperations.InGroup",
"name": "In Group"
},
{
"referenceName": "SupportedOperations.NotInGroup",
"name": "Not In Group"
},
{
"referenceName": "SupportedOperations.Ever",
"name": "Was Ever"
},
{
"referenceName": "SupportedOperations.EqualsField",
"name": "= [Field]"
},
{
"referenceName": "SupportedOperations.NotEqualsField",
"name": "<> [Field]"
},
{
"referenceName": "SupportedOperations.GreaterThanField",
"name": "> [Field]"
},
{
"referenceName": "SupportedOperations.LessThanField",
"name": "< [Field]"
},
{
"referenceName": "SupportedOperations.GreaterThanEqualsField",
"name": ">= [Field]"
},
{
"referenceName": "SupportedOperations.LessThanEqualsField",
"name": "<= [Field]"
}
],
"isIdentity": false,
"isPicklist": false,
"isPicklistSuggested": false,
"url": "http://localhost/DefaultCollection/_apis/wit/fields/Custom.TestField"
}
定義
名前 | 説明 |
---|---|
Field |
フィールドの型。 |
Field |
作業項目フィールドの更新要求について説明します。 |
Field |
フィールドの使用法。 |
Reference |
REST 参照リンクのコレクションを表すクラス。 |
Work |
作業項目のフィールドとその作業項目の種類に固有のプロパティについて説明します。 |
Work |
作業項目フィールド操作について説明します。 |
FieldType
フィールドの型。
値 | 説明 |
---|---|
boolean |
ブール型のフィールド型。 |
dateTime |
Datetime フィールド型。 |
double |
Double フィールド型。 |
guid |
Guid フィールドの種類。 |
history |
履歴フィールドの種類。 |
html |
HTML (複数行) フィールド型。 |
identity |
ID フィールドの種類。 |
integer |
整数フィールド型。 |
picklistDouble |
[二重選択リスト] フィールドの種類。 REST API から二重候補リスト フィールドを作成する場合は、"Double" FieldType を使用します。 |
picklistInteger |
整数の候補リスト フィールドの種類。 REST API から整数候補リスト フィールドを作成する場合は、"Integer" FieldType を使用します。 |
picklistString |
文字列候補リスト フィールドの種類。 REST API から文字列候補リスト フィールドを作成する場合は、"String" FieldType を使用します。 |
plainText |
プレーン テキスト フィールドの種類。 |
string |
文字列フィールド型。 |
treePath |
ツリーパス フィールドの種類。 |
FieldUpdate
作業項目フィールドの更新要求について説明します。
名前 | 型 | 説明 |
---|---|---|
isDeleted |
boolean |
ユーザーがフィールドを復元するかどうかを示します。 |
isLocked |
boolean |
ユーザーがフィールドをロックするかどうかを示します。 |
FieldUsage
フィールドの使用法。
値 | 説明 |
---|---|
none |
空の使用法。 |
tree |
ツリー ノード フィールドの使用法。 |
workItem |
作業項目フィールドの使用法。 |
workItemLink |
作業項目リンク フィールドの使用法。 |
workItemTypeExtension |
作業項目の種類の拡張機能の使用法。 |
ReferenceLinks
REST 参照リンクのコレクションを表すクラス。
名前 | 型 | 説明 |
---|---|---|
links |
object |
リンクの読み取りビュー。 参照リンクは読み取り専用であるため、読み取り専用として公開する必要があります。 |
WorkItemField2
作業項目のフィールドとその作業項目の種類に固有のプロパティについて説明します。
名前 | 型 | 説明 |
---|---|---|
_links |
関連する REST リソースへの参照をリンクします。 |
|
canSortBy |
boolean |
サーバー クエリでフィールドを並べ替え可能にするかどうかを示します。 |
description |
string |
フィールドの説明。 |
isDeleted |
boolean |
このフィールドが削除されるかどうかを示します。 |
isIdentity |
boolean |
このフィールドが ID フィールドかどうかを示します。 |
isLocked |
boolean |
このフィールドが編集用にロック済みとしてマークされているかどうかを示します。 |
isPicklist |
boolean |
このインスタンスが候補リストかどうかを示します。 |
isPicklistSuggested |
boolean |
このインスタンスが候補リストであるかどうかを示します。 |
isQueryable |
boolean |
フィールドをサーバーで照会できるかどうかを示します。 |
name |
string |
フィールドの名前。 |
picklistId |
string (uuid) |
このフィールドが候補リストの場合、関連付けられている候補リストの識別子。それ以外の場合は null |
readOnly |
boolean |
フィールドが [読み取り専用] かどうかを示します。 |
referenceName |
string |
フィールドの参照名。 |
supportedOperations |
このフィールドでサポートされている操作。 |
|
type |
フィールドの型。 |
|
url |
string |
|
usage |
フィールドの使用法。 |
WorkItemFieldOperation
作業項目フィールド操作について説明します。
名前 | 型 | 説明 |
---|---|---|
name |
string |
操作のフレンドリ名。 |
referenceName |
string |
操作の参照名。 |