Update hosting : Suspend/unsuspend domain

Request Information
URL PATCH {{basepath}}/hosting/:hosting_id
CategoryHosting

Description

Allows you to suspend the attached domain.

the request body should contain a HostingUpdateRequest object.

Returns a HostingGetResponse object.

Url variables
:hosting_id{{hosting_id}}
JSON
{
    "suspendDomain": true,
    "suspendReason": "testo"
}

Example responses

Update hosting : Suspend domain
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspendDomain": true
}
Url variables
:hosting_id{{hosting_id}}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_b7359c5bcd88c5c3e1f7b145b492d0a591cd4159",
    "status": "pending",
    "message": "Your update request is pending",
    "hosting": {
        "identifier": "1_af46771e1f7e0641c63d6326c421315101510435",
        "status": "active",
        "domain": "example-2022-1-26-9-56-0.com",
        "info": {
            "serverPlan": "basic",
            "pleskUser": "h_00000004",
            "pleskFtpUser": "f_00000004",
            "pleskClientId": 293,
            "pleskHostingId": 250,
            "activeDomains": 1,
            "subdomains": 0,
            "diskspace": 0,
            "databases": 0,
            "traffic": 0,
            "trafficPrevDay": 0
        },
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled",
                "arguments": []
            }
        ],
        "package": {
            "packageId": "basic",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "1000"
                }
            ],
            "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"
            ],
            "usage": 2,
            "capacity": 20,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": false,
        "suspendedDomain": false,
        "renewalDay": 26,
        "period": 1,
        "nextRenewal": "2022-01-27",
        "openJobCount": 1,
        "servicePeriod": 7,
        "serviceStatus": "active",
        "serviceRenewalMonth": 1,
        "nextServiceRenewalDate": "2022-02-02",
        "created": 1643187360,
        "modified": 1644483787
    }
}
Update hosting :unsuspend domain
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspendDomain": false
}
Url variables
:hosting_id{{hosting_id}}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_10f5ffa23634091f4177f755c45b39a4a7185af1",
    "status": "pending",
    "message": "Your update request is pending",
    "hosting": {
        "identifier": "1_af46771e1f7e0641c63d6326c421315101510435",
        "status": "active",
        "domain": "example-2022-1-26-9-56-0.com",
        "info": {
            "serverPlan": "basic",
            "pleskUser": "h_00000004",
            "pleskFtpUser": "f_00000004",
            "pleskClientId": 293,
            "pleskHostingId": 250,
            "activeDomains": 1,
            "subdomains": 0,
            "diskspace": 0,
            "databases": 0,
            "traffic": 0,
            "trafficPrevDay": 0
        },
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled",
                "arguments": []
            }
        ],
        "package": {
            "packageId": "basic",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "1000"
                }
            ],
            "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"
            ],
            "usage": 2,
            "capacity": 20,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": false,
        "suspendedDomain": false,
        "renewalDay": 26,
        "period": 1,
        "nextRenewal": "2022-01-27",
        "openJobCount": 1,
        "servicePeriod": 7,
        "serviceStatus": "active",
        "serviceRenewalMonth": 1,
        "nextServiceRenewalDate": "2022-02-02",
        "created": 1643187360,
        "modified": 1644483799
    }
}
Update hosting : Suspend domain with reason
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspendDomain": true,
    "suspendReason": "domain has a bad word"
}
Url variables
:hosting_id{{hosting_id}}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_6a98bf75cef6daff6005827677c27d25b6b8e948",
    "status": "pending",
    "message": "Your update request is pending",
    "hosting": {
        "identifier": "1_33c2d5117c4ce3ad473a4512df1870b35bfe78db",
        "status": "active",
        "domain": "example-2022-4-4-12-21-27.com",
        "domains": [],
        "info": {
            "serverPlan": "basic",
            "pleskUser": "h_00000023",
            "pleskFtpUser": "f_00000023",
            "pleskClientId": 322,
            "pleskHostingId": 283,
            "activeDomains": 1,
            "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": 50,
            "reservationWeight": 25,
            "capacity": 900,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": false,
        "suspendedDomain": false,
        "renewalDay": 4,
        "period": 1,
        "periodUnit": "D",
        "nextRenewal": "2022-04-05",
        "openJobCount": 1,
        "servicePeriod": 7,
        "serviceStatus": "active",
        "serviceRenewalMonth": 4,
        "nextServiceRenewalDate": "2022-04-11",
        "created": 1649067687,
        "modified": 1709196904
    }
}