Siteworx API

Hi,
I currently don’t have Interworx on my server, (but i’m seriously planning to get it) :slight_smile:

My request concern an API for siteworx, so, me (or my users) could use this API to manage some stuff without going through the control panel !

That’s what i want to do:
For each new customer, i want to create a subdomain and an email, for example if my Web Hosting Service is http://www.webhost.com , for each of my new customer, i want (when creating an account through the interworx API), to create the following:
http://customer.webhost.com AND/OR http://webhost.com/customer
AND customer@webhost.com

But think about that:
A customer have his domain name, and want to propose to his visitors to have theirname@hisdomain.com… with this API he can do this !

If you don’t plan to do this, do you know how can i do it ?

Of course, my first priority would be the first example (for me) !!
I think the second example (for my customers) would be great, but not necessary :slight_smile:

I posted this message into this forum because, i think that’s more a siteworx feature than a nodeworx one… Deplace this msg if i’m wrong :rolleyes:

Thanks in advance for your answers !

Although I’m not the person to explain how, I don’t see anything that couldn’t be done with a shell script that you pass some parameters to. It’s not exaclty what you have in mind, but it seems like you could use such a script to create all the files and directories Interworx would be doing automatically. But you’d need to make sure that the iworx database got updated properly… that might be tougher than I’m thinking. :slight_smile:

Interworx use a MySQL database ?
so we can UPDATE, SELECT, or whatever ?

I don’t know linux but i know PHP a bit… Do you think i can create this stuff using PHP and the iWorx DB ?

If no, can anyone help me for the shell script and how i can run it from PHP ?

Yep, it’s just MySQL so you can (with caution) edit the DB directly. Please note that I’d be very careful doing any DB editing directly. You can check out the /home/interworx/etc/my.cnf file for the mysql defaults to connect to the iworx-cp db and the password for the iworx user is in the /home/interworx/iworx.ini file.

NOTE: if you kill your DB we will not be able to fix it and you will be outside the “warranty” if you will if you break something so be careful and make backups.

Chris