Resource: Step Result Incidents ( /api/stepresult/{id}/incidents )
Step Result Incidents (collection) resource - used to retrieve a collection of all incidents linked to a step, or to link a new incident to a step.
This resource supports the following methods: GET, POST
Methods
GET
Retrieves list of incidents linked to the step result.
This method supports the OData parameters $filter, $top, $take, $orderby and $inlinecount. See OData Topic for more details.
Required Permissions
- TestManagement/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 do not have permission to view the list of incidents associated with this step result. |
404 - NotFound | Returned if step result does not exist. |
Retrieves all incidents linked to a step result.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | 0F61B42D-87F9-40B8-89EE-1BC12A6B5DBA | The unique identifier (GUID) of the step result. |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Items": [ { "StepResultId": "b849f98e-62b2-460c-97ef-49e6c478a3f9", "IncidentId": "0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Expands": [ "Incident", "StepResult" ], "Self": "http://localhost/api/stepresult/b849f98e-62b2-460c-97ef-49e6c478a3f9/incident/0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Links": [ { "Href": "http://localhost/api/incident/0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Rel": "Incident" } ] }, { "StepResultId": "b849f98e-62b2-460c-97ef-49e6c478a3f9", "IncidentId": "24dfb384-2026-487d-b04b-2de429933508", "Expands": [ "Incident", "StepResult" ], "Self": "http://localhost/api/stepresult/b849f98e-62b2-460c-97ef-49e6c478a3f9/incident/24dfb384-2026-487d-b04b-2de429933508", "Links": [ { "Href": "http://localhost/api/incident/24dfb384-2026-487d-b04b-2de429933508", "Rel": "Incident" } ] } ] }
Status Code
200 - OK
POST
Create step run result incident link.
Required Permissions
- TestManagement/ExecuteTests
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 incident was already linked to this step. |
201 - Created | Returned if link to incident was created successfully. |
403 - Forbidden | Returned if insufficient permission to link to this incident. |
404 - NotFound | Returned if step result or incident does not exist. |
Create a new incident to step result link.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{id} | B849F98E-62B2-460C-97EF-49E6C478A3F9 | The unique identifier (GUID) of the step result. |
Request Body
{ "StepResultId": null, "IncidentId": "0f61b42d-87f9-40b8-89ee-1bc12a6b5dba" }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 | |
Location | http://localhost/api/stepresult/B849F98E-62B2-460C-97EF-49E6C478A3F9/incident/0F61B42D-87F9-40B8-89EE-1BC12A6B5DBA |
Response Body
{ "StepResultId": "b849f98e-62b2-460c-97ef-49e6c478a3f9", "IncidentId": "0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Expands": [ "Incident", "StepResult" ], "Self": "http://localhost/api/stepresult/b849f98e-62b2-460c-97ef-49e6c478a3f9/incident/0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Links": [ { "Href": "http://localhost/api/incident/0f61b42d-87f9-40b8-89ee-1bc12a6b5dba", "Rel": "Incident" } ] }
Status Code
201 - Created