Dela via


Data - Retrieve Rules

Hämtar listan över regler och deras egenskaper baserat på de angivna kriterierna.

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

Begärandetext

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

Name Typ Description
criteria

string

ange villkor för sökning.

Svar

Name Typ Description
200 OK

TableDataResponse

Okej. Listan över regler och deras egenskaper har hämtats baserat på de angivna kriterierna

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

Exempel

RetrieveRules

Sample Request

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

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

Sample Response

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

Definitioner

Name Description
TableColumn
TableDataResponse

TableColumn

Name Typ Description
field

string

Namnet på kolumnen

header

string

Kolumnrubrik

hidden

boolean

Är kolumnen dold

type

string

Typ av kolumn

TableDataResponse

Name Typ Description
rows

object[]

Tabellrader med data

tableColumns

TableColumn[]

Tabellkolumner med data