次の方法で共有


Monitoring - Retrieve Widgets by Dashboard ID

特定のダッシュボードで定義されているすべてのウィジェットのプロパティと構成を取得します

GET http://<Servername>/OperationsManager/monitoring/dashboard/{dashboardId}/widgets

URI パラメーター

名前 / 必須 説明
dashboardId
path True

string

ダッシュボード ID の指定

応答

名前 説明
200 OK

ComponentResponse[]

わかりました。特定のダッシュボードに存在するすべてのウィジェットのプロパティと構成を正常に取得しました。

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

RetrieveWidgetsbyDashboardID

要求のサンプル

GET http://<Servername>/OperationsManager/monitoring/dashboard/5a9d9caf-6453-5d7c-ae4d-cf53fb6dc298/widgets

応答のサンプル

[
  {
    "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}"
  }
]

定義

ComponentResponse

名前 説明
componentType

string

コンポーネントの種類

config

string

設定

description

string

コンポーネントの説明

id

string

身分証明書

mpId

string

コンポーネントMP ID

name

string

コンポーネント名