NSX-T Data Center REST API

Resolve a given address via the dns forwarder at Tier1

Query the nameserver for an ip-address or a FQDN of the given an address optionally using
an specified DNS server. If the address is a fqdn, nslookup will resolve ip-address with it.
If the address is an ip-address, do a reverse lookup and answer fqdn(s).
If enforcement point is specified, then DNS forwarder nslookup answer will get fetched from
specified enforcement point. Otherwise from all enforcement points.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/tier-1s/{tier-1-id}/dns-forwarder/nslookup
/policy/api/v1/global-infra/tier-1s/{tier-1-id}/dns-forwarder/nslookup
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/dns-forwarder/nslookup
Request Headers:
n/a
Query Parameters:
PolicyNsLookupParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/tier-1s/tier1/dns-forwarder/nslookup?address=vmware.com&enforcement_point_path=/infra/sites/default/enforcement-points/default

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AggregatePolicyDnsAnswer+

Example Response:

{ "dns_answer_per_enforcement_point": [ { "resource_type": "NsxTDnsAnswer", "enforcement_point_path": "/infra/sites/default/enforcement-points/default", "dns_server" : "192.168.144.144#53", "edge_node_id" : "e2fa39aa-f4ca-4781-ac48-60a6c47d34e0", "answers" : [ { "raw_string": "server.example.com. 300 IN A 192.168.1.10" } ], "raw_answer": "; (()) DiG 9.18.30-0ubuntu0.22.04.2-Ubuntu (()) @192.168.144.144 -b 192.168.144.144 server.example.com +timeout=5 +tries=3 +nosearch ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -))HEADER((- opcode: QUERY, status: NOERROR, id: 49577 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;server.example.com. IN A ;; ANSWER SECTION: server.example.com. 300 IN A 192.168.1.10 ;; Query time: 4 msec ;; SERVER: 192.168.144.144:53(192.168.144.144) (UDP) ;; WHEN: Mon May 19 03:16:57 UTC 2025 ;; MSG SIZE rcvd: 63" } ], "intent_path": "/infra/tier-1s/tier1/dns-forwarder" }

Required Permissions:

read

Feature:

policy_dns

Additional Errors: