whm api1 editzonerecord issue
Hi, I try to edit the DNS zone using the whm api1 but out of luck. I'm trying to modify the srv record.
editzonerecord?api.version=1&domain=abc.com&name=_srv2.abc.com.&class=IN&ttl=86400&type=SRV&priority=3&weight=5&port=422&target=eeeeee.com&line=27
If line 27 is a SRV dns record, it returns:
["metadata">=> object(stdClass)#55 (4) { ["version">=> int(1) ["command">=> string(14) "editzonerecord" ["reason">=> string(58) "Bind reloading on server using rndc zone: [snappyhost.my] " ["result">=> int(1) }
But only name field is changed. the priority weight port and target all remain same. Anyone knows what happens?
If line 27 is not a SRV dns record but a other type record, it returns:
["metadata">=> object(stdClass)#55 (4) { ["version">=> int(1) ["reason">=> string(61) "Invalid DNS record: Supplied target for SRV record is invalid" ["result">=> int(0) ["command">=> string(14) "editzonerecord" }
From the official document I can't find any useful information about this. Really confused. Can editzonerecord work if i want to change it to another type dns record? From what i tested, seems can't
-
Hello @yuncheng, Internal case CPANEL-11328 is open to address an issue where it's not possible to change the "target" of the SRV field when using the editzonerecord WHM API 1 call. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, you will need to edit the zone file directly via the command line as a workaround. Thank you. 0 -
Hello, To update, this is fixed in cPanel version 64: Fixed case CPANEL-11328: Ensure WHM API editzonerecord call can edit SRV records. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments