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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    36
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page