Ploi API

Create database user

Creates a new user in your database

POST api/servers/{server}/databases/{database}/users

Parameters

Parameter Type Status Description
user string optional Allowed: alpha-numeric characters, no dashes allowed.
password string required

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/databases" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data '{"user":"my_user", "password":"db_password"}'

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "data": {
        "id": 1,
        "user": "my_user",
        "remote": false,
        "remote_ip": "%",
        "readonly": false,
        "created_at": "2022-02-16 10:45:34"
    }
}