Help Contents

 

Grid Widget State

Resource: Grid Widget State ( /api/gridwidgethost/{hostId}/project/{projectId}/position/{position} )

Allows retrieval of state information for a grid widget at a specified position within a widget host for the combination of current user and a specific project.

This resource supports the following methods: GET, PUT

Methods

GET


Retrieves the states of a widget at a specified position associated with a widget host for the current user and selected project.

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 a position was not specified.
404 - NotFoundReturned if project or position does not exist.

Example - GET

Retrieve state of widget at specific position.

Request Headers

KeyValueDescription
Content-typeapplication/json
Acceptapplication/json

Request Parameters

KeyValueDescription
{hostId}automated_test_run_summaryID of the host for the set of grid widgets.
{projectId}cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133Unique ID of project the grid widgets are being displayed for.
{position}rightThe position of the widget within the grid widget host (current valid values are 'left' and 'right').

Response Headers

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

Response Body

{
  "Position": "right",
  "WidgetType": "RunStatusesGroupedByFieldForAutomatedRuns",
  "Data": {
    "groupingType": "Field",
    "groupingField": "RunNumber"
  },
  "Self": "http://localhost/api/gridwidgethost/automated_test_run_summary/project/cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133/position/right"
}

Status Code

200 - OK

PUT


Sets the state of a widget at a specified position associated with a widget host for the current user and selected project.

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 a position was not specified.
404 - NotFoundReturned if widget type was invalid.

Example - PUT

Update state of widget at specific position.

Request Headers

KeyValueDescription
Content-typeapplication/json
Acceptapplication/json

Request Parameters

KeyValueDescription
{hostId}automated_test_run_summaryID of the host for the set of grid widgets.
{projectId}cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133Unique ID of project the grid widgets are being displayed for.
{position}rightThe position of the widget within the grid widget host (current valid values are 'left' and 'right').

Request Body

{
  "Position": null,
  "WidgetType": "RunStatusesGroupedByFieldForAutomatedRuns",
  "Data": {
    "groupingType": "Field",
    "groupingField": "RunNumber"
  }
}

Response Headers

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

Response Body

{
  "Position": "right",
  "WidgetType": "RunStatusesGroupedByFieldForAutomatedRuns",
  "Data": {
    "groupingType": "Field",
    "groupingField": "RunNumber"
  },
  "Self": "http://localhost/api/gridwidgethost/automated_test_run_summary/project/cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133/position/right"
}

Status Code

200 - OK