YouTrack および Hub ヘルプの開発者ポータル

プロジェクトのカスタムフィールド

このリソースを使用すると、特定のプロジェクトのカスタムフィールドにアクセスして設定できます。

リソース

/api/admin/projects/{projectID}/customFields

返されたエンティティ

ProjectCustomField。エンティティ属性の説明については、サポートされているフィールドセクションを参照してください。

サポートされているメソッド

ProjectCustomField の属性

特定のプロジェクトのカスタムフィールドの設定を表します。

Related Resources

以下に、このエンティティを操作できるリソースのリストを示します。

Attributes

このテーブルは、ProjectCustomField エンティティの属性について説明しています。

  • サーバーからの応答で属性を受け取るには、fields 要求パラメーターでその属性を明示的に指定してください。

  • 属性を更新するには、POST リクエストの本文にそれを指定します。

フィールド

タイプ

説明

id

文字列

プロジェクトカスタムフィールドの ID。Read-only

フィールド

CustomField

プロジェクトのカスタムフィールド。Read-only Can be null

プロジェクト

プロジェクト

カスタムフィールドが属するプロジェクト。Read-only Can be null

canBeEmpty

Boolean

true の場合、カスタムフィールドの値は空にすることができます。それ以外の場合は false です。

emptyFieldText

文字列

カスタムフィールドの値が空の場合にプレースホルダーとして表示されるテキスト。Can be null

序数

Int

プロジェクトカスタムフィールドのリストでのこのフィールドの位置番号。

isPublic

Boolean

true の場合、このフィールドにアクセスするには、基本的な読み取り課題および更新の課題権限で十分です。false の場合、課題プライベートフィールドの読み取りおよび課題プライベートフィールドの更新権限が必要です。

hasRunningJob

Boolean

true の場合、このフィールドに対して実行されているバックグラウンドジョブがあります。この場合、一部のフィールド操作に一時的にアクセスできない場合があります。Read-only

条件

CustomFieldCondition

カスタムフィールドを表示するための条件。Can be null

ProjectCustomField のリストを読む

特定のプロジェクトに関連付けられているカスタムフィールドのリストを読みます。

Request syntax

GET /api/admin/projects/{projectID}/customFields?{fields}&{$top}&{$skip}

null

ProjectCustomField のデータベース ID

Request parameters

パラメーター

タイプ

説明

フィールド

文字列

応答で返される必要がある ProjectCustomField 属性のリスト。フィールドが指定されていない場合、entityID のみが返されます。

$skip

Int

オプション。最初のエンティティを返す前にスキップする、返されるエンティティ数を設定できます。

$top

Int

オプション。応答で返されるエントリの最大数を指定できます。$top 値を設定しない場合、サーバーは返されるエントリの最大数を制限します。

サーバーは、コレクションを返すほとんどのリソースに対して最大 42 のエントリを返します。詳細については、「ページ付け」を参照してください。

Sample

サンプルリクエスト

https://example.youtrack.cloud/api/admin/projects/0-0/customFields?$top=5&fields=id,field(name,fieldType($type)),project(shortName),canBeEmpty,isPublic

応答本文のサンプル

[ { "field": { "fieldType": { "$type": "FieldType" }, "name": "Subsystem", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": true, "isPublic": true, "id": "82-8", "$type": "OwnedProjectCustomField" }, { "field": { "fieldType": { "$type": "FieldType" }, "name": "Priority", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": true, "isPublic": true, "id": "82-9", "$type": "EnumProjectCustomField" }, { "field": { "fieldType": { "$type": "FieldType" }, "name": "Type", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": false, "isPublic": true, "id": "82-10", "$type": "EnumProjectCustomField" }, { "field": { "fieldType": { "$type": "FieldType" }, "name": "State", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": false, "isPublic": true, "id": "82-11", "$type": "StateProjectCustomField" }, { "field": { "fieldType": { "$type": "FieldType" }, "name": "Fix versions", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": true, "isPublic": true, "id": "82-12", "$type": "VersionProjectCustomField" }, { "field": { "fieldType": { "$type": "FieldType" }, "name": "Assignee", "$type": "CustomField" }, "project": { "shortName": "NP", "$type": "Project" }, "canBeEmpty": true, "isPublic": true, "id": "84-111", "$type": "UserProjectCustomField" } ]

新しいプロジェクトを追加する CustomField

カスタムフィールドをプロジェクトにアタッチします。

必須フィールド: field (id) – プロジェクトにアタッチする CustomField プロトタイプのデータベース ID、$type – このリクエストの結果として YouTrack が作成する ProjectCustomField のタイプ。プロトタイプフィールドタイプと ProjectCustomField $type の間のマッピングについては、カスタムフィールドの型マッピングを参照してください。

Required permissions

権限が必要です: プロジェクトの更新

Request syntax

POST /api/admin/projects/{projectID}/customFields?{fields}

null

ProjectCustomField のデータベース ID

Request parameters

パラメーター

タイプ

説明

フィールド

文字列

応答で返される必要がある ProjectCustomField 属性のリスト。フィールドが指定されていない場合、entityID のみが返されます。

Sample

サンプルリクエスト

https://example.youtrack.cloud/api/admin/projects/81-1/customFields?fields=field(fieldType(valueType,id),name,id)

サンプルリクエストボディ

{ "field": { "name": "Last message related emails", "id": "46-21", "$type": "CustomField" }, "$type": "SimpleProjectCustomField" }

応答本文のサンプル

{ "field": { "fieldType": { "valueType": "string", "id": "string", "$type": "FieldType" }, "name": "Last message related emails", "id": "46-21", "$type": "CustomField" }, "$type": "SimpleProjectCustomField" }
2026 年 3 月 24 日