Update hosting : Suspend/unsuspend

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

Description

Allows you to update the hosting object.

the request body should contain a HostingUpdateRequest object.

Returns a HostingGetResponse object.

Url variables
:hosting_id{{hosting_id}}
JSON
{
    "suspend": true,
    "suspendReason": "testcase"
}

Example responses

Update hosting : Suspend
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspend": true
}
Url variables
:hosting_id{{hosting_id}}The hosting you want to update
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_a3d2a91ea26f5a417c9a31e0d29945e5f7cc9f9d",
    "status": "pending",
    "message": "Your update request is pending",
    "hosting": {
        "identifier": "1_aed1f3d95b069d5cdf88ef9d70392d359847e144",
        "status": "active",
        "domain": "example-2021-8-9-14-40-49.com",
        "info": {
            "serverPlan": "pro",
            "pleskUser": "h_00000001",
            "pleskFtpUser": "f_00000001",
            "pleskClientId": 282,
            "pleskHostingId": 235,
            "activeDomains": 1,
            "subdomains": 0,
            "diskspace": 0,
            "databases": 0,
            "traffic": 0,
            "trafficPrevDay": 0
        },
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled",
                "arguments": []
            }
        ],
        "package": {
            "packageId": "pro",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "10000"
                }
            ],
            "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": 1,
            "capacity": 20,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": false,
        "renewalDay": 9,
        "period": 1,
        "nextRenewal": "2021-08-10",
        "openJobCount": 1,
        "servicePeriod": 7,
        "serviceStatus": "active",
        "serviceRenewalMonth": 8,
        "nextServiceRenewalDate": "2021-08-16",
        "created": 1628512849,
        "modified": 1628513184
    }
}
Update hosting :Unsuspend
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspend": false
}
Url variables
:hosting_id{{hosting_id}}The hosting you want to update
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_f96520a31c219b83abc375f5ad9cc3ece837a6aa",
    "status": "pending",
    "message": "Your update request is pending",
    "hosting": {
        "identifier": "1_aed1f3d95b069d5cdf88ef9d70392d359847e144",
        "status": "active",
        "domain": "example-2021-8-9-14-40-49.com",
        "info": {
            "serverPlan": "pro",
            "pleskUser": "h_00000001",
            "pleskFtpUser": "f_00000001",
            "pleskClientId": 282,
            "pleskHostingId": 235,
            "activeDomains": 1,
            "subdomains": 0,
            "diskspace": 0,
            "databases": 0,
            "traffic": 0,
            "trafficPrevDay": 0
        },
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled",
                "arguments": []
            }
        ],
        "package": {
            "packageId": "pro",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "10000"
                }
            ],
            "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": 1,
            "capacity": 20,
            "created": 1626259040,
            "modified": 1626259045
        },
        "suspended": true,
        "renewalDay": 9,
        "period": 1,
        "nextRenewal": "2021-08-10",
        "openJobCount": 1,
        "servicePeriod": 7,
        "serviceStatus": "active",
        "serviceRenewalMonth": 8,
        "nextServiceRenewalDate": "2021-08-16",
        "created": 1628512849,
        "modified": 1628513622
    }
}
Update hosting : Suspend with reason
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id
Request Body:
{
    "suspend": true,
    "suspendReason": "Ugly colors"
}
Url variables
:hosting_id{{hosting_id}}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_7bced7e725d731a6dbdd8f90980d9b5cfb0a51e2",
    "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": 1709196666
    }
}