• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. API Reference
  4. API Description
  5. Public Zone Management
  6. Querying Name Servers in a Public Zone

Querying Name Servers in a Public Zone

Function

Query name servers in a public zone.

URI

GET /v2/zones/{zone_id}/nameservers

For details, see Table 1.
Table 1 Parameter in the URI

Parameter

Mandatory

Type

Description

zone_id

Yes

string

Zone ID

Request

None

Response

  • Parameter description
    Table 2 Parameter in the response

    Parameter

    Type

    Description

    nameservers

    List data structure

    Name server list object

    For details, see Table 3.

    Table 3 Description of the nameservers field

    Parameter

    Type

    Description

    hostname

    string

    Host name of a name server

    priority

    int

    Priority of a name server

    For example, if the priority of a name server is 1, it is used to resolve domain names in first priority.

  • Example response
    {
        "nameservers": [
            {
                "hostname": "ns1.example.com.", 
                "priority": 1 
            }, 
            {
                "hostname": "ns2.example.com.", 
                "priority": 2
            }
        ]
    }
    

Returned Value

See General Request Return Code.