Get all add on domains from single user via API

MrIver

Well-Known Member
PartnerNOC
Feb 24, 2020
45
9
8
Denmark
cPanel Access Level
Root Administrator
Hi Guys,

We are using WHMCS and we would like to be able to show the add on domains created by our users on their accounts.

We have been looking into Return all domains information · cPanel & WHM Developer Portal

And this is working fine, but we feel that it is overkill (and too resource demanding) to pull stats on all users, and loop thorugh them to find the one we need - unfortunatly we cannot add the "&user=xxx" to this request.

So, we would like to get a method of getting all the add on domains for a specific user. We know that a method exist using UAPI, but this requires a user session id for the call to work, an id which we do not have, when the user is only logged into WHMCS.

So is there a way to do this using the WHM API? Suggestions?

Thanks!
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
9,867
1,535
313
cPanel Access Level
Root Administrator
Hey there! I don't have a better option available at this point. It sounds like you want the uapi call to be able to run from WHM directly, is that correct? If so, a feature request would be the best way to go to see if we can get that added.
 

MrIver

Well-Known Member
PartnerNOC
Feb 24, 2020
45
9
8
Denmark
cPanel Access Level
Root Administrator
Hey there! I don't have a better option available at this point. It sounds like you want the uapi call to be able to run from WHM directly, is that correct? If so, a feature request would be the best way to go to see if we can get that added.
Yes, thats pretty much what we want. To have the option to pass a specifik user as a request parameter.

I will create a feature-request.