Site Apps

WordPress

Install WordPress system on this domain

POST api/servers/{server}/sites/{id}/wordpress

Parameters

Parameter Type Status Description
create_database boolean optional Whether to automatically create a database

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/wordpress" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"   
    --data '{"create_database": true}'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 90,
        "domain": "domain.com",
        "web_directory": "/public",
        "wordpress": true,
        "laravel": false,
        "project_root": "/",
        "last_deploy_at": "2018-09-14 20:43:11",
        "created_at": "2018-09-14 11:40:01"
    }
}

Uninstall WordPress system on this domain

DELETE api/servers/{server}/sites/{id}/wordpress

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 90,
        "domain": "domain.com",
        "web_directory": "/public",
        "wordpress": false,
        "laravel": false,
        "project_root": "/",
        "last_deploy_at": "2018-09-14 20:43:11",
        "created_at": "2018-09-14 11:40:01"
    }
}

Nextcloud

Install Nextcloud system on this domain

POST api/servers/{server}/sites/{id}/nextcloud

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 90,
        "domain": "domain.com",
        "web_directory": "/public",
        "wordpress": false,
        "laravel": false,
        "project_root": "/",
        "last_deploy_at": "2018-09-14 20:43:11",
        "created_at": "2018-09-14 11:40:01"
    }
}

Uninstall NextCloud system on this domain

DELETE api/servers/{server}/sites/{id}/nextcloud

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 90,
        "domain": "domain.com",
        "web_directory": "/public",
        "wordpress": false,
        "laravel": false,
        "project_root": "/",
        "last_deploy_at": "2018-09-14 20:43:11",
        "created_at": "2018-09-14 11:40:01"
    }
}