Resource: Grid Widget Data ( /api/gridwidget/{widgetType}/data/{dataName} )

Allows the retrieval of data for a grid widget.

This resource supports the following methods: POST

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

StatusDescription
200 - OKReturned if the request was completed successfully.
404 - NotFoundReturned 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

KeyValueDescription
Acceptapplication/json

Request Parameters

KeyValueDescription
{widgetType}RunStatusesGroupedByFieldForAutomatedRunsType of widget to return data from.
{dataName}resultsThe 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

KeyValueDescription
Content-Typeapplication/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

  • No labels