URL | PATCH {{basepath}}/hosting/:hosting_id |
---|---|
Category | Hosting |
Allows you to update the hosting object.
the request body should contain a HostingUpdateRequest object.
Returns a HostingGetResponse object.
:hosting_id | {{hosting_id}} |
---|
{
"package": "basic"
}
PATCH {{basepath}}/hosting/:hosting_id
{
"package": "pro"
}
:hosting_id | {{hosting_id}} | The hosting you want to update |
---|
202 Accepted
{
"responseId": "1_883e0316c4c053c9fc385baddcb40192937714ff",
"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": "basic",
"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": "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": 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": 1628512882
}
}
PATCH {{basepath}}/hosting/:hosting_id
{
"package": "basic2"
}
:hosting_id | {{hosting_id}} | The hosting identifier |
---|
409 Conflict
{
"responseId": "1_47b801880c83a83c22936089098df360d7fa336d",
"status": "error",
"errorCode": "would_not_change_anything",
"errorMessage": "The hosting is already this package"
}
PATCH {{basepath}}/hosting/:hosting_id
{
"package": "basic_protest"
}
:hosting_id | {{hosting_id}} |
---|
409 Conflict
{
"responseId": "1_2bd6e9eacbb1c76336074c914c9538b48a3ff756",
"status": "error",
"errorCode": "cannot_change_package",
"errorMessage": "The supplied package can only be used to create products"
}