Adopt hosting

Request Information
URL POST {{basepath}}/hosting/adopt
CategoryHosting

Description

This allows for the adoption of a hosting object.

To be adoptable the hosting should exist in plesk. If it does not, the job will fail and will have to be cleared by support
It is only allowed to be called by users with the hosting_adopt rights

The request body should contain a HostingAdoptRequest object.

Returns a HostingAdoptResponse object.

JSON
{
    "package": "basic",
    "username": "johntest2023-05-15-8.nl",
    "server": "pleskdev",
    "domain": "johntest2023-05-15-8.nl",
    "metadata": {
        "mtr_hostingid": 1,
        "blorp": "21341234",
        "serverType": "smoketest"
    }
}

Example responses

Adopt hosting
Request Method & URL
POST {{basepath}}/hosting/adopt
Request Body:
{
    "package": "basic",
    "username": "johntest2023-05-15-6.nl",
    "server": "pleskdev",
    "domain": "johntest2023-05-15-6.nl",
    "aliases": [
        "test1234.nl"
    ],
    "metadata": {
        "mtr_hostingid": 1,
        "blorp": "21341234",
        "serverType": "smoketest"
    }
}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_bd356753a4974b73a5a769af0341b32e67e247a8",
    "status": "pending",
    "message": "Your hosting adoption is pending",
    "hosting": {
        "identifier": "1_d9f4f86edc65a1e0500b4a3a6908be21d4710351",
        "status": "adopting",
        "domain": "johntest2023-05-15-6.nl",
        "info": {
            "serverPlan": "unknown",
            "pleskUser": "unknown",
            "pleskFtpUser": "unknown",
            "pleskClientId": 0,
            "pleskHostingId": 0,
            "activeDomains": 0,
            "subdomains": 0,
            "diskspace": 0,
            "databases": 0,
            "traffic": 0,
            "trafficPrevDay": 0
        },
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled",
                "arguments": []
            },
            {
                "name": "malwareScanner",
                "value": "enabled",
                "malwarescanIntervalPeriod": 1,
                "malwarescanIntervalUnit": "m",
                "malwarescanAllowClientCleanup": true,
                "arguments": []
            }
        ],
        "package": {
            "packageId": "basic",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "1000"
                },
                {
                    "type": "domains",
                    "value": "5"
                }
            ],
            "created": 1626272615,
            "modified": 1626272619
        },
        "server": {
            "identifier": "pleskdev",
            "hostname": "pleskdev.yourdomainprovider.net",
            "type": "plesk",
            "status": "active",
            "ips": [
                {
                    "address": "213.249.70.50",
                    "version": 4
                },
                {
                    "address": "2a01:448:1004::50",
                    "version": 6
                }
            ],
            "availablePackages": [
                "basic",
                "pro",
                "basic_protest"
            ],
            "usage": 905,
            "capacity": 900,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": false,
        "suspendedDomain": false,
        "renewalDay": 15,
        "period": 1,
        "openJobCount": 1,
        "domains": [],
        "servicePeriod": 7,
        "serviceStatus": "adopting",
        "serviceRenewalMonth": 5,
        "created": 1684152736,
        "modified": 1684152736,
        "metadata": {
            "mtr_hostingid": 1,
            "blorp": "21341234",
            "serverType": "smoketest"
        }
    }
}