Hi Dwayne,
I'd generally agree with Matt's recommendations, particularly in querying the database directly as you can tweak your queries on the fly and not need to define custom WFA filters every time you want to make a change.
That said what you proposed is very doable with WFA filters and rest APIs. I replied to your reddit post as well but might as well put it here on the community site for reference in mulitple spaces:
"I spent a few minutes doing this in a lab environment if it helps.
You're on the right track with the the GET /rest/filters/uuid/test call against to use against an existing WFA filter. You can call an existing filter in WFA or create your own custom one where you can control the SQL query.
For this test I created a few dummy SVMs on my cluster and made a custom WFA filter. For the WFA filter I cloned the pre-existing vserver filter named 'Filter Storage Virtual Machines by key' and adjusted the syntax to only return vservers starting with string 'wfa':
SELECT
vserver.name,
vserver.type,
vserver.uuid,
vserver.name_service_switch,
vserver.nis_domain,
vserver.language,
vserver.comment,
vserver.admin_state,
vserver.nfs_allowed,
vserver.cifs_allowed,
vserver.fcp_allowed,
vserver.iscsi_allowed,
cluster.primary_address AS 'cluster.primary_address'
FROM
cm_storage.vserver,
cm_storage.cluster
WHERE
cluster.id = vserver.cluster_id
AND vserver.name LIKE 'wfa%'
AND (
cluster.name = '${cluster_name}'
OR cluster.primary_address='${cluster_name}'
)
The new filter has a UUID of f4f9cf99-c5f1-4b31-a527-90c2e230b018 (found by using the GET /rest/filters/ call) and this filter requires an input parameter named 'cluster_name', so the URL I want to perform the GET call on is:
https://WFA_SERVER_IP/rest/filters/f4f9cf99-c5f1-4b31-a527-90c2e230b018/test?cluster_name=CLUSTER_NAME_REDACTED
And here's a CURL test which only returned the 3 vservers I hoped it would. The cluster has a total of 37 vservers so the custom filter worked great.
[USER@SERVER_NAME ~]# curl -k -u API_USER:API_USER_PASSWORD -X GET --header 'Accept: application/xml' 'https://WFA_SERVER_IP/rest/filters/f4f9cf99-c5f1-4b31-a527-90c2e230b018/test?cluster_name=CLUSTER_NAME_REDACTED' | xmllint --format -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2285 100 2285 0 0 11769 0 --:--:-- --:--:-- --:--:-- 11839
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<filterTestResults>
<filterName>wfa_vserver_filter_test</filterName>
<dictionaryName>cm_storage.Vserver</dictionaryName>
<parameters>
<parameter key="cluster_name" value="CLUSTER_NAME_REDACTED"/>
</parameters>
<columns>
<column>#</column>
<column>admin_state</column>
<column>cifs_allowed</column>
<column>cluster.primary_address</column>
<column>comment</column>
<column>fcp_allowed</column>
<column>iscsi_allowed</column>
<column>language</column>
<column>name</column>
<column>name_service_switch</column>
<column>nfs_allowed</column>
<column>nis_domain</column>
<column>type</column>
<column>uuid</column>
</columns>
<rows>
<row>
<cell key="#" value="1"/>
<cell key="admin_state" value="running"/>
<cell key="cifs_allowed" value="1"/>
<cell key="cluster.primary_address" value="IP_ADDRESS_REDACTED"/>
<cell key="comment"/>
<cell key="fcp_allowed" value="1"/>
<cell key="iscsi_allowed" value="1"/>
<cell key="language" value="en"/>
<cell key="name" value="wfa_filter_test1"/>
<cell key="name_service_switch" value="file"/>
<cell key="nfs_allowed" value="1"/>
<cell key="nis_domain"/>
<cell key="type" value="data"/>
<cell key="uuid" value="UUID_REDACTED"/>
</row>
<row>
<cell key="#" value="2"/>
<cell key="admin_state" value="running"/>
<cell key="cifs_allowed" value="1"/>
<cell key="cluster.primary_address" value="IP_ADDRESS_REDACTED"/>
<cell key="comment"/>
<cell key="fcp_allowed" value="1"/>
<cell key="iscsi_allowed" value="1"/>
<cell key="language" value="en"/>
<cell key="name" value="wfa_filter_test2"/>
<cell key="name_service_switch" value="file"/>
<cell key="nfs_allowed" value="1"/>
<cell key="nis_domain"/>
<cell key="type" value="data"/>
<cell key="uuid" value="UUID_REDACTED"/>
</row>
<row>
<cell key="#" value="3"/>
<cell key="admin_state" value="running"/>
<cell key="cifs_allowed" value="1"/>
<cell key="cluster.primary_address" value="IP_ADDRESS_REDACTED"/>
<cell key="comment"/>
<cell key="fcp_allowed" value="1"/>
<cell key="iscsi_allowed" value="1"/>
<cell key="language" value="en"/>
<cell key="name" value="wfa_filter_test3"/>
<cell key="name_service_switch" value="file"/>
<cell key="nfs_allowed" value="1"/>
<cell key="nis_domain"/>
<cell key="type" value="data"/>
<cell key="uuid" value="UUID_REDACTED"/>
</row>
</rows>
</filterTestResults>
[USER@SERVER_NAME ~]#
Hope this helps.