Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

API - DNS - Add / modify multiple records

Discussion in 'cPanel Developers' started by bouvrie, Feb 23, 2018.

  1. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    37
    Likes Received:
    6
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Hi, I'm looking for a means of adding and/or modifying multiple DNS records for a single domain in one go, via a WHM API. Domains in the DNS have no relation to a WHM user.

    When using multiple "editzonerecord" API calls, the SOA serial is +1'ed at every request and I have to juggle with line numbers when changing and removing multiple records in one go...

    How can I achieve a DNS zone modification in a transaction of some sort?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    We document how to use this WHM API 1 function at:

    WHM API 1 Functions - editzonerecord - Developer Documentation - cPanel Documentation

    Using the dumpzone function and line numbers is the most effective way to use this API function, as noted:

    Otherwise, an alternative would be to manually modify the zone file directly via the command line (/var/named/$domain.tld.db) outside of the API.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice