Global WHM script, accessible without an auth / api key

rustyhex2

Member
Dec 12, 2013
8
0
1
cPanel Access Level
Root Administrator
I am planning to create global WHM script, accessible without an auth / api key. The goal is to export some common data via json/xml.
Is this possible?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Could you elaborate more on how you prefer it to be accessible without authentication? Do you mean you prefer authentication to occur because a user has already signed into Web Host Manager?

Thank you.
 

rustyhex2

Member
Dec 12, 2013
8
0
1
cPanel Access Level
Root Administrator
Hello.

I prefer wide-open API for public read-only data (monitoring purposes) without login / remote access key (it is sensitive information and does not required for public RO data).
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I believe authentication of some kind is required to first obtain the data you are attempting to output. You could use one of the methods listed here:

Authenticating API Function Calls

Thank you.
 

KostonConsulting

Well-Known Member
Verifed Vendor
Jun 17, 2010
255
1
68
San Francisco, CA
cPanel Access Level
Root Administrator
Even if you are monitoring, why would you want to open an interface with root privileges that is open to the world? Wouldn't it make more sense to have some off-server system poll whatever WHM APIs you wanted to make publicly available and then make that data public? You could technically downgrade your permissions within the WHM API call but it's then likely that you wouldn't have the right data available. Maybe if you could provide more context about what you're trying to accomplish, we could provide a more accurate answer.