Data - Retrieve Rules

Recupera l'elenco delle regole e delle relative proprietà in base ai criteri specificati.

POST http://<Servername>/OperationsManager/data/rules

Corpo della richiesta

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

Nome Tipo Descrizione
criteria

string

Specificare i criteri per la ricerca.

Risposte

Nome Tipo Descrizione
200 OK

TableDataResponse

OK. Recuperato con successo l'elenco delle regole e delle relative proprietà in base ai criteri specificati

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

Esempio

RetrieveRules

Esempio di richiesta

POST http://<Servername>/OperationsManager/data/rules

[
  "DisplayName like '%MomSdkTest_v3 : Discovery rule to find all instances of  NT Services on a computer%'"
]

Risposta di esempio

{
  "tableColumns": [
    {
      "field": "id",
      "header": "Id",
      "type": null,
      "hidden": true
    },
    {
      "field": "targetid",
      "header": "Target Id",
      "type": null,
      "hidden": true
    },
    {
      "field": "displayname",
      "header": "Display Name",
      "type": null,
      "hidden": false
    },
    {
      "field": "description",
      "header": "Description",
      "type": null,
      "hidden": false
    },
    {
      "field": "enabled",
      "header": "Enabled",
      "type": null,
      "hidden": false
    },
    {
      "field": "targetname",
      "header": "Target",
      "type": null,
      "hidden": false
    }
  ],
  "rows": [
    {
      "id": "54592d73-7c17-1ab2-7b31-0ab9b237ea6e",
      "targetid": "a4201cd2-feff-b19b-997c-38a8a0c0aa59",
      "displayname": "MomSdkTest_v3 : Discovery rule to find all instances of  NT Services on a computer",
      "description": "This rule discovers all instances of Windows NT Services installed on this computer by querying WMI",
      "enabled": "true",
      "targetname": "MomSdkTest_v3 : Windows Computer"
    }
  ]
}

Definizioni

Nome Descrizione
TableColumn
TableDataResponse

TableColumn

Nome Tipo Descrizione
field

string

Nome della colonna

header

string

Intestazione della colonna

hidden

boolean

Colonna nascosta

type

string

Tipo della colonna

TableDataResponse

Nome Tipo Descrizione
rows

object[]

Righe di dati tabella

tableColumns

TableColumn[]

Colonne di tabella di dati