/mgmt/config/default/DNSNameService GET

Use the HTTP GET method with the /mgmt/config/default/DNSNameService resource to request a list of current DNS name service settings.

Resource URL

https://host:port/mgmt/config/default/DNSNameService
Where port is 5554 by default.

Request headers

The following header must be sent with the request:
Authorization
This header must be sent to perform authentication.

Request body format

None.

Security requirements

The caller must be authenticated as an appliance user with sufficient authority. For more information about security, see Types of user and how they are authenticated and User authorization, credential mapping, and access profiles.

Response status codes

200
Information retrieved successfully.
400
Invalid data provided.
401
Not authenticated.
The caller must be authenticated as an appliance user. See Types of user and how they are authenticated for more information.
403
Not authorized.
The caller is authenticated but does not the authority to perform this action. See User authorization, credential mapping, and access profiles for more information.

Response headers

Content-Type
This header is returned with a value of application/json.

Response body format

The response is in JSON format. The response includes the following fields:
mAdminState
String.
The administrative state of the DNS name service settings, can be one of the following values:
  • enabled
  • disabled
SearchDomains
JSON structure containing definitions of domain-suffixes in the search table for non-qualified domain names. The structure contains the following field for each domain suffix defined:
SearchDomain
String.
Specifies a base domain name to which a host name can be prefixed.
NameServers
JSON structure containing a list of DNS servers. The structure contains the following fields for each list member:
IPAddress
String.
The IP address of the DNS server.
UDPPort
Integer.
The UDP port number of the DNS server. (The default DNS UDP port is 53.)
TCPPort
Integer.
The TCP port number of the DNS server. (The default DNS TCP port is 53.)
MaxRetries
Integer.
The maximum number of lookup requests that are sent to a given DNS name server before a connection failure is reported.
StaticHosts
JSON structure containing a list of static hosts. The structure contains the following fields for each list member:
Hostname
String.
The host name.
IPAddress
String.
The IP address.
UserSummary
String.
A comment describing the static host.
ForceIPPreference
String.
Set to "on" or "off". Set to "on" to restrict DNS queries to the preferred IP version . The default value is "off".
LoadBalanceAlgorithm
String
The load-balancing algorithm that the appliance uses to resolve host names. Set to one of the following values:
first-alive
Uses the concept of a primary server and one or more backup servers. When the health state of the primary server is up, all connections are forwarded to this server. When the health state of the primary server is softdown or down, connections are forwarded to back up servers. The primary server is the first server in the members list.
round-robin
Maintains a list of servers and forwards a new connection to the next server on the list. This setting is the default value.
MaxRetries
Integer.
The number of times that the appliance attempts a failed query. If the query fails, the appliance attempts the query to a different DNS server that is determined by the load balance algorithm. Enter a value in the range 0 - 4294967295. The default value is 2.
Timeout
Integer.
Specifies the number of seconds to wait for a response from a remote DNS server. If the query fails, the appliance attempts the query to a different DNS server that is determined by the load balance algorithm. The default value is 5.

Examples

The following example requests the DNS service settings on the appliance:

The following URL is used with the HTTP GET method:
GET /mgmt/config/default/DNSNameService
The following listing shows the received response:
{
    "_links": {
        "self": {
            "href": "/mgmt/config/default/DNSNameService
        "doc": {
            "href": "/mgmt/docs/config/DNSNameService"
        }
    },
    "DNSNameService": {
        "name": "Main-Name-Service",
        "_links": {
            "self": {
                "href": "/mgmt/config/default/DNSNameService/Main-Name-Service"
            },
            "doc": {
                "href": "/mgmt/docs/config/DNSNameService"
            }
        },
        "mAdminState": "enabled",
        "SearchDomains": [
            {
            "SearchDomain" : "wwillow.paddock.com"}, 
            {
            "SearchDomain" : "jdawash.paddock.com"
            }
        ],
        "NameServers": [
            {
            "IPAddress" : "198.51.100.11", 
            "UDPPort" : 53, 
            "TCPPort" : 53, 
            "MaxRetries" : 3
            }, 
            {
            "IPAddress" : "198.51.100.25", 
            "UDPPort" : 53, 
            "TCPPort" : 53, 
            "MaxRetries" : 3
            }
        ],
        "StaticHosts": {
            "Hostname" : "localhost", 
            "IPAddress" : "127.0.0.1", 
            "UserSummary" : ""
        }, 
        "ForceIPPreference": "off",
        "LoadBalanceAlgorithm": "round-robin",
        "MaxRetries": 2,
        "Timeout": 5
    }
}