GET - Get all SPF and TXT records in a zone

Purpose

This API call retrieves all SPF and TXT records under a specified DNS zone. It returns detailed information about the record type, associated domain name, TTL (Time-to-Live), and the list of SPF or TXT data stored in the zone.

Request URL

Method: GET

https://{appconsole_IP}:{port_number}/api/dns/zone/{zone_pk}/SPF_TXT/?cluster_name={cluster_name}&zone_name={zone_name}
Example: https://10.16.5.16:9443/api/dns/zone/7555/SPF_TXT/?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 targeted DNS zone (e.g., "wincluster-zoho").
  • zone_name*  string

    •  Specifies the DNS zone name for which SPF and TXT records are requested (e.g., "hellotest109.com.").

 

- Mandatory parameter.

 

Sample Response

Copied
[
  {
    "spf_txt_domain_id": 9730,
    "zone_id": 5867,
    "domain_name": "@.hellotest109.com.",
    "domain_ttl": 193,
    "record_type": "TXT",
    "records": [
      "5d7tzsjx9vpr6dwqfd9910mkffcr1893",
      "v=spf1 include:spf.zoho.com include:zcsend.net -all"
    ]
  },
  {
    "spf_txt_domain_id": 9731,
    "zone_id": 5867,
    "domain_name": "newtxt.hellotest109.com.",
    "domain_ttl": 193,
    "record_type": "TXT",
    "records": [
      "5d7tzsjx9vpr6dwqfd9910mkffcr1893",
      "v=spf1 include:spf.zoho.com include:zcsend.net -all"
    ]
  }
]

Show full

Show less