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).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if a position was not specified. |
404 - NotFound | Returned if project or position does not exist. |
Retrieve state of widget at specific position.
Request Headers
Key | Value | Description |
---|---|---|
Content-type | application/json | |
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{hostId} | automated_test_run_summary | ID of the host for the set of grid widgets. |
{projectId} | cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133 | Unique ID of project the grid widgets are being displayed for. |
{position} | right | The position of the widget within the grid widget host (current valid values are 'left' and 'right'). |
Response Headers
Key | Value | Description |
---|---|---|
Content-Type | application/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).
Status | Description |
---|---|
200 - OK | Returned if the request was completed successfully. |
403 - Forbidden | Returned if a position was not specified. |
404 - NotFound | Returned if widget type was invalid. |
Update state of widget at specific position.
Request Headers
Key | Value | Description |
---|---|---|
Content-type | application/json | |
Accept | application/json |
Request Parameters
Key | Value | Description |
---|---|---|
{hostId} | automated_test_run_summary | ID of the host for the set of grid widgets. |
{projectId} | cdd1a0cf-2cd1-4f9a-8513-a9a2fc74d133 | Unique ID of project the grid widgets are being displayed for. |
{position} | right | The 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
Key | Value | Description |
---|---|---|
Content-Type | application/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