Share via


Widget Types - Get Widget Metadata

Get the widget metadata satisfying the specified contribution ID.

GET https://dev.azure.com/{organization}/{project}/_apis/dashboard/widgettypes/{contributionId}?api-version=7.1-preview.1

URI Parameters

Name In Required Type Description
contributionId
path True

string

The ID of Contribution for the Widget

organization
path True

string

The name of the Azure DevOps organization.

project
path

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.

Responses

Name Type Description
200 OK

WidgetMetadataResponse

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.dashboards Grants the ability to read team dashboard information

Examples

Sample request

GET https://dev.azure.com/fabrikam/_apis/dashboard/widgettypes/{contributionId}?api-version=7.1-preview.1

Sample response

{
  "widgetMetadata": {
    "typeId": "Microsoft.VisualStudioOnline.Dashboards.OtherLinks",
    "name": "Other Links Widget",
    "previewImageUrl": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"Application\"}}_static/Widgets/otherLinksPreview.png",
    "description": "Shows relavant links for the team.",
    "isVisibleFromCatalog": true,
    "isEnabled": true,
    "contentUri": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"ProjectCollection\"}}{{project.name}}/_widgets/OtherLinks",
    "allowedSizes": [
      {
        "rowSpan": 1,
        "columnSpan": 2
      }
    ],
    "contribution": {
      "extension": {
        "id": "bfb0eae0-a71f-469d-a021-9e650546db6b",
        "namespace": "dashboards.other-links",
        "version": "0.0.1",
        "name": "Other Links Widget",
        "description": "Shows relavant links for the team",
        "provider": {
          "name": "Microsoft",
          "website": "https://www.microsoft.com"
        },
        "icon": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"Application\"}}_static/Widgets/otherLinksPreview.png",
        "contributions": {
          "vs.Dashboards.web#widget": [
            {
              "id": "Microsoft.VisualStudioOnline.Dashboards.OtherLinks",
              "name": "Other Links Widget",
              "previewImageUrl": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"Application\"}}_static/Widgets/otherLinksPreview.png",
              "description": "Shows relavant links for the team.",
              "uri": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"ProjectCollection\"}}{{project.name}}/_widgets/OtherLinks",
              "supportedSizes": [
                {
                  "rowSpan": 1,
                  "columnSpan": 2
                }
              ]
            }
          ]
        },
        "publishInfo": {
          "store": {
            "extensionStoreType": "builtIn",
            "target": "0093aaee-9eff-4562-a0f2-8ea21a4cc590"
          },
          "ownerId": "6915b3ed-b527-4a61-812e-19d0629e2e08",
          "lastUpdated": "2015-05-12T21:18:54.827Z"
        }
      },
      "point": {
        "extensionNamespace": "vs.Dashboards.web",
        "extensionRelativeId": "widget",
        "id": "vs.Dashboards.web#widget"
      },
      "properties": {
        "id": "Microsoft.VisualStudioOnline.Dashboards.OtherLinks",
        "name": "Other Links Widget",
        "previewImageUrl": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"Application\"}}_static/Widgets/otherLinksPreview.png",
        "description": "Shows relavant links for the team.",
        "uri": "{{ServiceUrl \"00025394-6065-48CA-87D9-7F5672854EF7\" \"ProjectCollection\"}}{{project.name}}/_widgets/OtherLinks",
        "supportedSizes": [
          {
            "rowSpan": 1,
            "columnSpan": 2
          }
        ]
      }
    }
  },
  "uri": "https://dev.azure.com/fabrikam/_apis/Dashboard/WidgetTypes/Microsoft.VisualStudioOnline.Dashboards.OtherLinks"
}

Definitions

Name Description
LightboxOptions

Lightbox configuration

WidgetMetadata

Contribution based information describing Dashboard Widgets.

WidgetMetadataResponse
WidgetScope

Data contract required for the widget to function and to work in its container.

WidgetSize

LightboxOptions

Lightbox configuration

Name Type Description
height

integer (int32)

Height of desired lightbox, in pixels

resizable

boolean

True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false.

width

integer (int32)

Width of desired lightbox, in pixels

WidgetMetadata

Contribution based information describing Dashboard Widgets.

Name Type Description
allowedSizes

WidgetSize[]

Sizes supported by the Widget.

analyticsServiceRequired

boolean

Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available.

catalogIconUrl

string

Resource for an icon in the widget catalog.

catalogInfoUrl

string

Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted

configurationContributionId

string

The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.

configurationContributionRelativeId

string

The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available.

configurationRequired

boolean

Indicates if the widget requires configuration before being added to dashboard.

contentUri

string

Uri for the widget content to be loaded from .

contributionId

string

The id of the underlying contribution defining the supplied Widget.

defaultSettings

string

Optional default settings to be copied into widget settings.

description

string

Summary information describing the widget.

isEnabled

boolean

Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context)

isNameConfigurable

boolean

Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest.

isVisibleFromCatalog

boolean

Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog.

keywords

string[]

Keywords associated with this widget, non-filterable and invisible

lightboxOptions

LightboxOptions

Opt-in properties for customizing widget presentation in a "lightbox" dialog.

loadingImageUrl

string

Resource for a loading placeholder image on dashboard

name

string

User facing name of the widget type. Each widget must use a unique value here.

publisherName

string

Publisher Name of this kind of widget.

supportedScopes

WidgetScope[]

Data contract required for the widget to function and to work in its container.

tags

string[]

Tags associated with this widget, visible on each widget and filterable.

targets

string[]

Contribution target IDs

typeId

string

Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types.

WidgetMetadataResponse

Name Type Description
uri

string

widgetMetadata

WidgetMetadata

Contribution based information describing Dashboard Widgets.

WidgetScope

Data contract required for the widget to function and to work in its container.

Value Description
collection_User
project_Team

WidgetSize

Name Type Description
columnSpan

integer (int32)

The Width of the widget, expressed in dashboard grid columns.

rowSpan

integer (int32)

The height of the widget, expressed in dashboard grid rows.