Forum Discussion
REST API active connections with partitions
Hi community,
getting the active connections from TMSH with partitions needs a %3 for addresses in partition 3:
(tmos.ltm)# show /sys connection cs-server-addr XXX.XXX.XXX.XXX%3
How can I get this connection list from the REST API?
The following requests are not working:
- https://F5-IPADDR/mgmt/tm/sys/connection?options=cs-server-addr+XXX.XXX.XXX.XXX
- https://F5-IPADDR/mgmt/tm/sys/connection?options=cs-server-addr+XXX.XXX.XXX.XXX%3
- or URL encoded https://F5-IPADDR/mgmt/tm/sys/connection?options=cs-server-addr+XXX.XXX.XXX.XXX%253
Regards
Ingo
Hello Ingo.
This works for me using route domain %2 (12.1.4).
curl -sku admin:XXXX https://localhost/mgmt/tm/sys/connection?options=cs-server-addr+10.130.42.192%252 | json-format | sed 's/\\n/\n/g' { "kind": "tm:sys:connection:connectionstats", "selfLink": "https://localhost/mgmt/tm/sys/connection?options\u003dcs-server-addr+10.130.42.192%252\u0026ver\u003d12.1.4.1", "apiRawValues": { "apiAnonymous": "Sys::Connections 10.130.42.3%2:18244 10.130.42.192%2:8 10.130.42.3%2:18244 10.130.42.192%2:8 icmp 8 (tmm: 0) none 10.130.42.3%2:18247 10.130.42.192%2:8 10.130.42.3%2:18247 10.130.42.192%2:8 icmp 2 (tmm: 3) none 10.130.42.3%2:18241 10.130.42.192%2:8 10.130.42.3%2:18241 10.130.42.192%2:8 icmp 12 (tmm: 1) none Total records returned: 3 " } }
KR,
Dario.
- Dario_Garrido
Noctilucent
Hello Ingo.
This works for me using route domain %2 (12.1.4).
curl -sku admin:XXXX https://localhost/mgmt/tm/sys/connection?options=cs-server-addr+10.130.42.192%252 | json-format | sed 's/\\n/\n/g' { "kind": "tm:sys:connection:connectionstats", "selfLink": "https://localhost/mgmt/tm/sys/connection?options\u003dcs-server-addr+10.130.42.192%252\u0026ver\u003d12.1.4.1", "apiRawValues": { "apiAnonymous": "Sys::Connections 10.130.42.3%2:18244 10.130.42.192%2:8 10.130.42.3%2:18244 10.130.42.192%2:8 icmp 8 (tmm: 0) none 10.130.42.3%2:18247 10.130.42.192%2:8 10.130.42.3%2:18247 10.130.42.192%2:8 icmp 2 (tmm: 3) none 10.130.42.3%2:18241 10.130.42.192%2:8 10.130.42.3%2:18241 10.130.42.192%2:8 icmp 12 (tmm: 1) none Total records returned: 3 " } }
KR,
Dario.
- ingo_braun
Nimbostratus
Thanks Dario,
I checked again and my request works with URL encoding:
%3 = %253
curl -sku admin:XXXX https://localhost/mgmt/tm/sys/connection?options=cs-server-addr+XXX.XXX.XXX.XXX%253
Recent Discussions
Related Content
* 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