API. Create a mysql database with curl
I use the api via root, for actions like WHM and Cpanel.
In the chaos of creating a database and a mysql user associated with it, I don't see that there is an api call from whm, and I understand that there should be an option like the ones I use to create an addon domain, that is, a call to port 2087 but using cpanel_jsonapi_version 2 and its corresponding module.
But, I do not see it.
The most I see is the use of UAPI having to use port 2083.
Is this the only way?
-
I don't need explain how to use.I need to find the endpoint. Example: For create addon use In all two examples use a TOKEN create in WHM. "Ther're are a endpoint for add mysql database, add user mysql associate to user cpanel? That is the question. Best regards. 0 -
I go to cpanel's docs, to google, and the're not a endpoint for add a database, use database, for one account.
I think that you are looking for Create MySQL database " cPanel & WHM Developer Portal0 -
That is not correct for my question. That is for acceso with api for user to port 2083 instead root /2087 I use this with UAPI, (workaround) on shell . My question is **with json-api or api1** Thanks. 0 -
I looked through the API just now - both the new docs and the old documentation site - and I'm not seeing a root method to create a database. Create MySQL database " cPanel & WHM Developer Portal is the best option we have for that currently. If you'd like to see an additional API function added, can you make a feature request for that using the link in my signature? 0 -
Yes,. This work around that I use for my work. Incredible that API has not a method direct for root. It is an API in halves, which requires the use of upai or console commands, instead of doing it with the API itself. Very deficit. Thanks for your replies @cPRex 0
Please sign in to leave a comment.
Comments
6 comments