Forum Discussion
DevBabu_124276
Nimbostratus
Mar 18, 2016iControl REST question
Is there any way I can get all the pools starting with some specific names with a REST call.
For example:
I have pools with name:
CDEQ_http_pool CDEQ_https_pool CDEQ_8080_pool
I need to get the state of all the pools starting with CDEQ_.
I tired with:
$select=name eq CDEQ_http_pool
even I don't get any data back for this pool.
Do I need to loop through all the pools and filter it in my script or can I get it through a REST call.
7 Replies
- Brad_Parker
Cirrus
You'll probably want to query
, filter your results, and the query the state of each pool that matched usinghttps://bigip/mgmt/tm/ltm/pool/?$select=name,fullPath
. You will have to replace / in the fullPath with ~ in your pool member query.https://bigip/mgmt/tm/ltm/pool/(fullpath)/stats?$select=status.availabilityState- DevBabu
Cirrus
Thanks Brad. Sorry, I think I did not made my question clear. I have three pools that start with CDEQ_. As we do CDEQ* to filter only the pools that start with CDEQ in GUI. Is there a way to achieve the same doing a GET call like https://bigip/mgmt/tm/ltm/pool/~Common~CDEQ*. Or do I need to do the usual way. Get all the pools returned with https://bigip/mgmt/tm/ltm/pool/ and match the pool name that starts with CDEQ through my script. - Brad_Parker
Cirrus
You can not query with pattern matching or wildcards at this time. You will have to gather, filter, and query status of each like I suggested above.
- Brad_Parker_139
Nacreous
You'll probably want to query
, filter your results, and the query the state of each pool that matched usinghttps://bigip/mgmt/tm/ltm/pool/?$select=name,fullPath
. You will have to replace / in the fullPath with ~ in your pool member query.https://bigip/mgmt/tm/ltm/pool/(fullpath)/stats?$select=status.availabilityState- DevBabu
Cirrus
Thanks Brad. Sorry, I think I did not made my question clear. I have three pools that start with CDEQ_. As we do CDEQ* to filter only the pools that start with CDEQ in GUI. Is there a way to achieve the same doing a GET call like https://bigip/mgmt/tm/ltm/pool/~Common~CDEQ*. Or do I need to do the usual way. Get all the pools returned with https://bigip/mgmt/tm/ltm/pool/ and match the pool name that starts with CDEQ through my script. - Brad_Parker_139
Nacreous
You can not query with pattern matching or wildcards at this time. You will have to gather, filter, and query status of each like I suggested above.
- According to the iControl REST API User Guide it is possible to filter ltm objects only by partition names. Probably that won't help you, but still you can do this by adding the following string at the end of the URL: ?$filter=partition eq partitionName
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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