Forum Discussion
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 ...
Satoshi_Toyosa1
Aug 21, 2018Ret. Employee
The endpoint without
stats
is equivalent to tmsh list
: it dumps the configuration information. The endpoint with stats
is tmsh show
and shows the stat information. They are different commands hence different outputs.
Please refer to pp. 35-38 of iControl REST User Guide Version 13.1 for more information on the statistical output. For those who would like to see example outputs, see iControl REST Cookbook - Virtual Server (ltm virtual).
If you are asking why
/mgmt/tm/ltm/virtual
returns {"items":[vs1object, vs2object, ...]} while /mgmt/tm/ltm/virtual/stats
returns {"entries":{vs1statEndpoint: {statsObject1}, vs2statEndpoint:{statsObject2}, ....}, then I imagine that's just an implementation decision, most likely due to the differences between outputs from list/show tmsh commands.Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects