GET - Get all NAPTR records in a zone

Purpose

This API retrieves NAPTR (Naming Authority Pointer) DNS records for a given zone within a specified cluster.

NAPTR records are DNS resource records used to map domain names to URIs, IP addresses, or further DNS lookups. They are commonly used in applications like VoIP (Voice over IP), ENUM (telephone number mapping), and SIP (Session Initiation Protocol) to support dynamic discovery of services. Each NAPTR record includes fields such as order, preference, service, flags, and regular expressions that define how to rewrite and resolve domain names into specific service endpoints.

Request URL

Method: GET

https://{appconsole_IP}:{port_number}/api/dns/zone/{zone_pk}/NAPTR/?cluster_name={cluster_name}&zone_name={zone_name}
Example: https://10.16.5.16:9443/api/dns/zone/7555/NAPTR/?cluster_name=wincluster-zoho&zone_name=hellotest109.com

Request Headers

The following headers must be included in the API request for successful authentication and data submission:

Authorization: DDI Central's OAuth implementation uses the Bearer authentication scheme. Hence, while making API calls, access_token obtained via the OAuth 2.0 Client Credentials Grant must be included in the Authorization header of API requests. This token verifies the client’s identity and ensures appropriate permissions for accessing resources.

The Authorization Header follows the format below:

headers = { "Authorization": "Bearer {bearer_tk}" }


Content-Type: Required in the header to indicate the media type of the resource being sent. It helps the server at the receiving end understand how to process the transmitted request body.

The Content-Type Header follows the format below:

headers ={ "Content-Type": "application/json" }

Path parameters

  • zone_pk*  long

    •  The pk parameter represents the unique identifier (primary key) of a DNS zone hosted in one of the clusters configured in DDI Central. It ensures that the API fetches the exact zone details from DDI Central database without ambiguity.

Query parameters

  • cluster_name*  string
    • Identifies the cluster associated with the DNS zone (e.g., "chennai2"). This helps scope the NAPTR records to a specific DNS infrastructure site or region.
  • zone_name*  string
    • Specifies the DNS zone name for which NAPTR records are requested (e.g., "green.com"). The records returned will belong to this DNS zone.

 

- Mandatory parameter.

 

Sample Response

Copied
Copied[
    [
  {
    "naptr_domain_id": 29,
    "zone_id": 12145,
    "domain_name": "na14_9.green.com.",
    "domain_ttl": 5000,
    "zone_name": "green.com.",
    "cluster_name": "chennai2",
    "records": [
      {
        "order": 10,
        "preference": 100,
        "flag": "U",
        "service": "SIP+D2T",
        "regexp": "!^.*$!sip:customer-service@green.com!",
        "replacement": "green.com."
      }
    ]
  },
  {
    "naptr_domain_id": 97,
    "zone_id": 12145,
    "domain_name": "na31_0.green.com.",
    "domain_ttl": 5000,
    "zone_name": "green.com.",
    "cluster_name": "chennai2",
    "records": [
      {
        "order": 10,
        "preference": 100,
        "flag": "U",
        "service": "E2U+sip",
        "regexp": "!^.*$!sip:customer-service@green.com!",
        "replacement": "green.com."
      },
      {
        "order": 11,
        "preference": 101,
        "flag": "S",
        "service": "E2U+sip",
        "regexp": "!^.*$!sip:consumer-service@green.com!",
        "replacement": "green.com."
      }
    ]
  },
  {
    "naptr_domain_id": 98,
    "zone_id": 12145,
    "domain_name": "na32_0.green.com.",
    "domain_ttl": 5000,
    "zone_name": "green.com.",
    "cluster_name": "chennai2",
    "records": [
      {
        "order": 10,
        "preference": 100,
        "flag": "U",
        "service": "E2U+sip",
        "regexp": "!^.*$!sip:customer-service@green.com!",
        "replacement": "green.com."
      },
      {
        "order": 11,
        "preference": 101,
        "flag": "S",
        "service": "E2U+sip",
        "regexp": "!^.*$!sip:consumer-service@green.com!",
        "replacement": "green.com."
      }
    ]
  }
]
  

Show full

Show less