Directadmin API - suggestions and observations

Saeven

Verified User
Joined
Jun 29, 2003
Messages
76
Hello,

Let me first comment that it was a pleasure to previously meet one of the developers and that working with your API was very easy - something refreshing.

First an observation. The base64 encode of the username and password renders the commands inoperable. Only when the user and pass aren't encoded do the API commands work - this obervation was made on www.two-a-t.com's servers and doublechecked it was.


Also, there's an important association missing from the API, it would be very easy to code I'm sure - all of the other provisioning systems provide it and it makes post-setup associations easy. If we missed it entirely do let us know - but something that would list usernames to domains would be nice, along with a status bit.

IE

Code:
array{

    [username] => array{
                                          [domain] => "adomain.com",
                                          [status]   => 1,
                                          [package] => "plan1"
                                      },

    [username2] => array{
                                          [domain] => "domain2.net",
                                          [status]   => 0,
                                          [package] => "plan2"
                                        }
}

Where username has domain adomain.com and is active, and username2 has domain domain2.net and is suspended. You could easily make domain to username associations as such and it would save potential logging errors where data changes after the initial creation (in 3rd party systems).

Also, there is no modify user command listed that will modify a user to a given package, there only exists one that modifies to a long string of package specific data. It would be very nice if you could build a CMD_MODIFY_USER that takes in PACKAGE just like the CMD_ACCOUNT_USER. Right now, the only way to alter accounts when the only DA data stored is a package name is to turf the old account, and recreate a new one. Most 3rd party software that aren't DirectAdmin specific won't feel like implementing a DA specific panel that stores all of the little package flags. Storing a package name however, is a pleasure.

I do hope that these suggestions don't go unnoticed. If they do get implemented, please do let us know! Email me personally pretty please!

That said, we'll have our DirectAdmin plug ready for automation within the next few days. Our software is whois.cart, we register/collect payment and manage subscriptions for you - we now also auto-provision your DirectAdmin accounts!

Kind regards.
Alexandre
President,
saeven.net consulting
http://saeven.net
 
Looking forward for your DA account support.
So is what you are saying is your software will automate the ordering process of new hosting service for Direct Admin? That is exactly what we need. -Jason
 
Re: Base64

Base64 is the standard way all browsers pass around the username:password for http authentication. An example header is as follows:

GET / HTTP/1.1
Host: www.somedomain.com:2222
Authorization: Basic dGVecHJltzp6ZW1rcGFzcq==

where "dGVecHJltzp6ZW1rcGFzcq==" is the base64 encrypted version of "username:pass" all as one string. So if you are using a pre-existing api to connect, it will *probably* do the encryption for you. You'll have to look it up.

Also take note of the changes in the login system for version 1.12 in case this affects the way you are using the login system.

http://www.directadmin.com/features.php?id=70

John
 
Hello,

Thanks for the kind replies. Yes the DA plug is released (http://saeven.net/forums). Whois.Cart is a sales front that has had some good following, 360+ users, many of which have voted at hotscripts for reference http://www.hotscripts.com/Detailed/16218.html

What whois.cart does is collect your orders, domains, hosting, etc, collects the $$ via one of our payment plugs, registers your domains with one of our registrar plugs (currently have Enom and OpenSRS) and now also auto-provisions your accounts with DA (or WHM). You can multi-manage DA servers too. It does lots of other small things, manages recurrences, etc; the important thing is that if you have a registrar along with DA you won't have to do a thing save count your beans.

The system is very inexpensive as well, we're here to give the big boys a run for their monopoly :) We're building still, and have a long way to go before we sit on it. The DA plug is a nice addition however, if anyone needs help or has questions, we also have forums at http://saeven.net/forums where you can ask any question.

Kind regards.
A.
 
Just installed whois cart.
Where should I upload the directadmin plug files?
And should I put them in the directadmin folder on my server?

Thansk for your time and help -Jason
 
Hi Jason.

Everything goes in the admin/hostinginterfaces directory. I don't want to turn these boards into my support forum, mail myself at [email protected], or my support staff (put them to good use!) at [email protected] and we'll be able to guide you through it. I believe there are several posts on our boards as well regarding their installation - have you taken a look?

http://saeven.net/forums

Kind regards.
Alex
 
Hi, I did look but I didn't find that particular information there.
I will post my questions on the Whois board from now on.

Thanks again -Jason
 
Last edited:
Hi,

No problems :) Just don't want to encroach on a different community though I feel we'll be working toward the same goals. When you purchased the cart you got a system generated email with an installation form. If you like, just add RC1 + Directadmin in the comments and we can install it for you. It'll go to the people dedicated to installs and troubleshooting. Usually gets done within 0-6 hours.
 
Hello,

We plan to have a 30 day demo avaialble with an IONCUBE encoded version during the month of September. We unfortunately have only an online demo at this point.

Regards.
Alex
 
Back
Top