0

I am building an Azure devops dashboard with custom widgets for my organization. There are some common configurations to some of the widgets. Is there any way I can achieve this without actual modifying every widget individually. In other words, is there a way I can pass parameter to all these widgets?

I am super new to Azure/Azure devops dashboard. Please route me to the right board if this isn't the right one. Thank you.

  • Not get your latest information, is the workaround helpful for you? Or if you have any concern, feel free to share it here – Hugh Lin Jun 01 '20 at 09:53

2 Answers2

0

You can try to use this rest api : Widgets - Update Widgets

PATCH https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=5.1-preview.2

Sample request body:

{
    "id": "69f6c5b7-0eb0-4067-b75f-6edff74d0fcf",
    "eTag": "5",
    "name": "Other Links",
    "position": {
      "row": 1,
      "column": 2
    },
    "size": {
      "rowSpan": 1,
      "columnSpan": 2
    },
    "settings": null,
    "settingsVersion": {
      "major": 1,
      "minor": 0,
      "patch": 0
    },
    "contributionId": "ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.OtherLinksWidget"
  }
Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
0

I haven't tried this myself but you could try the Extension Data Service: https://learn.microsoft.com/en-us/azure/devops/extend/reference/client/api/vss/sdk/services/extensiondata/extensiondataservice?view=azure-devops

To Instantiate this you provide a publisher name, extension name and registration id. the ID I think is scoped to the VSIX package so if all your extensions are published in the same package then they may be able to share data using this service.

Your other option would be to require the user to setup and configure in your widget an Azure service to act as the integration point. If the value is high enough they may do it but it would be a chore and likely a cost.

DavidJ
  • 71
  • 3