WHMAPI1 dumpzone not returning actual record
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:
Then cPanel's API will return:
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;
mydomain. 14399 IN LOC 51 30 12.748 N 0 7 39.612 W 52.00m 10m 10m 10mThen cPanel's API will return:
[size] => 1000
[latitude] => 2332896396 <-- huh?
[longitude] => 2147024036 <-- huh?
[ttl] => 14400
[class] => IN
=> 18
[horiz_pre] => 1000
[version] => 0
[altitude] => 10005200
[vert_pre] => 1000
[name] => mydomain.
[type] => LOCAs 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;
=> 18
[name] => mydomain.
[ttl] => 14400
[class] => IN
[type] => LOC
[rawvalue]=>51 30 12.748 N 0 7 39.612 W 52.00m 10m 10m 10mPlease sign in to leave a comment.
Comments
0 comments