Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 3rd July 2012, 15:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Quote:
It should be mentioned that it is necessary to use the undocumented (!) SOAP call client_get_groupid($session_id, $client_id)
Thats the function to convert the client ID to groupid, if you want to convert from one ID to another then you have to use that function of course.

Quote:
Strangely, the group_id is not included in the answers to the client_get() and client_get_by_username() functions.
The grouid is part of the response of any record, it does not amtter if you query a website or a client. print out the response with print_r(), you will see that the sys_groupid is returned. The groupid of a record is the owner group of that record and the client records are owned by the administrator or reseller that created them. So the grouipd of a client record is either the groupid of the admin or the groupid of the reseller.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
teves (3rd July 2012)
Sponsored Links
  #12  
Old 3rd July 2012, 15:26
teves teves is offline
Senior Member
 
Join Date: Oct 2006
Posts: 150
Thanks: 27
Thanked 15 Times in 10 Posts
Default

Hi Till,

please forgive me if I got something wrong, but I still believe that my post is correct in the given context:

my aim is to create a list of domains belonging to a certain client. So I would fetch the client first by client_get() or client_get_by_username().
But then I only get the sys_groupid of the client, which is, as you pointed out, the id of the admin or the reseller.
Now I would need to send a request like sites_web_domain_get($session_id, array('sys_groupid' => $id))
and here I need the group_id of the user, which I do not have at this point.
So I'd use the client_get_groupid($session_id, $client_id) function.

Did I get something wrong? Is there a better way?

Regards, Tom
Reply With Quote
  #13  
Old 3rd July 2012, 15:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
 
Default

If you write a external application for ispconfig, then you have the client_id as universal reference stored in your app. So normally you wont query the client table at all except if you want to change client details. This ID can be used to query a client and this ID can also be used to query for the groupid of that client if you need it for other queries.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
api, get all clients

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
added client through remote api can't add database paddox Developers' Forum 2 27th February 2012 13:59
ISPConfig3 + API + BoxBilling class450dude Installation/Configuration 3 22nd August 2011 23:32
A few questions on client's modules and limits dimas Installation/Configuration 10 10th January 2011 21:22
Can't Ping over VPN RoMiONeT Server Operation 2 4th July 2010 01:19
Accessing clients web without domain wicht General 3 10th August 2007 12:28


All times are GMT +2. The time now is 05:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.