PUT - Update a specific CNAME record

Purpose

This API call is used to update an existing CNAME (Canonical Name) record in a specified DNS zone. This enables administrators to modify the target hostname, TTL, or other attributes of the record to ensure accurate and up-to-date DNS configurations.

Request URL

Method: PUT

https://{appconsole_IP}:{9443}/api/dns/zone/{zone_pk}/CNAME/{pk}/

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
    • Denotes the primary key (ID) of the DNS zone containing the record.
  • pk* long
    • Denotes the primary key (ID) of the specific CNAME record to update.

Request Body

  • domain_name* string
    • The fully qualified domain name (FQDN) for which the CNAME record is being updated.
  • domain_ttl* integer
    • Time-to-live value for the CNAME record in seconds, defining how long the record is cached.
  • zone_name* string
    • The DNS zone to which the CNAME record belongs.
  • records* string
    • The new target hostname for the CNAME record.
  • cluster_name* string
    • The name of the cluster responsible for managing the DNS zone containing the CNAME record.

 

- Mandatory parameter.

 

Sample Request

Copied
{
  "domain_name": "c28.hellotest109.com.",
  "domain_ttl": 86400,
  "zone_name": "hellotest109.com.",
  "records": [
    "c42.host.com"
  ],
  "cluster_name": "wincluster-zoho"
}
                                  

Sample Response

Copied
{
  "domain_name": "c28.hellotest109.com.",
  "domain_ttl": 86400,
  "cname_domain_id": 12106,
  "zone_id": 5867,
  "records": [
    "c42.host.com"
  ]
}