WHMAPI1 dumpzone not returning actual record

bouvrie

Active Member
Apr 6, 2012
38
6
58
cPanel Access Level
Root Administrator
Hi,

I want to use the WHM API to get a list of all DNS records on my server. The 'dumpzone' function seems to be the function to use, but I have two issues with it:

1. depending on the type of the DNS record, the function returns a different data structure (typed). Isn't it possible to get a RAW line of the actual data stored in the DNS record, so I don't have to reverse-engineer regenerate cPanel's interpretation of the record?

2. Related to #1, cPanel's interpretation of some record(s) is false. For example, given the following DNS record:
Code:
mydomain.            14399   IN      LOC     51 30 12.748 N 0 7 39.612 W 52.00m 10m 10m 10m
Then cPanel's API will return:
Code:
[size] => 1000
[latitude] => 2332896396  <-- huh?
[longitude] => 2147024036  <-- huh?
[ttl] => 14400
[class] => IN
[Line] => 18
[horiz_pre] => 1000
[version] => 0
[altitude] => 10005200
[vert_pre] => 1000
[name] => mydomain.
[type] => LOC
As you can see, fields latitude and longitude are NOT returned par the API specs at WHM API 1 Functions - dumpzone - Developer Documentation - cPanel Documentation (LOC record), which says they should look like "51 30 12.748 N".


Bottom line: for me to fulfill my request, even if I would painstakingly implement support for all various DNS record types, and in code port those back to an the supposed 'source' counterpart, I would not be able to do so.

Is there something I'm missing here? Why is it not possible to get the DNS records just like they're mentioned in the zonefile?

Like;
Code:
[Line] => 18
[name] => mydomain.
[ttl] => 14400
[class] => IN
[type] => LOC
[rawvalue]=>51 30 12.748 N 0 7 39.612 W 52.00m 10m 10m 10m
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,291
313
Houston
Hi @bouvrie

You're correct it should be returning a valid Latitude/Longitude per the description in the documentation. I've opened a case on this CPANEL-23335 and I'll update here when I have more information.

Thanks!