Edit

Share via


Data - Retrieve State Data

Retrieves state data for the specified scope/parameters.

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

Request Body

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

Name Type Description
classId

string

Specify the ClassID

criteria

string

Specify the criteria (such as severity, priority, resolution state, etc.)

displayColumns

string[]

Specify the Columns to be displayed

groupId

string

Specify the Group ID

objectIds

object

Specify an array of Object IDs

Responses

Name Type Description
200 OK

TableDataResponse

OK.Successfully retrieved health state data.

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

Examples

Data_RetrieveStateData

Sample request

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

{
  "classId": "6f7e3306-beeb-2996-3795-7c1eafb925b8",
  "groupId": null,
  "objectIds": {},
  "criteria": "((HealthState = '2') OR (HealthState = '0') OR HealthState is null OR (HealthState = '1') OR (HealthState = '3'))",
  "displayColumns": [
    "healthstate",
    "displayname",
    "path",
    "maintenancemode"
  ]
}

Sample response

{
  "tableColumns": [
    {
      "field": "healthstate",
      "header": "Health",
      "type": null,
      "hidden": false
    },
    {
      "field": "displayname",
      "header": "Display name",
      "type": null,
      "hidden": false
    },
    {
      "field": "path",
      "header": "Path",
      "type": null,
      "hidden": false
    },
    {
      "field": "maintenancemode",
      "header": "Maintenance mode",
      "type": null,
      "hidden": false
    },
    {
      "field": "id",
      "header": "Id",
      "type": null,
      "hidden": true
    }
  ],
  "rows": [
    {
      "id": "6f7e3306-beeb-2996-3795-7c1eafb925b8",
      "healthstate": "notmonitored",
      "displayname": "All Windows Computers",
      "path": "",
      "maintenancemode": "false"
    }
  ]
}

Definitions

Name Description
DataRequest
TableColumn
TableDataResponse

DataRequest

Name Type Description
classId

string

Specify the ClassID

criteria

string

Specify the criteria (such as severity, priority, resolution state, etc.)

displayColumns

string[]

Specify the Columns to be displayed

groupId

string

Specify the Group ID

objectIds

object

Specify an array of Object IDs

TableColumn

Name Type Description
field

string

Name of the Column

header

string

Header of the column

hidden

boolean

Is column hidden

type

string

Type of the Column

TableDataResponse

Name Type Description
rows

object[]

Table Rows of data

tableColumns

TableColumn[]

Table columns of data