Replace API calls with UAPI
I'm looking for replacement calls with UAPI
In the former API I can use Statsbar to gather server information with this parameters
"diskusage|bandwidthusage|ftpaccounts|sqldatabases|emailac_counts|subdomains|addondomains|parkeddomains"
I have tried the UAPI's Statsbar module but I didn't find out how to retreive those data, did I missed something or the new UAPI's Statsbar doesn't provide those data anymore ?
Thanks.
-
Hello :) This is documented at: UAPI Functions - StatsBar::get_stats - Software Development Kit - cPanel Documentation Under "Display" in the "Parameters" section, you can click to view more examples of the statistics you can obtain. The API Shell option in cPanel is useful for testing UAPI functions: API Shell for cPanel - Documentation - cPanel Documentation Thank you. 0 -
Thanks Michaeal for your great help. It seems that the SDK guide has greatly improved, I didn't have such detailed guide a couple of years ago when I started using the API. 0 -
Michael, There is a small typo error in the SDK guide (I'm not sure whether it's official), the UAPI call returns a "status:0" if I use the 'subdomains' parameter (as stated in the document), but it returns status:1 if I use 'subdomain' (without 's'). Should I continue to use 'subdomain' instead of 'subdomains' ? Thanks PS: side question, I have many clients who don't fully understand English, how could I change the language for the message / error returned by UAPI ? I changed the cPanel's language but UAPI still return message in English. 0 -
There is a small typo error in the SDK guide (I'm not sure whether it's official), the UAPI call returns a "status:0" if I use the 'subdomains' parameter (as stated in the document), but it returns status:1 if I use 'subdomain' (without 's').
I'm happy to open a case with our documentation team to correct this. Could you verify the specific entries you are using, or post a screenshot of what you are entering via the "API Shell" option in cPanel?PS: side question, I have many clients who don't fully understand English, how could I change the language for the message / error returned by UAPI ? I changed the cPanel's language but UAPI still return message in English.
Could you provide a specific example so we can attempt to reproduce the issue? Thank you.0
Please sign in to leave a comment.
Comments
4 comments