REST List API for KPIValue entity
The REST List API is also available for the entity KPIValue. This way the customer can read the calculated KPI values for a corresponding KPI.
The KPIValue entity is intended to only be written by the server job "Calculate KPI Values". Therefore it is not recommended to create, update or delete KPIValue entries via REST API, but only to read KPIValue entries.
Examples
Read KPI values with "bySearch" report
Rest Call
curl -u rest:password -H
"Accept: application/json"
-H -X GET http:
//localhost:1512/rest/V1.0/list/KPIValue/bySearch?query=KPIValue.Type equals "sampleKPI"&fields=KPIValue.StartTime,KPIValue.EndTime,KPIValue.GroupValue1,KPIValue.Value,KPIValue.ObjectCount
A list model result that contains the desired KPI values and attributes is returned:
{
"cacheId"
:
"20170612_155156_0"
,
"entityIdentifier"
:
"KPIValue"
,
"totalSize"
:
2
,
"startIndex"
:
0
,
"pageSize"
:
100
,
"rowCount"
:
2
,
"columnCount"
:
0
,
"columns"
: [],
"rows"
: [
{
"object"
: {
"id"
:
"597"
,
"label"
:
"2180144296335644"
,
"entityId"
:
7400
},
"values"
: [
"2017-06-11T00:00:00:000+0200"
,
"2017-06-12T00:00:00:000+0200"
,
"groupLabel1_testEntry"
,
"162"
,
"100"
]
},
{
"object"
: {
"id"
:
"598"
,
"label"
:
"2180144296335645"
,
"entityId"
:
7400
},
"values"
: [
"2017-06-12T00:00:00:000+0200"
,
"2017-06-12T15:50:00:220+0200"
,
"groupLabel1_testEntry"
,
"163"
,
"100"
]
}
]
}