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

View host records

Access and display host records by retrieving the IP address for a specified hostname and vice versa. Use these endpoints to manage and query host table entries efficiently within your network environment.

Overview

Displays the IP address of the specified hostname and vice-versa.

Retrieving the host table entries

The host-record GET endpoint to retrieve the hostname for a given Ip address and vice-versa.

Examples

Retrieving the hostname for a given IP address.


# The API:
GET /api/name-services/host-record/{svm.uuid}/{host}

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/host-record/77e23bd4-a8fe-11eb-99e0-0050568e14ff/127.0.0.1" -H "accept: application/json"

# The response:
 {
"svm": {
  "uuid": "77e23bd4-a8fe-11eb-99e0-0050568e14ff",
  "name": "svm1"
 },
"host": "127.0.0.1",
"ipv4_addresses": [
  "127.0.0.1"
 ],
"hostname": "localhost",
"source": "Files"
 }

Retrieving the Ip address for a given hostname.


# The API:
GET /api/name-services/host-record/{svm.uuid}/{host}

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/host-record/77e23bd4-a8fe-11eb-99e0-0050568e14ff/localhost" -H "accept: application/json"

# The response:
 {
"svm": {
  "uuid": "77e23bd4-a8fe-11eb-99e0-0050568e14ff",
  "name": "svm1"
},
"host": "localhost",
"ipv4_addresses": [
  "127.0.0.1"
],
"ipv6_addresses": [
  "::1"
],
"hostname": "localhost",
"canonical_name": "localhost",
"source": "Files"
 }