Delen via


Monitoring - Add Widget to Dashboard

Hiermee voegt u een widget toe aan een bestaand dashboard

POST http://<Servername>/OperationsManager/monitoring/dashboard/{dashboardId}/widget

URI-parameters

Name In Vereist Type Description
dashboardId
path True

string

Geef de dashboard-id op.

Aanvraagbody

Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"

Name Vereist Type Description
name True

string

Naam van onderdeel

componentType

string

Onderdeeltype

config

string

Onderdeelconfiguratie

description

string

Beschrijving van onderdeel

mpDescription

string

MP-beschrijving

mpId

string

Mp-id

mpName

string

MP-naam

mpVersion

string

MP-versie

path

string

Pad

Antwoorden

Name Type Description
200 OK

ComponentResponse

OK. De widget is toegevoegd aan het dashboard.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

Voorbeelden

Monitoring_AddWidget

Sample Request

POST http://<Servername>/OperationsManager/monitoring/dashboard/b0ba870b-6d74-2f8f-2e36-99674ae53265/widget

{
  "mpId": "3d9a3d4f-f4f6-6027-6067-844af086fe3d",
  "path": "Monitoring",
  "name": "windows state",
  "description": "test",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":2,\"sizex\":6,\"sizey\":4,\"columns\":[\"healthstate\",\"displayname\",\"path\",\"maintenancemode\"]},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[],\"classSelection\":[{\"id\":\"6f7e3306-beeb-2996-3795-7c1eafb925b8\",\"displayName\":\"All Windows Computers\",\"className\":\"Microsoft.SystemCenter.Library!Microsoft.SystemCenter.AllComputersGroup\",\"path\":null,\"fullName\":null,\"objectType\":-2}]},\"criteria\":{\"healthStates\":[\"2\",\"0\",\"1\",\"3\"],\"inMaintenanceMode\":\"All\"}},\"widgetRefreshInterval\":5}",
  "componentType": "HtmlStateWidget"
}

Sample Response

{
  "id": "7f91358b-4155-a753-2a4b-7f97f287ab8f",
  "name": "windows state",
  "description": null,
  "mpId": "3d9a3d4f-f4f6-6027-6067-844af086fe3d",
  "componentType": "HtmlStateWidget",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":2,\"sizex\":6,\"sizey\":4,\"columns\":[\"healthstate\",\"displayname\",\"path\",\"maintenancemode\"]},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[],\"classSelection\":[{\"id\":\"6f7e3306-beeb-2996-3795-7c1eafb925b8\",\"displayName\":\"All Windows Computers\",\"className\":\"Microsoft.SystemCenter.Library!Microsoft.SystemCenter.AllComputersGroup\",\"path\":null,\"fullName\":null,\"objectType\":-2}]},\"criteria\":{\"healthStates\":[\"2\",\"0\",\"1\",\"3\"],\"inMaintenanceMode\":\"All\"}},\"widgetRefreshInterval\":5}"
}

Definities

Name Description
ComponentResponse
MonitoringComponentRequest

ComponentResponse

Name Type Description
componentType

string

Onderdeeltype

config

string

configuratie

description

string

Beschrijving van onderdeel

id

string

Id

mpId

string

MP-id van onderdeel

name

string

Naam onderdeel

MonitoringComponentRequest

Name Type Description
componentType

string

Onderdeeltype

config

string

Onderdeelconfiguratie

description

string

Beschrijving van onderdeel

mpDescription

string

MP-beschrijving

mpId

string

Mp-id

mpName

string

MP-naam

mpVersion

string

MP-versie

name

string

Naam van onderdeel

path

string

Pad