Delen via


Data - Retrieve PowerShell Output

Hiermee worden gegevens opgehaald na het uitvoeren van het opgegeven PowerShell-script voor widgetID en dashboardtype

GET http://<Servername>/OperationsManager/data/powershell?widgetId={widgetId}&dashboardType={dashboardType}

URI-parameters

Name In Vereist Type Description
dashboardType
query True

string

Het dashboardtype opgeven

widgetId
query True

string

Geef de widget-id op

Antwoorden

Name Type Description
200 OK

TableDataResponse

OK. De gegevens zijn opgehaald na het uitvoeren van het opgegeven PowerShell-script.

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

Voorbeelden

RetrievePowerShellOutput

Sample Request

GET http://<Servername>/OperationsManager/data/powershell?widgetId=8c9a13a6-0547-facb-bf43-e4af529a3468&dashboardType=MONITORING

Sample Response

{
  "tableColumns": [
    {
      "field": "healthstate",
      "header": "HealthState",
      "type": "HealthStateType",
      "hidden": false
    },
    {
      "field": "displayname",
      "header": "DisplayName",
      "type": null,
      "hidden": false
    },
    {
      "field": "customcolumn",
      "header": "CustomColumn",
      "type": null,
      "hidden": false
    },
    {
      "field": "id",
      "header": "Id",
      "type": null,
      "hidden": true
    },
    {
      "field": "path",
      "header": "Path",
      "type": null,
      "hidden": false
    }
  ],
  "rows": [
    {
      "healthstate": "unknown",
      "displayname": "LlhmpKkOvfnZ2tR7VF1yIcgo02c1S7q9FPLsa9h7hl5kEHVHViIKu9vtE3wxst5xyoTmhigWi3Qgg5ktgUftzgOGecn.NuPypIvaxtkxBvm0sONJTCQYNM7SZNIF48Jxoc1YKJ5wtssD3XYPOeO",
      "customcolumn": "1",
      "id": "aeee35a8-c9bc-916d-a86a-ab4fd0e4f8e8",
      "path": ""
    },
    {
      "healthstate": "unknown",
      "displayname": "scomdevserver.contoso.net",
      "customcolumn": "2",
      "id": "9f2ef630-9784-9e27-bbd0-af9900d8264f",
      "path": ""
    }
  ]
}

Definities

Name Description
TableColumn
TableDataResponse

TableColumn

Name Type Description
field

string

Naam van de kolom

header

string

Koptekst van de kolom

hidden

boolean

Is de kolom verborgen

type

string

Type van de kolom

TableDataResponse

Name Type Description
rows

object[]

Tabelrijen met gegevens

tableColumns

TableColumn[]

Tabelkolommen met gegevens