Arie_90212
Aug 21, 2018Nimbostratus
/stats returning JSON nested objects instead of array?
I noticed that requesting a list of virtuals returns a JSON array, while the stats for the same collection returns nested objects.
Is this intentional?
https://hostname/mgmt/tm/ltm/virtual << returns JSON array
https://hostname/mgmt/tm/ltm/virtual/stats << returns JSON nested objects
`
Details (tweaked to protect the innocent):
`https://hostname/mgmt/tm/ltm/virtual?$select=destination,name
{
"kind": "tm:ltm:virtual:virtualcollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual?$select=destination%2Cname&ver=12.1.2",
"items": [
{
"name": "vs_vlan1",
"destination": "/Common/10.15.15.0:0"
},
{
"name": "vs_vlan2",
"destination": "/Common/any:0"
}
]
}
The above output stores the virtuals (and its details) in an array. However,
/stats
changes that to nested objects:
https://hostname/mgmt/tm/ltm/virtual/stats?$select=destination,tmName
{
"kind": "tm:ltm:virtual:virtualcollectionstats",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/stats?$select=destination%2Cname%2CtmName&ver=12.1.2",
"entries": {
"https://localhost/mgmt/tm/ltm/virtual/~Common~vs_vlan1/stats": {
"nestedStats": {
"entries": {
"destination": {
"description": "10.15.15.0:any"
},
"tmName": {
"description": "/Common/vs_vlan1"
}
}
}
},
"https://localhost/mgmt/tm/ltm/virtual/~Common~vs_vlan2/stats": {
"nestedStats": {
"entries": {
"destination": {
"description": "any:any"
},
"tmName": {
"description": "/Common/vs_vlan2"
}
}
}
}
}
}