Repository navigation
Add dashboard_widget and dashboard_widget_write tools #1727
Stijn Devolder (itinerisstijndevolder)
started this conversation in
Backlog of Suggestions
Replies: 1 comment
|
Sorry, this is not something we have plans for. I will add this to the discussion backlog. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Implement two new tools that integrate with the Azure DevOps Dashboard Widgets APIs to enable reading and managing widgets on a dashboard. Without widget support, agents cannot see how a dashboard is configured (position, size, settings) or add and update widgets, for example to point a Query Tile at a saved query.
Following the consolidated toolset structure, this is a read tool (
dashboard_widget) and a write tool (dashboard_widget_write), each with anactionparameter, consistent with sub-resource tools such aswit_work_item_comment_write. This depends on the separatedashboard/dashboard_writeissue.Tools
Develop the following tools with full parameter support, including optional ones. All endpoints accept an optional
{team}path segment (team ID or name); expose it as an optionalteamparameter.dashboard_widget: Read widgets on a dashboard.Action
list: Get all widgets on a dashboard (position, size, settings, contributionId).Endpoint: GET https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1-preview.2
Action
get: Get a single widget.Endpoint: GET https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets/{widgetId}?api-version=7.1-preview.2
dashboard_widget_write: Create, update, replace and delete widgets.Action
create: Create a widget on a dashboard.Endpoint: POST https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1-preview.2
name,position(row,column),size(rowSpan,columnSpan),contributionId,settings(string),settingsVersion, optionaldashboard.eTag.Action
update: Partially update a single widget.Endpoint: PATCH https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets/{widgetId}?api-version=7.1-preview.2
Action
update_batch: Update several widgets in one call; widgets not passed are preserved.Endpoint: PATCH https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1-preview.2
eTagrequest header (dashboard widgets version) for concurrency.Action
replace: Override the state of a single widget.Endpoint: PUT https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets/{widgetId}?api-version=7.1-preview.2
Action
replace_all: Replace all widgets on a dashboard with the supplied widgets.Endpoint: PUT https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1-preview.2
Action
delete: Delete a widget.Endpoint: DELETE https://dev.azure.com/{organization}/{project}/{team}/\_apis/dashboard/dashboards/{dashboardId}/widgets/{widgetId}?api-version=7.1-preview.2
Documentation
Rules
eTagfor optimistic concurrency.DashboardApi).Use case
Cloning a team's dashboard for another team: read the source widgets with
dashboard_widget list, then recreate each one on the new dashboard withdashboard_widget_write create. Use the sameposition,size,contributionIdandsettings, with the query ID in each widget's settings swapped to the new team's saved query (see the separatewit_query_writeissue)All reactions