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.

API2 editzonerecord issue

Discussion in 'cPanel Developers' started by Meisam Mulla, Sep 20, 2012.

  1. Meisam Mulla

    Meisam Mulla Registered

    Joined:
    Sep 20, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Richmond, British Columbia, Canada
    cPanel Access Level:
    Root Administrator
    I'm trying to edit the A record of one of the zone files using the cPanel API2 but I am having a weird problem. Instead of replacing the the entry its adding a new one. My call to the API is as follows:

    Code:
    https://1.2.3.4:2087/json-api/editzonerecord?domain=mydomain.com&line=13&name=mydomain.com.&address=1.2.3.5&type=A&ttl=300
    So instead of replacing line 13 (which houses the A record) from 1.2.3.4 to 1.2.3.5 its adding another entry above the original. So the zone file ends up looking like so:

    Code:
    (..)
    (13) mydomain.com.   300     IN   A   1.2.3.5
    (14) mydomain.com.   14400   IN   A   1.2.3.4
    (..)
    I have followed the instructions as per EditZoneRecord < SoftwareDevelopmentKit < TWiki
     
  2. colink

    colink Member

    Joined:
    Sep 24, 2012
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Hillsboro, OR
    cPanel Access Level:
    DataCenter Provider
    The query parameters are probably case sensitive. Replace line= with Line= and give it another try:

    Code:
    https://1.2.3.4:2087/json-api/editzonerecord?domain=mydomain.com&Line=13&name=mydomain.com.&address=1.2.3.5&type=A&ttl=300
     
Loading...

Share This Page