- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
WAPI for Reverse Zone
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2021 07:25 AM - edited 04-08-2021 07:25 AM
I have a number of /19 blocks that I am attempting to allow a particular group to have specific permissions. Because they are /19s, for each block I have to create a separate reverse zone for each of teh /24s inside the /19.
For a given /19, that's 32 reverse zones. If the blocks could be contiguous, I'd condense them into a /16, and create one reverse zone, but that's not possible.
Is it possible to create a reverse zone via the WAPI? I typically use python, but curl would probably suffice. I'd also like to apply a standard set of perissions to each of these reverse zones. Can that be automated as well?
Re: WAPI for Reverse Zone
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2021 04:09 AM
Hi,
You can use the following WAPI to create reverse zones:
import requests url = "https://grid-master/wapi/v2.10/zone_auth" payload="{\r\n\t\"fqdn\": \"10.10.10.in-addr.arpa \",\r\n\t\"zone_format\":\"IPV4\"\r\n}\r\n" headers = { 'Authorization': 'Basic Yxxxxxxxxxxxxxxxxxx', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Regards,
Krishna Vasudevan
Re: WAPI for Reverse Zone
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2021 09:28 AM
Would you happen to have anything for setting the group permissions on a reverse zone?
Re: WAPI for Reverse Zone
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 10:59 AM - edited 04-15-2021 10:59 AM
I have what I'll call a stoopid python question.
Why do this:
payload="{\r\n\t\"fqdn\": \"10.10.10.in-addr.arpa\",\r\n\t\"zone_format\":\"IPV4\"\r\n}\r\n"
Instead of this:
payload={"fqdn": "10.10.10.in-addr.arpa","zone_format": "IPV4"}
Both work with python 3.8. The fact that one needs all those escaping characters makes me want to start drinking heavily.
Re: WAPI for Reverse Zone
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2021 10:27 AM
Haha! Good catch!
I just used the code converted by Postman.
Regards,
Krishna
Re: WAPI for Reverse Zone
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 09:42 AM
Is it possible to add the zone to a name server group instead of individual or a set of name servers?
Thanks
Bikram
Re: WAPI for Reverse Zone
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 03:17 AM
To use a name server group instead of a individual or a set of name servers, you would use the field ns_group instead of the fields grid_primary, external_primary, grid_secondaries or external_secondaries.