Update hosting option: malwareScanner

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

Description

Allows you to update hosting options

the request body should contain a HostingOptionUpdateRequest object.

Returns a HostingOptionGetResponse object.

Url variables
:hosting_id{{hosting_id}}The hosting identifier
:optionmalwareScanner
JSON
{
    "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:
{
    "name": "malwareScanner",
    "value": "enabled",
    "malwarescanIntervalPeriod": 1,
    "malwarescanIntervalUnit": "m",
    "malwarescanAllowClientCleanup": false
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
202 Accepted
Response Body:
{
    "responseId": "1_37ee18fcdc38d2dce068494d0f8a73e95562c1ae",
    "status": "ok",
    "message": "The option is attached",
    "option": {
        "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:
{
    "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"
}