Skip to main content
A newer release of this product is available.

Name-services dns endpoint overview

Contributors

Overview

Displays DNS information and controls the DNS subsytem. DNS domain name and DNS servers are required parameters.

Retrieving DNS information

The DNS GET endpoint retrieves all of the DNS configurations for data SVMs. DNS configuration for the cluster is retrieved via /api/cluster .

Examples

Retrieving all of the fields for all of the DNS configurations

# The API:
/api/name-services/dns

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/dns?fields=*" -H "accept: application/hal+json"

# The response:
{
"records": [
  {
    "svm": {
      "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
      "name": "vs1"
      "_links": {
        "self": {
          "href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"
        }
      }
    },
    "domains": [
      "domainA.example.com"
    ],
    "servers": [
      "10.10.10.10"
    ]
    "_links": {
      "self": {
        "href": "/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1"
      }
    }
  },
  {
    "svm": {
      "uuid": "19076d35-6e27-11e8-b9b8-005056b41bd1",
      "name": "vs2"
      "_links": {
        "self": {
          "href": "/api/svm/svms/19076d35-6e27-11e8-b9b8-005056b41bd1"
        }
      }
    },
    "domains": [
      "sample.example.com"
    ],
    "servers": [
      "11.11.11.11",
      "22.22.22.22",
      "33.33.33.33"
    ]
    "_links": {
      "self": {
        "href": "/api/name-services/dns/19076d35-6e27-11e8-b9b8-005056b41bd1"
      }
    }
  }
],
"num_records": 2
"_links": {
  "self": {
    "href": "/api/name-services/dns?fields=*"
  }
}
}

Retrieving all DNS configurations whose domain name starts with dom*.

# The API:
/api/name-services/dns

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/dns?domains=dom*" -H "accept: application/hal+json"

# The response:
{
"records": [
  {
    "svm": {
      "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
      "name": "vs1"
      "_links": {
        "self": {
          "href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"
        }
      }
    },
    "domains": [
      "domainA.example.com"
    ]
    "_links": {
      "self": {
        "href": "/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1"
      }
    }
  }
],
"num_records": 1
"_links": {
  "self": {
    "href": "/api/name-services/dns?domains=dom*"
  }
}
}

Retrieving the DNS configuration for a specific SVM

# The API:
/api/name-services/dns/{svm.uuid}

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1" -H "accept: application/hal+json"

# The response:
{
"svm": {
  "uuid": "179d3c85-7053-11e8-b9b8-005056b41bd1",
  "name": "vs1"
  "_links": {
    "self": {
      "href": "/api/svm/svms/179d3c85-7053-11e8-b9b8-005056b41bd1"
    }
  }
},
"domains": [
  "domainA.example.com"
],
"servers": [
  "10.10.10.10"
]
"_links": {
  "self": {
    "href": "/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1"
  }
}
}

Creating a DNS configuration

The DNS POST endpoint creates a DNS configuration for the specified SVM.

Example

The following example shows a POST operation:

# The API:
/api/name-services/dns

# The call:
    curl -X POST "https://<mgmt-ip>/api/name-services/dns" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ \"svm\": { \"uuid\": \"179d3c85-7053-11e8-b9b8-005056b41bd1\" }, \"domains\": [ \"domainA.example.com\" ], \"servers\": [ \"10.10.10.10\" ]}"

Updating a DNS configuration

The DNS PATCH endpoint updates the DNS configuration for the specified SVM.

Examples

Updating both the DNS domains and servers

# The API:
/api/name-services/dns/{svm.uuid}

# The call:
curl -X PATCH "https://<mgmt-ip>/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ \"domains\": [ \"domainA.example.com\", \"domainB.example.com\" ], \"servers\": [ \"10.10.10.10\", \"10.10.10.11\" ]}"

Updating the DNS servers only

# The API:
/api/name-services/dns/{svm.uuid}

# The call:
curl -X PATCH "https://<mgmt-ip>/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1" -H "accept: application/hal+json" -H "Content-Type: application/json" -d "{ \"servers\": [ \"10.10.10.10\" ]}"

Deleting a DNS configuration

The DNS DELETE endpoint deletes the DNS configuration for the specified SVM.

Example

The following example shows a DELETE operation.

# The API:
/api/name-services/dns/{svm.uuid}

# The call:
curl -X DELETE "https://<mgmt-ip>/api/name-services/dns/179d3c85-7053-11e8-b9b8-005056b41bd1" -H "accept: application/hal+json"