The method allows to retrieve history data according to the given parameters.
See also:
This method may return historical data of a deleted entity if this data has not been removed by the housekeeper yet.
(object)
Parameters defining the desired output.
The method supports the following parameters.
(integer/array)
Returns either:
the count of retrieved objects, if the
countOutput
parameter has been used.
Retrieving item history data
Return 10 latest values received from a numeric(float) item.
Request:
{
"jsonrpc": "2.0",
"result": [
{
"itemid": "23296",
"clock": "1351090996",
"value": "0.0850",
"ns": "563157632"
},
{
"itemid": "23296",
"clock": "1351090936",
"value": "0.1600",
"ns": "549216402"
},
{
"value": "0.1800",
"ns": "537418114"
},
{
"itemid": "23296",
"clock": "1351090816",
"value": "0.2100",
"ns": "522659528"
},
{
"itemid": "23296",
"clock": "1351090756",
"value": "0.2150",
"ns": "507809457"
},
{
"itemid": "23296",
"clock": "1351090696",
"value": "0.2550",
"ns": "495509699"
},
{
"itemid": "23296",
"value": "0.3600",
"ns": "477708209"
},
{
"itemid": "23296",
"clock": "1351090576",
"value": "0.3750",
"ns": "463251343"
},
{
"itemid": "23296",
"clock": "1351090516",
"value": "0.3150",
"ns": "447947017"
},
{
"itemid": "23296",
"clock": "1351090456",
"value": "0.2750",
"ns": "435307141"
}
],
"id": 1
CHistory::get() in ui/include/classes/api/services/CHistory.php.