Reply

Zone creation with SOA record

Blabla91940
Techie
Posts: 3
596     0

Hello everyone,

I had a question about the Infoblox API (WAPI). Indeed, I tried everything to be able to create a zone with a SOA record automatically but I did not find how to do it. When I create the zone from the interface it works automatically (serial number, TTL, etc.) but when I do it via the Rest API just the zone is created. As it says in the documentation:
- curl -k -u admin:Infoblox -H 'content-type: application/json' -X POST

"https://127.0.0.1/wapi/v2.7/zone_auth?_return_fields%2B=fqdn&_return_as_object=1" -d '{"fqdn":

"info.com"}'

I wanted to know if you knew how to do it (automatically or not)

Thank you in advance,

Re: Zone creation with SOA record

Adviser
Posts: 75
597     0

Hi,

 

The SOA record automatically gets created when you add a grid primary to your zone. You can do this with the WAPI as below.

WAPI Call:
curl -k -u admin:infoblox -H 'content-type:application/json' -X POST "https://grid-master/wapi/v2.7/zone_auth?_return_fields%2B=fqdn,grid_primary&_return_as_object=1" -d '{"fqdn": "test-info.com","grid_primary":[{"name":"nios.test.com"}]}'

Output:
{
    "result": {
        "_ref": "zone_auth/ZG5zLnpvbmUkLl9kZWZhdWx0LmNvbS50ZXN0LWluZm8:test-info.com/default",
        "fqdn": "test-info.com",
        "grid_primary": [
            {
                "name": "nios.test.com",
                "stealth": false
            }
        ],
        "view": "default"
    }
}

Hope this helps,

Krishna

Showing results for 
Search instead for 
Do you mean 

Recommended for You