Hello.
I use cPanel JSON API in WHM plugin. It works, but not so good as it ought to be.
I make 5 calls, but sometimes something breaks.
0. /json-api/removeacct?username=USERNAME
Response: successfully removed
wait 10s
1. /json-api/createacct?username=USERNAME&password=PASSWORD&domain=DOMAIN&cgi=0"a=1&maxpop=0&maxftp=1&maxsql=1&useregns=0&forcedns=1&reseller=0
Bug 1 error: A database owner with the name “USERNAME” already exists
wait 10s
2. /XXX/json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adddb&arg-0=DBNAME
wait 10s
3. /json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adduser&arg-0=DB_USER&arg-1=DB_PASS
wait 10s
4. /json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adduserdb&arg-0=DBNAME&arg-1=DB_USER&arg-2=all
Bug 2 error: "You do not own the user (DB_USER)!"
I have to manually delete this user from DB.
This bug reproduces on 11.44.0 (build 30) & 11.44.1 (build 18).
Any hints appreciated.
I use cPanel JSON API in WHM plugin. It works, but not so good as it ought to be.
I make 5 calls, but sometimes something breaks.
0. /json-api/removeacct?username=USERNAME
Response: successfully removed
wait 10s
1. /json-api/createacct?username=USERNAME&password=PASSWORD&domain=DOMAIN&cgi=0"a=1&maxpop=0&maxftp=1&maxsql=1&useregns=0&forcedns=1&reseller=0
Bug 1 error: A database owner with the name “USERNAME” already exists
wait 10s
2. /XXX/json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adddb&arg-0=DBNAME
wait 10s
3. /json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adduser&arg-0=DB_USER&arg-1=DB_PASS
wait 10s
4. /json-api/cpanel?user=USERNAME&cpanel_jsonapi_module=Mysql&cpanel_jsonapi_apiversion=1&cpanel_jsonapi_func=adduserdb&arg-0=DBNAME&arg-1=DB_USER&arg-2=all
Bug 2 error: "You do not own the user (DB_USER)!"
I have to manually delete this user from DB.
This bug reproduces on 11.44.0 (build 30) & 11.44.1 (build 18).
Any hints appreciated.