- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Get Extensible attribute AND limit to a DNS View.
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thank you.
Solved! Go to Solution.
Re: Get Extensible attribute AND limit to a DNS View.
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2021 09:26 PM - edited 06-27-2023 01:39 PM
Hello AFrodsham,
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!
Best regards,
Re: Get Extensible attribute AND limit to a DNS View.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2021 05:47 PM
Thanks Mohammed!
So easy when you see it wrote out!