WebSphere Business Monitor, Version 6.2 Operating Systems: AIX, HP-UX, Linux, Solaris, Windows


Monitoring Context Instance Data - Cross-version Monitoring Context Instance Resource - POST (X-METHOD-OVERRIDE=GET) Method

Use this method if there is a payload sent with the request. The X-METHOD-OVERRIDE parameter in the HTTP header needs to be set to GET. This indicates to the REST service that the GET method should be used instead of the POST request when processing the request.

Resource URI

POST /models/{model id}/mcs/{mc id}/instances/{instance id}?{parameters}

Parameters

Optional Parameters
NameValue TypeDescription
locale string
The locale. This value consists of lowercase ISO language code (ISO 639) and the uppercase ISO country code (ISO 3166) joined by an underscore (for example, en_US). Results will be returned in the locale specified. If no locale is specified, the locale of the REST server will be used.
timezoneoffset integer
The amount of time in minutes to add to or subtract from the Greenwich Mean Time (GMT) time in order to get the local time. The timezone offset will be applied to the "localized" value for any Time/DateTime type metrics that are returned.
displaymetrics boolean
New to 6.1.2 and later releases. Whether to return the metric values for only the metrics listed in the payload under "Metrics".
ValueDescription
true
Return the metric values for only the metrics listed in the payload under "Metrics".
false (default)
Return all metric values.
returnchildren boolean
New to 6.2 and later releases. Whether to return the child instance data. If true, all immediate children of the instance will be returned in the result.
ValueDescription
true (default)
Return the immediate child instances grouped by child monitoring contexts.
false
Do not return the immediate child instances.

Request Content

MIME Type: application/json

The HTTP request can have a payload which contains parameters. The following table lists all input parameters that can be sent in the HTTP payload in JSON format.

Payload Parameter Name

Type

Description

Locale

string

The locale. This value consists of lowercase ISO language code (ISO 639) and the uppercase ISO country code (ISO 3166) joined by an underscore (for example, en_US). Results will be returned in the locale specified. If no locale is specified, the locale of the REST server will be used.

Time Zone Offset

number

The amount of time in minutes to add to or subtract from the Greenwich Mean Time (GMT) time in order to get the local time. The timezone offset will be applied to the "localized" value for any Time/DateTime type metrics that are returned.

Metrics

string array

An array of metrics that needs to be formatted

Decimal

number array

The number of decimal places to display per metric. Array must be in the same order as the Metrics array above. Use -1 if no decimal formatting should be applied to a metric.

Currency

string array

The 3-letter currency codes, which must confirm to ISO4217 standards, per metric. Array must be in the same order as the Metrics array above. Use null if no currency should be applied to a metric.


+ View Schema
{ "description": "Payload Input for Single Instance REST Services", 
  "type": "object",
  "properties":
   {   "Locale":{"type":"string"
		 "optional": true
		},
	"Time Zone Offset":{"type":"integer"
		  	    "optional": true
			   },
	"Metrics":{"type":["string"],
		   "optional": true
	          },
	"Decimal":{"type":["integer"],
		   "optional": true
		  },
	"Currency":{"type":["string"],
		    "optional": true
		   },
   }
}

Example content:

{ "Locale": "en_US",
  "Time Zone Offset": 300,
  "Metrics": ["customerID", "customerName", "itemPrice"] ,
  "Decimal": [-1, -1, 2],
  "Currency": [null, null, "USD"],
}

Response Content

For each globalized metric (for example, "deliveryDate") in "Metric ID Array", a new field called "metricID Localized" (for example, "deliveryDate Localized") is inserted after the original metric. The globalized value will be inserted in the "Metric Data" array at the same index as "metricID Localized" metric in "Metric ID Array". For any null metric, "null" will be the localized value. Any Date/Time/DateTime metric will be returned in XPath format. Localized formats for Date/Time/DateTime metrics are determined by ICU depending on locale.

The default content-type is application/json.

MIME Type: application/json

The following table lists all parameters in the JSON output:

Parameter Name

Type

Description

Model ID

string

The monitor model ID

MCID

string

The monitoring context ID

Instance ID

string

The instance ID

Metric ID Array

array

The IDs(strings) of a list of metrics including localized metrics

Instance Data

JSON

Instance JSON object

 

Instance ID

string

The instance ID

 

Version

integer

The monitoring context version

 

Metric Data

array

List of metric values. Each element in this array corresponds to the metric id at the same index in the Metric ID Array.

 

Children

array

Child instance array. This array is returned if returnchildren=true or is not set in the HTTP request header.

 

 

Child MC ID

string

The child monitoring context ID

 

 

Child Instance IDs

array of integers

Child instance ids sorted in ascending order


+ View Schema
{ "description": "Cross Version Monitoring Context Instance", 
  "type": "object",
  "properties":
	{   "Model ID":{"type":"string"},
	    "MCID":{"type":"string"},
	    "Instance ID":{"type":"string"},
	    "Metric ID Array":{"type":["string"]},
	    "Instance Data":
		{
	     	 "Instance ID":{"type":"string"}, 
	      	 "Metric Data": {"type":["any"]}, 
	      	 "Children" :[
				"description": "This array is returned if and only if returnchildren=true."
          			{
            			  "Child MC ID": {"type":"string"},
            			  "Child Instance IDs": {"type":["number"]}
          			}
                   	     ]
 	        }
	}
}

Example content:

{ "Model ID":"OrderItem",
  "MCID":"OrderItem_MC",
  "Instance ID":"21",
  "Metric ID Array":["customerID", "customerName", "itemPrice","itemPrice Localized","orderDate","orderDate Localized]
  "Instance Data":{
	      	    "Metric Data": ["123","Store 1", "19.99","$19.99","2008-03-05 13:30:00","March 5,2008 18:30:00"], 
	            "Children" : [
          			   { 
            				"Child MC ID": "OrderBook",
            				"Child Instance IDs": [101, 102, 201, 202]
         			   }
          			   {  
            				"Child MC ID": "OrderMusic",
            				"Child Instance IDs": [303, 304]
          			   }
                  		 ]
 	         }
}

Error Response Content

Detailed error information.

The default content-type is application/json.

MIME Type: application/json


+ View Schema
{ "description": "REST error response", 
  "type": "object",
  "properties":
   { "Status Code" : {"type":"integer"},
     "Error" : {"type":"string"},
   }
} 

Status Codes

The method returns one of the following status codes:
CodeDescription
200 OK
Successful completion - requested data returned. Note that the list may be empty.
403 Forbidden
Not authorized to request the resource.
404 Not Found
Resource not found or URL not supported.
400 Bad Request
The request contains invalid parameters or is missing parameters and inputs.
500 Internal Server Error
Internal error processing the request.

Available Since

6.1

Parent Topic: Cross-version Monitoring Context Instance Resource