Documentation for API fetchzone_records?

swbrains

Well-Known Member
Sep 13, 2006
240
33
178
Thanks -- I did see that, but I am currently using several API functions successfully that I know I looked up in the cPanel docs some time ago in order to get their usage.

Here are some URLs that currently work but I can't seem to find in the API docs any more. I'm searching the docs using only the function name (i.e.
fetchzone_records, remove_zone_record, add_zone_record, fetchdiskusagewithextras), but not coming up with anything:

Code:
/json-api/cpanel?user=$user&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&cpanel_jsonapi_version=2
/json-api/cpanel?user=$user&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=remove_zone_record&cpanel_jsonapi_version=2
/json-api/cpanel?user=$user&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=add_zone_record&cpanel_jsonapi_version=2
/json-api/cpanel?cpanel_jsonapi_user=$user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=DiskUsage&cpanel_jsonapi_func=fetchdiskusagewithextras
Thanks!
 

swbrains

Well-Known Member
Sep 13, 2006
240
33
178
I saw that article as well when I googled. I have many functions in use from API version 2. Some said (at the time I saw the docs on them) something like "we recommend using the UAPI, but no UAPI function exists for this...". Do the *new* alternatives to these functions return the same data structures or do I need to now rewrite all of the code that calls these functions to use their newer alternatives?

Oddly, when I view the "dumpzone" API, the URL version lists it as "version 1" whereas the functions I'm using are listed as version 2 (at least they were in the original docs when I got those URLs:
Code:
https://hostname.example.com:2087/cpsess##########/json-api/dumpzone?api.version=1&domain=example.com
The doc page for dumpzone also says this on it: "This function is deprecated. Use WHM's parse_dns_zone function." However, even parse_dns_zone shows as version 1 API:
Code:
https://hostname.example.com:2087/cpsess##########/json-api/parse_dns_zone?api.version=1&zone=example.com
This seems confusing that the api.version=1 URL is in the documentation and is the current function, whereas the cpanel_jsonapi_version=2 URL is considered older?
 
Last edited: