テスト結果のカスタム フィールドに関する情報を取得するには、次の API メソッドを使用します。
get_result_fields
利用可能なテスト結果のカスタム フィールドのリストを返します。
GET index.php?/api/v2/get_result_fields
レスポンスの内容
レスポンスにはカスタム フィールド定義の配列が含まれます。典型的なレスポンスについては、下記を参照してください。
[
{
"id": 11,
"is_active": true,
"type_id": 11,
"name": "step_results",
"system_name": "custom_step_results",
"label": "Steps",
"description": null,
"configs": [
{
"context": {
"is_global": true,
"project_ids": null
},
"id": "..",
"options": {
"format": "markdown",
"has_actual": false,
"has_expected": true,
"is_required": false
}
}
]
}
]
カスタム フィールドは、プロジェクトごとに異なる構成とオプションを持つ場合があり、それは configs フィールドによって示されます。カスタム フィールドが特定のプロジェクトに適用可能かどうかを確認する (そしてプロジェクトのフィールド オプションを取得する) には、フィールド設定の context をグローバル (is_global) にするか、project_ids にプロジェクトの ID を設定します。
また、次のリストは、利用可能なカスタム フィールドのタイプ (type_id) を示しています。
| タイプ | 名前 |
|---|---|
| 1 | String |
| 2 | Integer |
| 3 | Text |
| 4 | URL |
| 5 | Checkbox |
| 6 | Dropdown |
| 7 | User |
| 8 | Date |
| 9 | Milestone |
| 11 | Step Results |
| 12 | Multi-select |
レスポンス コード
| ステータス コード | 説明 |
|---|---|
| 200 | 成功。利用可能なカスタム フィールドがレスポンスの一部として返されます |