Resource: Incident Comments ( /api/incident/{id}/comments )
Incident comment collection resource, provides the ability to retrieve all or a subset of comments associated with an incident. Currently to add new comments to an incident, you must update the incident and include a 'Comments' child collection (see the Incident resource examples for more details).
This resource supports the following methods: GET
Methods
GET
Retrieves all (or a subset) of an incident's comments.
This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.
Required Permissions
- TestManagement/ManageIncidents/View
Status Codes
These are the expected status codes returned by the service. In addition, some other status codes may be returned if either an internal error occurs or there is an authentication issue (such as an expired OAuth token).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if you don't have permission to view this incident. |
404 - NotFound | Returned if the incident does not exist. |
Retrieve a collection of all comments
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | a1f57de4-832f-4986-99e1-f026ea2e026f | ID of the incident to retrieve the comments for. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Items": [ { "Id": "1e401c7a-ae50-45c2-b94e-8227eebac854", "Body": "I have updated the priority of this to high, it's affecting all our customers", "CreatedById": "25e9dd38-475d-483b-9c50-3fafee0389b7", "CreatedByUserName": "joeb", "LastUpdatedById": "25e9dd38-475d-483b-9c50-3fafee0389b7", "LastUpdatedByUserName": "joeb", "CreatedAt": "2012-03-03T21:34:22Z", "LastUpdatedAt": "0001-01-01T00:00:00Z", "Self": "http://localhost/api/incident/a1f57de4-832f-4986-99e1-f026ea2e026f/comment/1e401c7a-ae50-45c2-b94e-8227eebac854", "Links": [ { "Href": "http://localhost/api/user/25e9dd38-475d-483b-9c50-3fafee0389b7", "Rel": "CreatedBy" }, { "Href": "http://localhost/api/user/25e9dd38-475d-483b-9c50-3fafee0389b7", "Rel": "LastUpdatedBy" } ] }, { "Id": "2aa4900c-e022-4abd-9e3b-ed764f286867", "Body": "Issue is now resolved in feature branch - requires further testing before being released to production.", "CreatedById": "25e9dd38-475d-483b-9c50-3fafee0389b7", "CreatedByUserName": "joeb", "LastUpdatedById": "25e9dd38-475d-483b-9c50-3fafee0389b7", "LastUpdatedByUserName": "joeb", "CreatedAt": "2012-04-05T00:11:10Z", "LastUpdatedAt": "0001-01-01T00:00:00Z", "Self": "http://localhost/api/incident/a1f57de4-832f-4986-99e1-f026ea2e026f/comment/2aa4900c-e022-4abd-9e3b-ed764f286867", "Links": [ { "Href": "http://localhost/api/user/25e9dd38-475d-483b-9c50-3fafee0389b7", "Rel": "CreatedBy" }, { "Href": "http://localhost/api/user/25e9dd38-475d-483b-9c50-3fafee0389b7", "Rel": "LastUpdatedBy" } ] } ] }
Status Code
200 - OK