.pdf)
WHM Plugins
listaccts function from within your custom script:
/xml-api/listaccts function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/listaccts
listaccts function from within your custom script:
/json-api/listaccts function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/listaccts
listaccts function takes the following variables as input. Both variables are optional: domain, owner, user, ip, package
listaccts function. 500M
500M
example.com
user@example.com
username
/bin/bash)
YY MMM DD HH:MM
1 indicates that the account is suspended, while 0 indicates that the account is not suspended.
username
1 — yes.
0 — no.
https://example.com:2087/xml-api/listaccts?searchtype=user&search=luv
will produce output similar to the following:
<listaccts>
<acct>
<disklimit>unlimited</disklimit>
<diskused>57884M</diskused>
<domain>example.com</domain>
<email>user@example.com</email>
<ip>192.168.0.1</ip>
<maxaddons>10</maxaddons>
<maxftp>unlimited</maxftp>
<maxlst>unlimited</maxlst>
<maxparked>unlimited</maxparked>
<maxpop>unlimited</maxpop>
<maxsql>unlimited</maxsql>
<maxsub>unlimited</maxsub>
<owner>root</owner>
<partition>home</partition>
<plan>default</plan>
<shell>/bin/bash</shell>
<startdate>09 Aug 13 15:01</startdate>
<suspended>0</suspended>
<suspendreason>not suspended</suspendreason>
<suspendtime/>
<theme>x3</theme>
<unix_startdate>1250193678</unix_startdate>
<user>user</user>
</acct>
</listaccts>
?searchtype=user&search=luv limits the results to accounts with a username containing luv.
https://example.com:2087/json-api/listaccts?searchtype=user&search=luv
will produce output similar to the following:
{
"status":1,
"statusmsg":"Ok",
"acct":[
{
"startdate":"09 Aug 13 15:01",
"plan":"default",
"suspended":0,
"theme":"x3",
"shell":"/bin/bash",
"maxpop":"unlimited",
"maxlst":"unlimited",
"maxaddons":"10",
"suspendtime":null,
"ip":"192.168.0.1",
"maxsub":"unlimited",
"domain":"example.com",
"maxsql":"unlimited",
"partition":"home",
"maxftp":"unlimited",
"user":"user",
"suspendreason":"not suspended",
"unix_startdate":1250193678,
"diskused":"57884M",
"maxparked":"unlimited",
"email":"user@example.com",
"disklimit":"unlimited",
"owner":"root"
}
]
}
?searchtype=user&search=gus limits the results to accounts with a username containing gus.