JDBC Driver for Azure DevOps

Build 24.0.9111

Widgets

Retrieves a list of dashboard widgets and details for a specific widget.

Table Specific Information

Select

The 本製品 uses the Azure DevOps API to process WHERE clause conditions built with the following columns and operators:

  • Id supports the '=' operator.
  • DashboardId supports the '=' operator.
  • TeamId supports the '=' operator.
The rest of the filter is executed client-side in the 本製品.

For example:

SELECT * FROM Widgets WHERE DashboardId = 'eee8499b-dbf1-4f81-8d13-e5613f24a81d'

SELECT * FROM Widgets WHERE DashboardId = '4b9cc7c1-d5c4-4647-a11c-38045b2ca2a5' AND TeamId = '1530e163-5321-4d48-81b5-f10a18d1c9b5'

Insert

The following are examples of inserting into the Widgets table:

INSERT INTO Widgets (Name, DashboardId, RowPosition, ColumnPosition, RowSpanSize, ColumnSpanSize, ContributionId) VALUES ('widget1', 'eee8499b-dbf1-4f81-8d13-e5613f24a81d', 10, 10, 1, 2, 'ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.BuildHistogramWidget')

INSERT INTO Widgets (Name, DashboardId, Settings, RowPosition, ColumnPosition, RowSpanSize, ColumnSpanSize, ContributionId) VALUES ('settingstest', '18fbcc4b-1309-45be-bf1a-eeb0730bf5d5', '{"buildDefinition":{"name":"devops-driver-test","id":289,"type":2,"uri":"vstfs:///Build/Definition/289","projectId":"62d9f6e9-17ef-4cbf-833a-eb713c874df1"},"fullBranchName":null}', 10, 10, 1, 2, 'ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.BuildHistogramWidget')

INSERT INTO Widgets (Name, DashboardId, TeamId, RowPosition, ColumnPosition, RowSpanSize, ColumnSpanSize, ContributionId) VALUES ('widget2', '4b9cc7c1-d5c4-4647-a11c-38045b2ca2a5', '1530e163-5321-4d48-81b5-f10a18d1c9b5', 10, 10, 1, 2, 'ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.BuildHistogramWidget')

Update

Note that the Name, RowSpanSize, ColumnSpanSize, ETag, DashboardETag, and ContributionId are required for updating Widgets. After a successful update, the ETag and DashboardETag will be increased by one, which must be taken into account when performing successive updates.

The following are examples of updating the Widgets table:

UPDATE Widgets SET Name='updatedWidget', RowSpanSize=2, ColumnSpanSize=2, ETag='2', DashboardETag='5', ContributionId='ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget' WHERE Id='7991b969-fde0-4cc6-b203-8858cf0e7a3c' AND DashboardId='18fbcc4b-1309-45be-bf1a-eeb0730bf5d5'

UPDATE Widgets SET Name='updatedWidget', RowSpanSize=2, ColumnSpanSize=2, ETag='2', DashboardETag='5', ContributionId='ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.MarkdownWidget' WHERE Id='7991b969-fde0-4cc6-b203-8858cf0e7a3c' AND DashboardId='18fbcc4b-1309-45be-bf1a-eeb0730bf5d5' AND TeamId = '1530e163-5321-4d48-81b5-f10a18d1c9b5'

Delete

The following are examples of deleting data from the Widgets table:

DELETE FROM Widgets WHERE Id='bfad6fd8-9f4f-4a53-aefc-5dadf11a37ec'

DELETE FROM Widgets WHERE Id='bfad6fd8-9f4f-4a53-aefc-5dadf11a37ec' AND TeamId = '1530e163-5321-4d48-81b5-f10a18d1c9b5'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

Unique Id of the widget.

ProjectId String False

The Id of the project to which this widget belongs.

TeamId String False

Teams.Id

The Id of the team to which this widget belongs.

DashboardId String False

Dashboards.Id

The Id of the dashboard to which this widget belongs.

ETag String False

Server defined version tracking value, used for edit collision detection.

Name String False

Name of the widget.

ArtifactId String False

Unique identifier of a feature artifact. Used for pinning or unpinning a specific artifact.

ConfigContributionId String False

ID of the configuration contribution.

ConfigContributionRelativeId String False

Relative ID of the configuration contribution.

ContentUri String False

Content Uri.

ContributionId String False

ID of the underlying contribution defining the supplied Widget Configuration.

DashboardETag String False

Dashboard-level eTag. Only available when a Widget Id is specified.

IsEnabled Boolean False

Whether the widget is enabled.

IsNameConfigurable Boolean False

Whether the widget name is configurable.

LoadingImageUrl String False

The loading image Url.

RowPosition Integer False

Row position of the widget, within a dashboard group.

ColumnPosition Integer False

Column position of the widget, within a dashboard group.

Settings String False

Settings of the widget.

MajorVersion Integer False

Major version for an artifact when you make incompatible API changes.

MinorVersion Integer False

Minor version for an artifact when you add functionality in a backwards-compatible manner.

PatchVersion Integer False

Patch version for an artifact when you make backwards-compatible bug fixes.

RowSpanSize Integer False

Width of the widget, expressed in dashboard grid columns.

ColumnSpanSize Integer False

Height of the widget, expressed in dashboard grid columns.

TypeId String False

Type Id of the widget.

Url String False

The full HTTP link to the widget. Only available when a Widget Id is specified.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9111