Delete hosting

Request Information
URL DELETE {{basepath}}/hosting/{{hosting_id}}
CategoryHosting

Description

Allows you to delete a hosting object. This is a very destructive call. The delete will happen as soon as a worker picks it up. So be very sure you want to do this!

the request body should contain a HostingDeleteRequest object.

Returns a HostingGetResponse object.

JSON
{
    "reason": "e.g. an order id or cancellation id or something, this is logged for conflict resolution purposes",
    "domain": "example.com"
}

Example responses

Delete hosting object
Request Method & URL
DELETE {{basepath}}/hosting/{{hosting_id}}
Request Body:
{
    "reason": "e.g. an order id or cancellation id or something, this is logged for conflict resolution purposes",
    "domain": "example.com"
}
Response Code:
202 Accepted
Response Body:
{
    "response_id": "1_f4c452c2ee7de0027df17c12be5187d32199578b",
    "status": "pending",
    "message": "Your delete request is pending",
    "hosting": {
        "identifier": "1_a25eb282c7a8e1bd4139b9511513fd7c873b673c",
        "status": "active",
        "domain": "example-2021-7-16-12-44-1.com",
        "options": [
            {
                "name": "letsEncrypt",
                "value": "disabled"
            }
        ],
        "package": {
            "package_id": "basic1",
            "type": "plesk",
            "status": "active",
            "spec": [
                {
                    "type": "diskspace",
                    "value": "1000"
                }
            ],
            "created": 1626272615,
            "modified": 1626272619
        },
        "server": {
            "identifier": "plesktest",
            "hostname": "plesktest.metaregistrar.com",
            "type": "plesk",
            "status": "active",
            "ips": [
                {
                    "address": "10.0.0.2",
                    "version": 4
                }
            ],
            "available_packages": [
                "basic1",
                "basic2"
            ],
            "created": 1626259040,
            "modified": 1626259045
        },
        "created": 1626432241,
        "modified": 1626432241
    }
}
Delete hosting on inactive hosting
Request Method & URL
DELETE {{basepath}}/hosting/{{hosting_id}}
Request Body:
{
    "reason": "e.g. an order id or cancellation id or something, this is logged for conflict resolution purposes",
    "domain": "example.com"
}
Response Code:
405 Method Not Allowed
Response Body:
{
    "response_id": "1_74af41d601ca5579b129cf0eee22a33b9b75ea06",
    "error_code": "not_active",
    "error_message": "This hosting is not in an active state so cannot be deleted"
}