GET: インスタンスを読み取る
このトピックでは、GET操作を使用してエンティティに関する情報を取得する方法について説明します。
概要
インスタンスは、情報の完全な機能単位です。たとえば、単一の不具合です。インスタンスのプロパティは、JSON形式のデータで表されます。
インスタンスはコレクションのメンバーです。コレクションを参照してください。
エンティティのリソースを取得するには、エンティティIDが追加されたエンティティコレクションのURIを使用します。
エンティティIDを取得するには、最初にすべてのインスタンスを読み取り、目的のエンティティを見つけます。
GET .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects/23
23は不具合IDです。
注: インスタンスを取得する場合、RESTAPIは必ずしもインスタンスのすべてのフィールドを表示するわけではありません。使用可能なフィールドの完全なリストについては、メタデータの取得を参照してください。
例

GET .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/defects/1014
{ "type": "defect", "creation_time": "2016-10-27T10:35:46Z", "parent": { "type": "work_item_root", "id": "1001" }, "version_stamp": 9, "release": { "type": "release", "id": "1001" }, "sprint": { "type": "sprint", "id": "1001" }, "description": "<html><body>\n<p>Emptying out items in cart takes way too long. It could take more than 45 seconds. </p> \n</body></html>", "fixed_in_build": null, "qa_owner": null, "invested_hours": 0, "detected_by": { "type": "workspace_user", "id": "1003" }, "closed_on": null, "id": "1014", "last_modified": "2016-10-27T11:12:15Z", "defect_type": { "type": "list_node", "id": "1026" }, "phase": { "type": "phase", "id": "1001" }, "severity": { "type": "list_node", "id": "1005" }, "owner": { "type": "workspace_user", "id": "1004" }, "author": { "type": "workspace_user", "id": "1003" }, "story_points": 4, "product_areas": { "total_count": 2, "data": [ { "type": "product_area", "id": "1005" }, { "type": "product_area", "id": "1003" } ] }, "team": { "type": "team", "id": "1003" }, "remaining_hours": 0, "priority": { "type": "list_node", "id": "1015" }, "user_tags": { "total_count": 1, "data": [ { "type": "user_tag", "id": "1001" } ] }, "taxonomies": { "total_count": 1, "data": [ { "type": "taxonomy_item_node", "id": "1008" } ] }, "name": "Emptying out items in cart takes way too long", "estimated_hours": 0, "detected_in_build": null }

リリースなどの一部のエンティティは、ワークスペースコンテキストと共有エリアコンテキストの両方に存在できます。
エンティティが共有エリアコンテキストに存在する場合、関連付けられているすべてのワークスペースで使用できます。shared_areaという予約済みリソースに保存されます。
環境 | リクエスト |
---|---|
ワークスペース (非共有) | GET .../api/shared_spaces/2001/workspaces/1003/releases |
スペース (共有) | GET .../api/shared_spaces/2001/shared_area/releases |
参照情報: