API feature requests

guido

Verified User
Joined
Mar 20, 2004
Messages
23
Hi,

It's been a long time. Last year I requested a couple of new features for the API. Than it was on microlevel (maybe it rings a bell ;) ).

This time i'm working on the userlevel. We're developing a webbased Content Management System ( In fact it's more that a Content Management System) that's running on a DirectAdmin system ( A requirement, pretty cool for business isn't it).
To make the system more userfriendly than it already is, we're building some DirectAdmin support in the application.
For exemple: people who are developing their website in our system, can also create and delete emailaccounts in the same application.

In our reseller system we want to support even more DirectAdmin features, like creating accounts, etc, etc, etc.

Our first goal is to support full emailmanagement. And besides creating and deleting accounts I want to do some other things. Hopefuly you can help me with this... it for the common good :p

Ok the things I'm currently missing in the DirectAdmin API:

- Changing quotas
- Creating, editing and removing Email forwarders
- Setting and changing a Catch all
- Creating, editing and removing Autoresponders

(Optional)
- Creating, editing and removing Vacation messages

Also I'm not so fond about the way "Password changing" is done. First of all, you're always forced to provide an old password. No problem if the user is changing his password. But a user who doesn't remember his password has a problem.
Bad Solution would be to store a password in our own system. And that would be the most ugly way :p Not only would I have redundant data, but I have to store a lot of emailpasswords and I would rather only store DirectAdminaccount passwords.

"Used to change an email password without requiring a DirectAdmin account" is written in the API, but wouldn't it be a cleaner solution to use the username and password of the account?

Hopefully you can help me on the way really quick,

Thanks in advance,

Guido Pater

IVinity

P.S. Really lovin' the system, otherwise we wouldn't have used DirectAdmin as a layer in our system. And we will release more information soon.
 
Hello,

I had another request for the API :

- Change the language of skin

Because when API create user, the defaut language is english, but all my users use french language. It's not very important but it will good if it's made automatically.

Thanks. Bye.
 
Try to learn something more about the api, _EVERYTHING_ you can do through the control panel can be done through the api.
 
I believe he is right. You can do anything remotely that you can from the control panel. What you don't get is the nice feedback that the API provides.

E-mail quota example:

Use the php class found in this form and create a page with the following:

PHP:
<?php

include 'httpsocket.php';

$sock = new HTTPSocket;
$sock->connect('yoursite.com',2222);

$sock->set_login("admin|username","password");

$sock->set_method('POST');

$sock->query('/CMD_EMAIL_POP',
    array(
        'action' => 'modify',
        'domain' => 'somedomain.com',
        'user' => 'usertomodify',
        'passwd' => '', //no password, just doing quota
        'passwd2' => '',
        'quota' => 'xx'
    ));
$result = $sock->fetch_body();

echo $result;

?>

of course replace:

username with your username
password with your password
somedomain.com with the domian the e-mail account is for
usertomodify with the username of the account the e-mail account belongs to
set passwd and passwd2 to change the password
xx with the quota you want
 
API documentation

Ok in that case ( because I don't need a nice response ):

how can I figure out how to use a functionality that is not documented, so also knowing which parameters to use?
 
Very easily :)

Log into the control panel, go to the function you want (the one with the form to do whatever action you want to do) and click on view source. There will be a form (html form) there with all the values that you need. The command listed in the browser bar is where you send the command. If you want you can make error checking functions off the code that is returned by looking for special lines of text to find out if the command was completed sucessfully or not.
 
Back
Top