API. Create a mysql database with curl

speckados

Well-Known Member
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?
 

speckados

Well-Known Member
I don't need explain how to use.I need to find the endpoint.

Example:
For create addon use

I go to manual of cpanel and there're a entry for creat add on domain.

I go to cpanel's docs, to google, and the're not a endpoint for add a database, use database, for one account.

Also the're not a funciontion for API 1,
Example:


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.