GET: Read all instances

An instance is a complete functional unit of information, for example, a single defect. The properties of an instance are represented by data in JSON format.

Instances are members of collections. See Collections.

To get the resource for an entity, use the URI for the entity collection.

GET .../api/shared_spaces/{shared_space_uid}/workspaces/{workspace_id}/defects

Note: When GETting instances, the REST API does not necessarily display all fields for the instance. For a complete list of available fields, see Retrieve metadata about entities and fields.

Example of getting all defects

GET .../api/shared_spaces/<shared_space_id>/workspaces/2002/defects
*** Response ***  
{
                "total_count": 3,
                "data": [{
                                "type": "defect",
                                "creation_time": "2016-10-27T10:35:46Z",
                                "parent": {
                                                "type": "work_item_root",
                                                "id": "1001"
                                },
                                "version_stamp": 9,
                                "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>",
                                "id": "1014",
                                "severity": {
                                                "type": "list_node",
                                                "id": "1005"
                                },
                                "name": "Emptying out items in cart takes way too long",
                                ...
                },
                {
                                "type": "defect",
                                "creation_time": "2016-10-27T10:32:23Z",
                                "parent": {
                                                "type": "feature",
                                                "id": "1007"
                                },
                                "version_stamp": 8,
                                "description": "<html><body>\n<p>Shortcut key for deleting all items in cart does not work when there are more than 10 items in the cart.</p> \n</body></html>",
                                "id": "1012",
                                "severity": {
                                                "type": "list_node",
                                                "id": "1003"
                                },
                                "name": "Shortcut key for deleting all items in cart does not work.",
                                ...
                },
                {
                                "type": "defect",
                                "creation_time": "2016-10-27T10:33:03Z",
                                "parent": {
                                                "type": "feature",
                                                "id": "1007"
                                },
                                "version_stamp": 9,
                                "description": "<html><body>\n<p>When adding one item to cart, it appears as if the item was added two times. In actuality, it is only added once. If the user refreshes the screen, it appears correctly. This only happens in Chrome.</p> \n</body></html>",
                                "id": "1013",
                                "severity": {
                                                "type": "list_node",
                                                "id": "1005"
                                },
                                "name": "When adding one item to cart, it appears as if the item was added two times.",
                                ...
                }],
                "exceeds_total_count": false
}

Back to top

See also: