Structure.Testy status is a Structure attribute, which can be requested from Structure via the REST interface, URL: /rest/structure/2.0/value
You can request status with a POST request containing at least these headers:
Accept:application/json, text/javascript, */*; q=0.01 Content-Type:application/json; charset=UTF-8 |
Authorization headers must also be included.
{ "requests": [{ "forestSpec": {"structureId": 103, "title": true}, "rows": [182, 184, 212], "attributes": [ { "id":"com.almworks.testy.status-report", "format":"json", "params":{ "testRun":4 } }] }] } |
You have to specify row ids (rows) in the request body.
The response will look like this:
{ "responses": [ { "forestSpec": { "structureId": 103, "title": true }, "rows": [ 182, 184, 212 ], "data": [ { "attribute": { "id": "com.almworks.testy.status-report", "params": { "testRun": 4 }, "format": "json" }, "values": [ { "value": "FAILED", "self": "FAILED", "FAILED": 1, "BLOCKED": 1 }, { "value": "BLOCKED" }, { "value": "FAILED" } ], "trailMode": "INDEPENDENT,AGGREGATE", "trails": [ "", "", "" ] } ], "forestVersion": { "signature": -1385959428, "version": 1 } } ], "itemTypes": {}, "itemsVersion": { "signature": -558220658, "version": 1 } } |
The response contains a values array with statuses. Groups will contain aggregating info like this:
"FAILED": 1, "BLOCKED": 1 |