Partilhar via


My Workspace - Add Widget in MyWorkspace

Adiciona o widget no painel de instrumentos do myworkspace

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

Parâmetros do URI

Name Em Necessário Tipo Description
dashboardId
path True

string

Especifique o ID do painel de instrumentos.

Corpo do Pedido

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

Name Necessário Tipo Description
name True

string

Nome do Componente

componentType

string

Tipo de Componente

config

string

Componente Config

description

string

Descrição do Componente

Respostas

Name Tipo Description
200 OK

ComponentResponse

Ok. Adicionou widget com sucesso no meu espaço de trabalho.

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

Exemplos

MyWorkspace_AddWidget

Sample Request

POST http://<Servername>/OperationsManager/myWorkspace/dashboard/ea1c7f80-8022-4222-9be4-6158d46abd87/widget

{
  "name": "testwid",
  "description": "test",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":3,\"sizex\":6,\"sizey\":4,\"columns\":[\"severity\",\"monitoringobjectdisplayname\",\"name\",\"age\",\"repeatcount\",\"lastmodified\"],\"groupByColumn\":\"nogrouping\",\"expandGroupByColumn\":false,\"sortByColumn\":\"nosorting\",\"sortOrder\":1},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[]},\"criteria\":{\"severities\":[\"0\",\"1\",\"2\"],\"priorities\":[\"2\",\"1\",\"0\"],\"resolutionStates\":[\"0\",\"247\",\"248\",\"249\",\"250\",\"254\",\"255\"],\"age\":7,\"ageTimeUnit\":\"days\"}},\"widgetRefreshInterval\":5}",
  "componentType": "HtmlAlertWidget"
}

Sample Response

{
  "id": "6d91d7cd-729f-4cc3-938b-6cdb75842a49",
  "name": "testwid",
  "description": "test",
  "mpId": null,
  "componentType": "HtmlAlertWidget",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":3,\"sizex\":6,\"sizey\":4,\"columns\":[\"severity\",\"monitoringobjectdisplayname\",\"name\",\"age\",\"repeatcount\",\"lastmodified\"],\"groupByColumn\":\"nogrouping\",\"expandGroupByColumn\":false,\"sortByColumn\":\"nosorting\",\"sortOrder\":1},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[]},\"criteria\":{\"severities\":[\"0\",\"1\",\"2\"],\"priorities\":[\"2\",\"1\",\"0\"],\"resolutionStates\":[\"0\",\"247\",\"248\",\"249\",\"250\",\"254\",\"255\"],\"age\":7,\"ageTimeUnit\":\"days\"}},\"widgetRefreshInterval\":5}"
}

Definições

Name Description
ComponentRequest
ComponentResponse

ComponentRequest

Name Tipo Description
componentType

string

Tipo de Componente

config

string

Componente Config

description

string

Descrição do Componente

name

string

Nome do Componente

ComponentResponse

Name Tipo Description
componentType

string

Tipo de Componente

config

string

configuração

description

string

Descrição do componente

id

string

ID

mpId

string

ID mp componente

name

string

Nome do Componente