dnsadmin module - querying local API

FabryB

Registered
Jan 2, 2015
1
0
1
cPanel Access Level
DataCenter Provider
Hello,
I am trying to make a pluggable dnsadmin module which uses simply RNDC to replicate zones between servers.
https://documentation.cpanel.net/display/SDK/Pluggable+dnsadmin+Modules

I am in need of finding out the MAIN IP of local server to execute rndc ADDZONE command.

I tought I could doa query to LOCAL api, but it asks me for credentials.
Since the script which is running is already authenticated, is there a way to do query to local cpanel without the security key?

I tried to instantiate the publicapi without any parameters, because documentation tells "empty parameters = autodetect" but that doesn't work.

Any suggestions?

Regards
Fabrizio
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Could you provide an example of how you are attempting to obtain this data through your script so we can attempt to replicate the issue?

Thank you.