ispCP - Board - Support
API - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Enhancements (/forum-43.html)
+--- Thread: API (/thread-12068.html)

Pages: 1 2 3 4


API - antonypuckey - 11-07-2010 10:38 AM

Hi there,

So I'm making an API because I have no idea when the API will be released with ispcp. I'm no expert programmer, so I expect it to be buggy to start with.

I'm developing it with Zend framework and NuSoap. You will need to have an APIKey and a ResellerKey to communicate with it. Currently I am making the following functions for it.

addDomain - done
addEmailAddress - done
addCatchAll - done
addSubDomain - done
addAliasDomain - done
addDNSRecord - done
addFTPUser - done
addSQLDatabase - done
addSQLDatabaseUser - done

updateSQLDatabaseUser - done
updateDomain - done
updateEmailAddress - done
updateFTPUser
updateDNSRecord
updateAliasDomain - done

removeSQLDatabaseUser
removeSQLDatabase - done
removeFTPUser - done
removeDomainAlias - done
removeSubDomain - done
removeDNSRecord - done
removeCatchAll - done
removeEmailAddress - done
removeDomain

getDNSRecordList - done
getSubDomainList - done
getAliasDomainList - done
getMailList - done
getHostingPlans - done
getServerIPs - done
getDomainList - done

I personally need this so i can have 1 central "control center" and many ispcp installations so i can manage it all in the one place. But there would be many other uses I am sure..

I'll update this thread with more info once I have completed more of the API.

Cheers

EDIT: Updated function list.
EDIT: Updated function list with progress.


RE: API - antonypuckey - 11-07-2010 05:49 PM

I'm about 50% done. Probably about 2 days time ill have a working version to upload!


RE: API - sci2tech - 11-07-2010 08:54 PM

If you do it we shall check and see if this can be merged safely into trunk


RE: API - antonypuckey - 11-07-2010 10:32 PM

Just an update before I slink off to bed. The core API functionality is done. The following functions have been completed and tested.

removeFTPUser
removeDomainAlias
removeSubDomain
removeDNSRecord
removeCatchAll

getDNSRecordList
getSubDomainList
getAliasDomainList
getMailList

updateEmailAddress

Once I have finished all functions I will add logging and add additional security checks before i upload it to this thread.

Will post more information tomorrow.

Cheers!


RE: API - Snooops - 11-09-2010 12:07 AM

Why are you using ZendFramework? its a really big overhead.


RE: API - spidersoftware - 11-09-2010 04:11 AM

Fantastic, i want test when finish, a Greet.


RE: API - kassah - 11-10-2010 02:18 AM

(11-09-2010 12:07 AM)Snooops Wrote:  Why are you using ZendFramework? its a really big overhead.

Only if you include everything including the kitchen sink in your package. It is easy to just slim it down to what you use, it's a component based system, so you're by no means required to use all of it.


RE: API - Snooops - 11-10-2010 02:41 AM

(11-10-2010 02:18 AM)kassah Wrote:  
(11-09-2010 12:07 AM)Snooops Wrote:  Why are you using ZendFramework? its a really big overhead.

Only if you include everything including the kitchen sink in your package. It is easy to just slim it down to what you use, it's a component based system, so you're by no means required to use all of it.

i know about ZendFramework and im only using it to communicate between programms, because php isnt very usefull for it. But here we just got an API for the backend right? The API should give some functions which manipulate the database like ispcp daemon want. So there is no need to pick a 50MB Framework into the package which has no use here. It would be more faster if it would come without it. But its just a suggestion ;-)
At least i suspect nothing else more than a php file with a lot of functions full of mysql querys ;-). If im wrong, im sorry and failed ;-)

Greetings,
Snooops


RE: API - antonypuckey - 11-11-2010 03:34 PM

Sorry for not replying in a could of days. Been really busy with work.

Attached is a rough image of how I'm designing it. the JSON interface is theoretical at the moment. But could potentially be added without too much hassle if you wanted to extend it.

[Image: ispcp-api.jpg]


RE: API - aseques - 11-11-2010 08:35 PM

Hey, in case you need the sql stuff needed for the functions, I've done a script in php that can create almost all the components of a ispcp installation.
The objective in my case was to be able to script the creation of a domain (creating mailboxes, webspace, etc) and to make the transition from plesk easier.
Feel free to use anything you like of it. The code is probably a disaster, but it does what it promises ;P

http://isp-control.net/forum/thread-4255.html