Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

obtaining total number of rest endpoints.

Hi,

I want to obtain total amount of icrREST objects count like this.

[root@:Active:Standalone] tmp # curl -sku : https://localhost/mgmt/tm -H "content-type": "application/json" |python -m json.tool|grep link -c 2715 <---- !! it's well returned links recursively. [root@:Active:Standalone] tmp # cat /VERSION|grep -i version Version: 13.1.1.2

[root@:Active:Standalone] tmp # curl -sku : https://localhost/mgmt/tm -H "content-type": "application/json" |python -m json.tool|grep -c link 160 <---!! however, in v12, it seems a bit(?) low. [root@:Active:Standalone] tmp # cat /VERSION|grep -i version Version: 12.1.3.6

Does anyone could help me out how can I get all of links in v12 like v13?

Thank you,

0
Rate this Question
Comments on this Question
Comment made 2 weeks ago by Satoshi Toyosawa

v12.1 I have just tested only shows the top level organization collections (tmsh modules) for GET /mgmt/tm. If you need to get the collections under each top levels and more, you need to iterate through the links.

Accessing to https://<host>/mgmt/toc will give you the list of endpoints (I do not know if it contain ALL), but it is designed for web browsing.

1
Comment made 2 weeks ago by Kalo 189

Hi, Thanks! for telling me mgmt/toc, didn't know that and of course this is great. I think it will perfectly be alternate iCR reference hereafter, for me, at least.

you need to iterate through the links.

On the ground that finding out newly tmos components or changes, I've been drilling entire tmsh::* components in that way, it fish out really all of objects(includes monitors, profiles, early access and deprecated objects), but a bit tricky and take long time to run. so if v12's top-level organization collections were like v13(4), i can write some more intelligent code I thought.

thanks anyway!

0

Answers to this Question