Resource: Automated Test Run Incidents ( /api/automatedtestrun/{runId}/node/{nodeId}/incidents )

A collection resource representing the incident links of an automated test run.

This resource supports the following methods: GET, POST

Methods

GET


Retrieves the incidents for a particular automated test run.

Required Permissions

  • TestManagement/ManageIncidents/View
  • TestManagement/ManageExecutions/View

Supported Expansions

For more details on expansions, please see the Expand help topic.

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).

StatusDescription
200 - OKReturned if the request was completed successfully.
403 - ForbiddenReturned if ET could not complete the request (normally due to a validation failure or the necessary permissions to complete the request have not been met).
404 - NotFoundReturned if the ID for the run or node was not found in the database.

Example - GET

Retrieves a list of incidents for a particular automated test run.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{runId}1459858c-9526-412e-afdd-09415593c2d3The unique identifier (GUID) of the automated test run.
{nodeId}b8166143-c269-4bd8-876e-d2584edc4e2eThe unique identifier (GUID) of the automated test run result node.

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8

Response Body

{
  "Items": [
    {
      "RunId": "1459858c-9526-412e-afdd-09415593c2d3",
      "NodeId": "b8166143-c269-4bd8-876e-d2584edc4e2e",
      "IncidentId": "5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
      "Expands": [
        "Run",
        "Node",
        "Incident"
      ],
      "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/node/b8166143-c269-4bd8-876e-d2584edc4e2e/incident/5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
      "Links": [
        {
          "Href": "http://localhost/api/incident/5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
          "Rel": "Incident"
        }
      ]
    },
    {
      "RunId": "1459858c-9526-412e-afdd-09415593c2d3",
      "NodeId": "b8166143-c269-4bd8-876e-d2584edc4e2e",
      "IncidentId": "02b6a3f5-121c-4900-8d10-16604ed2c297",
      "Expands": [
        "Run",
        "Node",
        "Incident"
      ],
      "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/node/b8166143-c269-4bd8-876e-d2584edc4e2e/incident/02b6a3f5-121c-4900-8d10-16604ed2c297",
      "Links": [
        {
          "Href": "http://localhost/api/incident/02b6a3f5-121c-4900-8d10-16604ed2c297",
          "Rel": "Incident"
        }
      ]
    }
  ]
}

Status Code

200 - OK

POST


Adds an incident link to a particular automated test run.

Required Permissions

  • TestManagement/ManageExecutions/ExecuteAllTests
  • TestManagement/ManageExecutions/ExecuteOnlyMyTests
  • TestManagement/ManageIncidents/Edit

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).

StatusDescription
201 - CreatedReturned if the request was completed successfully.
400 - BadRequestReturned if the POST data was incorrect.
403 - ForbiddenReturned if ET could not complete the request (normally due to a validation failure or the necessary permissions to complete the request have not been met).
404 - NotFoundReturned if the ID for the run, node or incident was not found in the database.

Example - POST

Adds a new incident to a particular automated test run.

Request Headers

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{runId}1459858c-9526-412e-afdd-09415593c2d3The unique identifier (GUID) of the automated test run.
{nodeId}b8166143-c269-4bd8-876e-d2584edc4e2eThe unique identifier (GUID) of the automated test run result node.

Request Body

{
  "IncidentId": "5a5be006-ba7b-4c45-b3a8-ce8d793066dd"
}

Response Headers

KeyValueDescription
Locationhttp://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/node/b8166143-c269-4bd8-876e-d2584edc4e2e/incident/5a5be006-ba7b-4c45-b3a8-ce8d793066ddThe location of the new incident resource.

Response Body

{
  "RunId": "1459858c-9526-412e-afdd-09415593c2d3",
  "NodeId": "b8166143-c269-4bd8-876e-d2584edc4e2e",
  "IncidentId": "5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
  "Expands": [
    "Run",
    "Node",
    "Incident"
  ],
  "Self": "http://localhost/api/automatedtestrun/1459858c-9526-412e-afdd-09415593c2d3/node/b8166143-c269-4bd8-876e-d2584edc4e2e/incident/5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
  "Links": [
    {
      "Href": "http://localhost/api/incident/5a5be006-ba7b-4c45-b3a8-ce8d793066dd",
      "Rel": "Incident"
    }
  ]
}

Status Code

201 - Created

  • No labels