POST - Create a stub zone

Purpose

This API call is designed for setting up a stub zone in a Windows DNS environment, which contains only essential information about another DNS zone, specifically the authoritative DNS servers for that zone.

Request URL 

Method: POST

https://{appconsole_IP}:{9443}/api/dns/zone/

Request Headers

The following headers must be included in the API request for successful authentication and data submission:

Authorization: DDI Central's OAuth implementation uses the Bearer authentication scheme. Hence, while making API calls, access_token obtained via the OAuth 2.0 Client Credentials Grant must be included in the Authorization header of API requests. This token verifies the client’s identity and ensures appropriate permissions for accessing resources.

The Authorization Header follows the format below:

headers = { "Authorization": "Bearer {bearer_tk}" }


Content-Type: Required in the header to indicate the media type of the resource being sent. It helps the server at the receiving end understand how to process the transmitted request body.

The Content-Type Header follows the format below:

headers ={ "Content-Type": "application/json" }

Request Body

  • zone_name*  string
    •  Specifies the name of the forwarder zone being managed. This indicates the domain for which DNS requests will be forwarded.
  • zone_type*  string
    •  Sets the type of the zone as a "forwarder." This tells the DNS server that any DNS requests for this domain name should be forwarded to specific DNS servers rather than being resolved locally.
  • cluster_name*  string
    •  Identifies the DNS cluster where the stub zone configuration will be applied.
  • master_servers*  string
    •  Typically refers to the IP address of a primary server where the initial configuration or authoritative data originates.
  • stub_masters*  string
    •  This lists the IP address of the master or authoritative DNS server for the given zone.

 

- Mandatory parameter

Sample Request

Copied
Copied{
   "zone_name":"localzoho.com.",
   "zone_type":"stub",
   "cluster_name":"local-cluster",
   "master_servers":"192.168.220.172",
   "stub_masters":"172.20.133.227, 172.20.133.228"
}

Sample Response

Copied
Copied{
   "zone_id":14277,
   "zone_name":"localzoho.com.",
   "cluster_name":"local-cluster",
   "zone_type":"stub",
   "zone_ttl":300,
   "zone_contact":"zohomail.com",
   "refresh":43200,
   "retry":3600,
   "expiry":1209600,
   "minimum":180,
   "serial":1,
   "master_servers":"192.168.220.172",
   "stub_masters":"172.20.133.227,172.20.133.228"
}