Resource: Grid Widget Data ( /api/gridwidget/{widgetType}/data/{dataName} )
Allows the retrieval of data for a grid widget.
Methods
POST
Retrieves the data set for a grid widget.
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. |
404 - NotFound | Returned if widget type was invalid. |
Example - POST
Retrieve a set of data (by name) for a type of grid widget. Note: this is a POST rather than a GET request, because a large amount of contextual state must be passed in for this operation to complete.
Request Headers
Key | Value | Description |
---|---|---|
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{widgetType} | RunStatusesGroupedByFieldForAutomatedRuns | Type of widget to return data from. |
{dataName} | results | The name of the data set to retrieve (data may be retrieved for displaying on the widget, or for populating additional metadata required for configuring the widget). |
Request Body
{ "IndexName": "Run", "AllowableTypes": [ "AutomatedTestRun", "ScriptRun", "AgileRun" ], "BaseQuery": "AssignmentID = 2d8d6b25-0203-4595-9903-1325bcd85948", "ProjectId": "cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133", "PackageId": "df3097c2-0777-4156-9186-d321e9611481", "PackageType": "ExecutionPackage", "Query": "ORDER BY CreatedAt DESC", "Selections": [ { "Id": "482c3531-1781-42ae-b084-7369964e674a", "Type": "AutomatedTestRun" }, { "Id": "281850fd-cf28-484c-b88a-e4ff43b49e27", "Type": "AgileRun" } ], "TimeZone": "America/New_York", "Parameters": { "groupingType": "Field", "groupingField": "RunNumber" } }
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json; charset=utf-8 |
Response Body
{ "Data": { "Results": [ { "Key": "1", "InProgress": 0, "Undetermined": 0, "Errors": 0, "Failed": 167, "NotRun": 0, "Passed": 2588, "Skipped": 3, "Warnings": 0, "Blocked": 0 } ] } }
Status Code
0 - 0