07-19-2021 07:38 PM - edited 07-19-2021 07:39 PM
I have a CURL command that works at the moment to grab the Extensible attribute of a Diocese, however, I also want to limit that data to a specific DNS view . We use two, an "internal" and "external" view.
This is the curl command:
$CURL --tlsv1 --insecure -u "$USERNAME:$PASSWORD" -X GET "https://xxx.xxx.xxx.xxx/wapi/v2.11/zone_auth?_return_fields%2B=extattrs&*Diocese:=$1"
Where $1 is the Diocese name passed by the BASH Script
This will return ALL zones that have the matching "Diocese" attribute - I also want to limit this to a DNS view.
I am aware of view:<viewname> - But I can't work out how to implement that here.
Solved! Go to Solution.
07-21-2021 09:26 PM - edited 06-27-2023 01:39 PM
Based on the way you're doing this, here's a minor change to accommodate the use-case in your curl request :
$CURL --tlsv1 --insecure -u "$USERNAME:$PASSWORD" -X GET "https://xxx.xxx.xxx.xxx/wapi/v2.11/zone_auth?view=$view_name&_return_fields%2B=extattrs&*Diocese:=$1"
While, $view_name is where the name of your DNS view should be fed. Hope this helps!