Page tree

The response of a URL depends on the action parameter that you pass. An authenticate request returns an authentication token that is needed for successive requests. A metadata request retrieves the metadata of a specified resource. A configdata request retrieves the configuration data of a specified resource. A stats request retrieves the performance statistics data of a specified resource.

In addition, all the requests return a unique identifier that BMC ProactiveNet uses to identify a resource and the time at which the data was retrieved.

This section covers the sample responses for the configdata, metadata, and stats APIs.

Sample response to the configdata API

This section lists a sample URL request to retrieve configuration data from a single device and its corresponding response in the JSON format.

URL to access the configdata API

The sample URL to access the configdata API is as follows:

http://bppmwsserver:80/bppmws/api/CI/bppmci.calbro.com/
configdata?idType
=Name

where:

  • CI is the resource type.
  • bppmwsserver.com is the resource identifier, and it represents the name of the CI.
  • configdata is the action, and it represents the request to retrieve the configuration data of the CI.
  • idType=Name indicates that you have used the name of the CI as the identifier.

JSON response to the configdata API

A sample JSON response is as follows:

{
      "response": [
            {
                  "monitorInstances": [
                        {
                              "monitorTypeName": "Windows File System",
                              "monitorInstanceId": "bppmwsserver:21013:16",
                              "statusCode": "200",
                              "statusMsg": "OK",
                              "attributes": [
                                    {
                                          "attributeName": "AVAILABILITY",
                                          "precision": 2,
                                          "unit": "%",
                                          "kpi": false
                                    },
                                    {
                                          "attributeName": "FREE_DISK_SPACE",
                                          "precision": 2,
                                          "unit": "MB",
                                          "kpi": false
                                    },
                                    {
                                          "attributeName": "USED_PERCENT",
                                          "precision": 2,
                                          "unit": "%",
                                          "kpi": false
                                    }
                              ],
                              "monitorInstanceName": "Windows File System"
                        }
                  ],
                  "statusCode": "200",
                  "statusMsg": "OK",
                  "resourceUniqueId": "",
                  "resourceId": "bppmwsserver.calbro.com",
                  "resourceIdType": "Name"
            }
      ],
      "statusCode": "200",
      "statusMsg": "OK",
      "responseTimeStamp": "2011-12-19T08:47:12"
}

Along with the configuration data, you can also find the unique identifier of the resource and the time stamp at which the request was run.

Sample response to the metadata API

This section lists a sample URL request to retrieve metadata from a single device and its corresponding response in the JSON format.

URL to access the metadata API

The sample URL to access the metadata API is as follows:

http://bppmwsserver:80/bppmws/api/Device/192.168.123.46/
metadata?idType=I
PAddress

where:

  • Device is the resource type.
  • 192.168.123.46 is the resource identifier, and it represents the IP address of the resource.
  • metadata is the action, and it represents the request to retrieve the metadata of the resource.
  • idType=IPAddress indicates that you have used the IP address of the resource as the identifier.

JSON response to the metadata API

A sample JSON response is as follows:

