Requesting collection data
This example shows how to request collection data and how to interpret the response.
Requesting data
When requesting collection data using the GET /data endpoint, you can filter the response using available query parameters.
Parameters application, table, and cols are required with each request, and either the nodes or groups parameter must also be specified.
Additionally, you can specify the time value parameters timeFrom and timeTill. The specification of these time value parameters indicates the request is for historical data, not real-time data. For more information about using the time value parameters, see Using time values for requests.
https://host:port/api/v1/data
?application=application
&table=table
&cols=column_1,column_2,column_n
&nodes=nodes
&timeFrom=YYYMMDDHHMMSS
&timeTill=YYYMMDDHHMMSS
https://host:port/api/v1/data
?application=KM5
&table=ASCPUUTIL
&cols=JOBNAME,JESJOBID,CPUPCT
&nodes=RSPLEXL4:RSD3:MVSSYS
&timeFrom=1230615073300000
&timeTill=1230615073540000
To request real-time data, do not include the time value parameters, as shown in the following example:
https://host:port/api/v1/data
?application=KM5
&table=ASCPUUTIL
&cols=JOBNAME,JESJOBID,CPUPCT
&nodes=RSPLEXL4:RSD3:MVSSYS
*) for the cols parameter to select all columns. Interpreting the response
GET /data request is a JSON document that contains an array of objects that represent the records returned, as shown in the following example:
[
{
"JOBNAME": "CXPLEXL4",
"JESJOBID": "STC05528",
"CPUPCT": 70
},
{
"JOBNAME": "RMFGAT",
"JESJOBID": "STC06480",
"CPUPCT": 9
}
]
In this example, the response returns the requested columns in each record: JOBNAME, JESJOBID, CPUPCT.
CPUPCT in this example. To interpret the value, you can look up the description of the column using the GET /system/tables endpoint. For this example, enter the following request:
https://host:port/api/v1/system/tables?name=ASCPUUTIL
The response includes all columns in the table. For this example, the response returns the properties for all columns in table ASCPUUTIL, which includes the CPUPCT column, as follows:
{
"NAME": "CPUPCT",
"ATTRNAME": "CPU_Percent",
"ATOMIZE": false,
"VERSION": 1,
"TYPE": "integer"
"SCALE": 1
"PRECISION": 4
},
SCALEis the number of digits to the right of the decimal point in the numberPRECISIONis the maximum number of digits in the number
By applying these properties, you can convert the returned values to meaningful, formatted data.
CPUPCT), translates the raw values to the following meaningful data:
-
represents"CPUPCT": 707.0, or 7% of CPU use -
represents"CPUPCT": 9.9, or 0.9% of CPU use