MySQL

List databases

List all the databases available in the server.

GET api/servers/{server}/mysql

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/mysql" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Example response:

null

Create database

Creates a new database in your server

POST api/servers/{server}/mysql

Parameters

Parameter Type Status Description
name string required Allowed: alpha-numeric characters, as well as dashes and underscores. Minimum: 2 Maximum: 64 Not in: database
user string optional Allowed: alpha-numeric characters, as well as dashes and underscores. Minimum: 2 Maximum: 64
password string optional

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/mysql" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
    -d "name"="voluptas" \
    -d "user"="voluptas" \
    -d "password"="voluptas" \

Example response:

null

Get database

Get the selected database

GET api/servers/{server}/mysql/{id}

Example request:

curl -X GET "https://ploi.io/api/servers/{server}/mysql/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Example response:

null

Delete database

Deletes a database in your server

DELETE api/servers/{server}/mysql/{id}

Example request:

curl -X DELETE "https://ploi.io/api/servers/{server}/mysql/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Example response:

null