Monitoring - Retrieve Widget

Pobiera właściwości i konfigurację widżetu.

GET http://<Servername>/OperationsManager/monitoring/widget/{widgetId}

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
widgetId
path True

string

Określanie identyfikatora widżetu

Odpowiedzi

Nazwa Typ Opis
200 OK

ComponentResponse

OK. Pomyślnie pobrano właściwości i konfigurację widżetu.

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

Przykłady

Monitoring_RetrieveWidget

Przykładowe żądanie

GET http://<Servername>/OperationsManager/monitoring/widget/8c9a13a6-0547-facb-bf43-e4af529a3468

Przykładowa odpowiedź

{
  "id": "8c9a13a6-0547-facb-bf43-e4af529a3468",
  "name": "Data from shell",
  "description": null,
  "mpId": "da187e72-b9d7-9e16-d098-3b0a624dc38c",
  "componentType": "HtmlPowershellWidget",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":2,\"sizex\":6,\"sizey\":4},\"widgetParameters\":{\"script\":\"$class = Get-SCOMClass -Name Microsoft.Windows.Computer  \\n$computers = Get-SCOMClassInstance -Class $class  \\n$i=1  \\nforeach ($computer in $computers)  \\n{  \\n    $results=$ScriptContext.CreateFromObject($computer,\\\"Id=Id,HealthState=HealthState,DisplayName=DisplayName\\\",$null)   \\n    $results[\\\"CustomColumn\\\"]=$i   \\n    $ScriptContext.ReturnCollection.Add($results)   \\n    $i++   \\n}\"},\"widgetRefreshInterval\":5}"
}

Definicje

ComponentResponse

Nazwa Typ Opis
componentType

string

Typ składnika

config

string

konfiguracja

description

string

Opis komponentu

id

string

Identyfikator

mpId

string

Identyfikator MP komponentu

name

string

Nazwa składnika