DirectAdmin API

The Prohacker

Verified User
Joined
May 23, 2003
Messages
142
I would think maybe commands for editing accounts would be good for billing.. So the person can upgrade their packages from the billing interface and the limits on the server are also updated..

This would also be helpful if the user updates their email address in the billing system so that it matches the one on the server..

Also.. A key system for the API would much better than possilby hard coding the admin username and password into a script..
 
Last edited:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,987
Hi Prohacker,

So you would like the API for:

1) A User's settings to be updated by a Reseller

2) A User to update his own email through the billing system.


Could you explain in more detail your key system. Wouldn't the admin username/password be stored somewhere in the billing system?

Thanks,

John
 

The Prohacker

Verified User
Joined
May 23, 2003
Messages
142
DirectAdmin Support said:
Hi Prohacker,

So you would like the API for:

1) A User's settings to be updated by a Reseller

2) A User to update his own email through the billing system.


Could you explain in more detail your key system. Wouldn't the admin username/password be stored somewhere in the billing system?

Thanks,

John
Sorry I wasn't clear earlier..

I'd just like a single edit API for editing account limits on a server, something like this:

Edit User:
Function To edit account limitations
Command CMD_ACCOUNT_EDIT
Method POST
Success Returns Text
Failure Returns Text
Form Values:
Name Value
action - edit
username - The username for account
email - Current or updated email addresss, if blank don't reset
passwd - The new password, if left blank don't reset
passwd2 - Just confirming the first one
notify yes or no - Same as the rest of your system
maxemail - Max number of email accounts allowed
maxforwarders - Max number of forwarders allowed
maxdb - Max number of databases allowed

etc..

That way a customer can purchase extra items such as databases and the server automaticly adjusts for the purchase...

I know this would be a major API change but might be nice in future billing systems...

As for the access key system, Cpanel has a system similar, in WHM you generate an access hash, this hash is used instead of the normal password of the account..


Also a small feature reqeust would be for the API, is that this all be posted to an API script on port 2222, and the script have a configuration file that only allows certain IPs or hostnames to access it...

That way if the access hash/key was intercepted it couldn't be used unless from an allowed IP...


[edit]Was just thinking, it might be a good idea for admins and resellers to be able to add allowed IPs for the API from the control panel, so resellers can setup their billing system, if they have one, to access and create users..


And I just noticed how you did the scripts for the API.. Maybe next time I should read closer :D

Guess my API only script really wouldn't work with the current system since the APIwould basicly only be posting to the current scripts on the control panel...[/edit]
 
Last edited:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,987
Hi Prohacker,

I'm in the process of adding the edit API right now.

The ip checking is a good idea and will probably be added when time permits, as is the hash key.

Thanks,

John
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,987
I've uploaded a more extensive API containing the ability for users to save both their account email and ticket/messaging system email, as well as the API for "modify user" by a Reseller. "Modify Reseller" will be next.

I'm curious to find out if anyone is making use of the API?

John
 

loopforever

Verified User
Joined
May 30, 2003
Messages
298
Location
/home/admin
Once I've got my copy of DirectAdmin - I will make use of this in the billing system also. No worries - I'm sure your hard work will be put to good use :).
 

servnetix

Verified User
Joined
Jun 4, 2003
Messages
5
api

We are happy to see you have an API issued. I asked my lead developer to send you back input on the API for integration and what would be good additional tools in the API that a billing solution could use.
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
sounds like a few people hhave already got onto the making of billing systems

clientmanager v1.1 for DA will be released within a few weeks :cool:

Chris
 
Top