| The lxadmin API [message #8829] |
Thu, 19 July 2007 20:28  |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
First, you will need to provide the login credentials, in the forum of login-class, login-name, and login-password. The login-class is always 'client'.
The actions supported are: add, delete, update, simplelist
To add a client:
First you will need to get the resourceplan and dnstemplate list from lxadmin using simplelist.
bin/webcommand.php?action=simplelist&resource=resourceplan
This will return an associative array with keys as the actual names and the values as display names.
[newone___client_s_vv_p_admin]=newone&[hostingplan___client_s_vv_p_admin]=hostingplan
bin/webcommand.php?action=simplelist&resource=dnstemplate
Result:
[neon]=neon&[goodone]=goodone&[monohart]=monohart&[newstuff]=newstuff
Now, you can create a client and the default domain.
bin/webcommand.php?action=add&class=client&name=newname&v-type=reseller&v-password=hello&v-plan_name=newone___client_s_vv_p_admin&v-domain_name=hello.com&v-dnstemplate_name=goodone'
You need to supply:
class, name, v-type, v-password, v-plan_name, v-domain_name, v-dnstemplate_name
Thanks.
|
|
|
| Re: The lxadmin API: Update a client. [message #8835 is a reply to message #8829] |
Thu, 19 July 2007 23:11   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Upgrading/Downgrading a client: Change Plan.
First get the list of resource plans.
bin/webcommand.php?action=simplelist&resource=resourceplan
Change the client's plan to the new resource plan.
/bin/webcommand.php?class=client&name=showing&action=update&subaction=change_plan&v-resourceplan_name=newplan___client_s_vv_p_admin'
Disable/Enable a client.
You need to provide class, name, action, subaction
bin/webcommand.php?class=client&name=showing&action=update&subaction=disable
bin/webcommand.php?class=client&name=showing&action=update&subaction=enable
Thanks.
|
|
|
|
|
|
| Re: The lxadmin API: Update a client. [message #19288 is a reply to message #18563] |
Mon, 21 January 2008 00:07   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
| Quote: |
>
>
> How about API for requesting the installed APPS in a given domain?
>
> And API for all the existing mail users and its current usage?
>
> regards,
|
Installed Apps is not availab.e You can get the mailusers by specifying these variables:
action=simplelist
parent-class=domain
parent-name=domain.com
class=mailaccount
Thanks.
|
|
|
|
| Re: The lxadmin API [message #19300 is a reply to message #19299] |
Mon, 21 January 2008 01:25   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
You can use the getproperty action.
action=getproperty
class=class
name=name
v-resourceplan_used=
To change,
action=update
subaction=change_plan
v-resoureceplan_name=
Thanks.
On Mon, Jan 21, 2008 at 06:21:31AM -0000, Reynante wrote:
>
>
|
|
|
|
|
| Re: The lxadmin API [message #19344 is a reply to message #19342] |
Mon, 21 January 2008 05:52   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
It was a bug, and has been fixed in 2222 version. Please update, and you will be able to change the plan for domain too.
Thanks.
On Mon, Jan 21, 2008 at 10:47:24AM -0000, Reynante wrote:
>
>
> Quote:
> > and here is the result:
> >
> > stdClass Object
> > (
> > [message] => __error_need_v-resourceplan_name
> > [return] => error
> > )
>
|
|
|
|
| Re: The lxadmin API [message #19727 is a reply to message #19726] |
Thu, 24 January 2008 05:17   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
action=simplelist, the variable is 'resource' , parent-class is mmail. Please note the 2 'm's.
parent-class=mmail
parent-name=domain.com
action=simplelist
resource=mailaccount
Thanks.
On Thu, Jan 24, 2008 at 09:47:19AM -0000, Reynante wrote:
>
>
> hello, this seems not working.. it always look for the action resource.
|
|
|
|
|
|
| Re: The lxadmin API [message #23857 is a reply to message #23855] |
Fri, 29 February 2008 02:50   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
No, you have to go to client home -> servers and change the values and update. We will provide an API for that, but at present, lxadmin API is only for single server.
Thanks.
On Fri, Feb 29, 2008 at 07:44:18AM -0000, Reynante wrote:
>
>
> Hello,
|
|
|
|
| Re: The lxadmin API [message #30143 is a reply to message #8829] |
Mon, 28 April 2008 07:19  |
reynan  Messages: 279 Registered: January 2008 Location: Manila, Philippines |
Senior Member |
|
|
Hello,
Is there a way to get the current server of the domain where it has been hosts?
I tried to used the API, but I don't know the correct parameter to get the current server of the domain. If it is hosts in the localhost / slave server, what IP?
$json = lxlabs_get_via_json("http", $server,"7778","action=getproperty&class=client&name=domain.com&v-used-traffic_usage=&v-used-maildisk_usage=&v-used-mysqldb_usage=&v-used-totaldisk_usage=");
with this, i get the result:
stdClass Object
(
[message] => success
[result] => stdClass Object
(
[v-used-traffic_usage] => -
[v-used-maildisk_usage] => -
[v-used-mysqldb_usage] => 0
[v-used-totaldisk_usage] => 0
)
[return] => success
)
Then I tried to add the param:
"v-syncserver" --> but no success.
"v-webserver" --> still no luck
"v-mysqldb_server" --> still no luck.
Any idea? I just want to know via API to what server did the domain hosts.?
regards,
--reynan
|
|
|