Duplicate database
Duplicates a database in your server
POST api/servers/{server}/databases/{database}/duplicate
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | Maximum: 255 , the name of the new database on your server |
user | string | optional | Maximum: 255 |
password | string | optional | Maximum: 50 |
Example request:
curl -X GET "https://ploi.io/api/servers/{server}/databases/{database}/duplicate" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
--data '{"name": "new_database", "user": "new_user", "password": "random_password"}'
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 1,
"type": null,
"name": "new_databases",
"server_id": 1,
"status": "created",
"created_at": "2021-01-01 00:00:00"
},
"message": "Database my_databases is being cloned to new_database"
}