Update hosting options: malwareScanner

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

Description

Allows you to update hosting options

the request body should contain a HostingOptionsUpdateRequest object.

Returns a HostingOptionsResponse object.

Url variables
:hosting_id{{hosting_id}}The hosting identifier
JSON
{
    "options": [
        {
            "name": "malwareScanner",
            "value": "enabled",
            "malwarescanIntervalPeriod": 1,
            "malwarescanIntervalUnit": "h",
            "malwarescanAllowClientCleanup": false
        }
    ]
}

Example responses

Set the malwarescanner interval
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id/options
Request Body:
{
    "options": [
        {
            "name": "malwareScanner",
            "value": "enabled",
            "malwarescanIntervalPeriod": 1,
            "malwarescanIntervalUnit": "h",
            "malwarescanAllowClientCleanup": false
        }
    ]
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
202 Accepted
Response Body:
{
    "response_id": "1_85df60834d4de4d342bd0788f828f32d4726b6ec",
    "status": "pending",
    "message": "Your operation is pending execution",
    "options": [
        {
            "name": "letsEncrypt",
            "value": "disabled",
            "arguments": []
        },
        {
            "name": "malwareScanner",
            "value": "disabled",
            "malwarescanIntervalPeriod": 1,
            "malwarescanIntervalUnit": "m",
            "malwarescanAllowClientCleanup": false,
            "arguments": []
        }
    ]
}
Hosting is not active (provisioning) so cannot be updated yet
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id/options
Request Body:
{
    "options": [
        {
            "name": "letsEncrypt",
            "value": "enabled",
            "arguments": [
                "john@example.com",
                "includewww"
            ]
        }
    ]
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
405 Method Not Allowed
Response Body:
{
    "response_id": "1_62d2f0918a1969e7ffd7aeb6b4d566767db45f5e",
    "status": "error",
    "error_code": "not_active",
    "error_message": "This hosting is not in an active state so cannot be updated"
}