Quantcast
Channel: cPanel Forums
Viewing all articles
Browse latest Browse all 5759

WHM API to retrieve cPanel Theme list

$
0
0
Hi,

Is there an API that'll allow me to retrieve a list of cPanel themes that a user can select in the system? I can do WHM API 0's modifyacct to modify the theme of the user but where can I get a list of the themes? If there isn't an API that will give me a list, are there any other APIs that has that data inside where I can parse and extract that information to form a list?

I see that cPanel's API 2 has Branding::showpkgs but I'm unable to call the API with user=root and even when I switch the user to a non-root account I get a JSON response like this showing no themes.

Code:

https://example.com:2087/<token>/json-api/cpanel?user=john&cpanel_jsonapi_module=Branding&cpanel_jsonapi_func=showpkgs&cpanel_jsonapi_version=2

{"cpanelresult":{"func":"showpkgs","data":[],"event":{"result":1},"apiversion":2,"module":"Branding"}}

Thanks

Viewing all articles
Browse latest Browse all 5759

Trending Articles