Automate account creation tasks
Hi,
Currently, for each new domain, this is what i'm doing :
- Create new account
- Edit the dns zone of the domaine to add custom A (ns1.thedomaine.com ns2.thedomaine.com)
- Login to the new created account and create a new Mysql database
- Create an user for this database
- Add the rights for this database to this user
This is what i need to do for each domain and i'm doing this at least 10 times a day.
Is there any ways to automatise all of that ? Maybe create the zones and database for each new account ?
The best will be to import a list of domain and doing all of that in auto.
Any suggestion ?
Thank you.
-
Hello :) Yes, you could develop a script that utilizes our API and then configure it to run automatically after account creation through a hook. The following documents are a good place to start: Guide to UAPI - Software Development Kit - cPanel Documentation Guide to Standardized Hooks - Software Development Kit - cPanel Documentation Note that some API functions are not yet available as UAPI functions. You can use cPanel API 2 in these cases: cPanel API 2 Functions - ZoneEdit::add_zone_record - Software Development Kit - cPanel Documentation Thank you. 0 -
Already coded and working :) Thank you 0 -
Seems that we can't copy files from an account to another with the api. What is the hook event for account creation ? i can't find it in the doc... Thank you 0 -
What is the hook event for account creation ? i can't find it in the doc
It's the "Accounts::Create" hook documented at: Guide to Standardized Hooks - Whostmgr Functions - Software Development Kit - cPanel Documentation Thank you.0 -
Script hooks are deprecated, and you should not use the instructions from the document you referenced. Instead, use standardized hooks: Guide to Standardized Hooks - Software Development Kit - cPanel Documentation Thank you. 0 -
Thank you, I followed this doc, i registered my hook and used the php xample here : Guide to Standardized Hooks - Hook Action Code - Software Development Kit - cPanel Documentation It's woking but i can't get the passed datas, i need the username and password 0 -
It's woking but i can't get the passed datas, i need the username and password
Could you elaborate on this? For instance, does your custom script authenticate and utilize API functions? Thank you.0
Please sign in to leave a comment.
Comments
8 comments