{
  "response" : [ {
    "monitorTypeMetaData" : [ {
      "attributes" : [ {
        "attributeName" : "AVAILABILITY",
        "precision" : 2,
        "unit" : "%",
        "kpi" : false
      }, {
        "attributeName" : "DDMessageCount",
        "precision" : 2,
        "unit" : "#",
        "kpi" : false
      }, {
        "attributeName" : "DataTransferred",
        "precision" : 2,
        "unit" : "KB/sec",
        "kpi" : false
      }, {
        "attributeName" : "MonitorInstanceCount",
        "precision" : 2,
        "unit" : "#",
        "kpi" : false
      }, {
        "attributeName" : "StatsMessageCount",
        "precision" : 2,
        "unit" : "#",
        "kpi" : false
      } ],
      "statusCode" : "200",
      "statusMsg" : "OK",
      "monitorTypeName" : "Agent Status"
    }, {
    "statusCode" : "200",
    "statusMsg" : "OK",
    "resourceId" : "bppmwsserver.com",
    "resourceIdType" : "Name",
    "resourceUniqueId" : "0011223344556677-8899aabbccddeeff"
  } ],
  "statusCode" : "200",
  "statusMsg" : "OK",
  "responseTimeStamp" : "2011-05-26T18:50:49"
}

Along with the metadata, you can also find the unique identifier of the resource and the time at which the request was run.

Sample response to the stats API

This section lists a sample URL request to retrieve performance statistics data from a single device collected between 10 A.M. and 12 noon on May 19, 2011, and its corresponding response in the JSON format.

URL to access the stats API

The sample URL to access the stats API is as follows:

http://bppmwsserver:80/bppmws/api/MonitorInstance/bppmwsserver:20031:26/
stats?starttime=2011-05-19T10:00:00&endtime=2011-05-19T12:00:00&
idType=URI&statstype=raw&attributetype=kpi

where:

  • MonitorInstance is the resource type.
  • bppmwsserver:20031:26 is the resource identifier, and it represents the URI of the resource.
  • stats is the action, and it represents the request to retrieve the performance statistics data of the resource.
  • starttime=2011-05-19T10:00:00 represents the start time as May 19, 2011, 10 A.M.
  • endtime=2011-05-19T12:00:00 represents the end time as May 19, 2011, 12 noon.
  • idType=URI indicates that you have used the URI of the resource as the identifier.
  • statstype=raw indicates that the performance statistics data retrieved is the actual data at a given time period.
  • attributetype=kpi indicates that Key Performance Indicators (KPIs) of a specific metric have been retrieved.

Note

stats=-1 indicates that data is unavailable for that instance of time.

JSON response to the stats API

A sample JSON response is as follows:

{
  "response" : [ {
    "monitorTypeName" : "Web URL",
    "resourceId" : "bppmwsserver:20031:26",
    "resourceIdType" : "URI",
    "epochTime" : [ 1305799200, 1305799319, 1305799438, 1305799557, 1305799676, 1305799795, 1305799914, 1305800033, 1305800152, 1305800271, 1305800390, 1305800509, 1305800628, 1305800747, 1305800866, 1305800985, 1305801104, 1305801223, 1305801342, 1305801461, 1305801580, 1305801699, 1305801818, 1305801937, 1305802056, 1305802175, 1305802294, 1305802413, 1305802532, 1305802651, 1305802770, 1305802889, 1305803008, 1305803127, 1305803246, 1305803365, 1305803484, 1305803603, 1305803722, 1305803841, 1305803960, 1305804079, 1305804198, 1305804317, 1305804437, 1305804556, 1305804676, 1305804795, 1305804914, 1305805033, 1305805152, 1305805271, 1305805390, 1305805509, 1305805628, 1305805747, 1305805866, 1305805985, 1305806104, 1305806223, 1305806342 ],
    "statusCode" : "200",
    "statusMsg" : "OK",
    "attributes" : [ {
      "stats" : [ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0 ],
      "statusCode" : "200",
      "statusMsg" : "OK",
      "attributeName" : "AVAILABILITY",
      "precision" : 2,
      "unit" : "%",
      "kpi" : true
    }, {
      "stats" : [ 27.0, 30.0, 27.0, 27.0, 29.0, 44.0, 30.0, 30.0, 35.0, 26.0, 34.0, 27.0, 28.0, 32.0, 27.0, 38.0, 42.0, 31.0, 30.0, 28.0, 44.0, 30.0, 29.0, 29.0, 30.0, 30.0, 33.0, 28.0, 31.0, 39.0, 34.0, 29.0, 29.0, 27.0, 28.0, 31.0, 20.0, 28.0, 32.0, 63.0, 30.0, 32.0, 33.0, 31.0, 36.0, 28.0, 61.0, 30.0, 29.0, 31.0, 34.0, 28.0, 37.0, 33.0, 41.0, 31.0, 28.0, 22.0, 33.0, 27.0, 29.0 ],
      "statusCode" : "200",
      "statusMsg" : "OK",
      "attributeName" : "Total Response Time",
      "precision" : 2,
      "unit" : "ms",
      "kpi" : true
    } ],
    "monitorInstanceName" : "http://192.168.235.235"
  } ],
  "totalNumberOfPages" : 1,
  "currentPageNumber" : 1,
  "statusCode" : "200",
  "statusMsg" : "OK",
  "responseTimeStamp" : "2011-05-27T15:03:45"
}