PUT api/Hosting/{hosting_handle}
Update certain elements of the hosting specified by handle
Updatable elements:
Framework - api will attempt to find a single matching framework using the whatever properites have been supplied. The simplest way is to provide only the Id.
WindowsConfig - only for windows hostings
AdminContact - this can be changed to a different contact by supplying a handle. The new contact must exist and you need to have permision
BillingContact - this can be changed to a different contact by supplying a handle. The new contact must exist and you need to have permision
AutoRenew - automatic renewal
HasStats - generate statistics
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| hosting_handle |
Hosting object handle |
string |
Required |
Body Parameters
Body - the hosting object with elements to update
EditHosting| Name | Description | Type | Additional information |
|---|---|---|---|
| AdminContact |
Admin contact |
HostingEditContact |
None. |
| BillingContact |
Billing contact |
HostingEditContact |
None. |
| FrameWork |
Framework |
EditFramework |
None. |
| WindowsConfig |
Windows configuration |
EditWindowsConfig |
None. |
| AutoRenew |
Has auto renew |
boolean |
None. |
| HasStats |
Has stats |
boolean |
None. |
Request Formats
application/json, text/json
{
"HostingHandle": "myhost1",
"Framework": {
"Type": "PHP",
"Version": "7.1.12"
}
}
application/xml, text/xml
<EditHosting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
<AdminContact>
<Handle>sample string 1</Handle>
</AdminContact>
<AutoRenew>true</AutoRenew>
<BillingContact>
<Handle>sample string 1</Handle>
</BillingContact>
<FrameWork>
<Id>1</Id>
<Os>sample string 3</Os>
<Type>sample string 1</Type>
<Version>sample string 2</Version>
</FrameWork>
<HasStats>true</HasStats>
<WindowsConfig>
<AspEnableParentPaths>true</AspEnableParentPaths>
<DefaultDocs xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>sample string 1</d3p1:string>
<d3p1:string>sample string 2</d3p1:string>
</DefaultDocs>
<EnableDirBrowsing>true</EnableDirBrowsing>
</WindowsConfig>
</EditHosting>
application/x-www-form-urlencoded
Response Information
Resource Description
A hosting object on success
Collection of errors on failure
Return codes
200 - ok
300 - Ambiguous
400 - Bad request
401 - unauthorized
404 - not found
500 - internal server error
800 - Framework does not exist or is not available for this hosting
801 - More than one framework available with given properties
802 - This combination of framework type and os is not available
803 - Invalid os for this operation
| Name | Description | Type | Additional information |
|---|---|---|---|
| HostingHandle |
Object handle |
string |
None. |
| DomainHandle |
Domain object handle |
string |
None. |
| Dir |
Mail Object handle |
string |
None. |
| PackId | integer |
None. |
|
| HasStats | boolean |
None. |
|
| HasLogs | boolean |
None. |
|
| FreqLogs | integer |
None. |
|
| IsFp | boolean |
None. |
|
| FlagFp | integer |
None. |
|
| GroupServerId | integer |
None. |
|
| HostingEtat | integer |
None. |
|
| IsDemo | boolean |
None. |
|
| HasWordPressOneClick | boolean |
None. |
|
| HostingName |
Name of hosting instance |
string |
None. |
| PackName |
Name of the hosting pack |
string |
None. |
| DomainName |
Domaine associated with this domaine |
string |
None. |
| AdminContact |
Admin contact |
HostingContact |
None. |
| BillingContact |
Billing contact |
HostingContact |
None. |
| RegDate |
Date registered |
date |
None. |
| ObjectHandle | string |
None. |
|
| CreDate |
Date created |
date |
None. |
| ExpDate |
Expiry date |
date |
None. |
| TransferInDate |
Transfer in date |
date |
None. |
| Os |
Operating system - linux, windows |
string |
None. |
| OsVersion |
Operating system version |
string |
None. |
| PublicIp |
Public ip address of the server |
string |
None. |
| FrameWork |
Framework |
Framework |
None. |
| PackType | string |
None. |
|
| Detail | string |
None. |
|
| WindowsConfig |
Windows configuration |
WindowsConfig |
None. |
| Limits |
Allowed limits |
Limits |
None. |
| AutoRenew |
Has auto renew |
boolean |
None. |
| Status |
Object status |
string |
None. |
Response Formats
application/json, text/json
{
"HostingHandle": "myhost1",
"DomainHandle": "mydom1",
"Dir": "/var/www/sites/myhost1",
"PackId": 0,
"HasStats": false,
"HasLogs": false,
"FreqLogs": 0,
"IsFp": false,
"FlagFp": 0,
"GroupServerId": 0,
"HostingEtat": 0,
"IsDemo": false,
"HasWordPressOneClick": false,
"HostingName": "mydomain.com",
"PackName": "Linux 5",
"DomainName": "mydomain.com",
"AdminContact": null,
"BillingContact": null,
"RegDate": "0001-01-01T00:00:00",
"ObjectHandle": null,
"CreDate": "0001-01-01T00:00:00",
"ExpDate": "0001-01-01T00:00:00",
"TransferInDate": "0001-01-01T00:00:00",
"Os": "linux",
"OsVersion": null,
"PublicIp": null,
"FrameWork": {
"Id": null,
"Type": "PHP",
"Version": "7.1.12",
"Desrciption": "PHP 7.1.12",
"Os": "linux",
"Default": false,
"Actif": false
},
"PackType": "linux",
"Detail": null,
"WindowsConfig": null,
"Limits": null,
"AutoRenew": null,
"Status": null
}
application/xml, text/xml
<Hosting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Hosting">
<AdminContact i:nil="true" />
<AutoRenew i:nil="true" />
<BillingContact i:nil="true" />
<CreDate>0001-01-01T00:00:00</CreDate>
<Detail i:nil="true" />
<Dir>/var/www/sites/myhost1</Dir>
<DomainHandle>mydom1</DomainHandle>
<DomainName>mydomain.com</DomainName>
<ExpDate>0001-01-01T00:00:00</ExpDate>
<FlagFp>0</FlagFp>
<FrameWork>
<Actif>false</Actif>
<Default>false</Default>
<Desrciption>PHP 7.1.12</Desrciption>
<Id i:nil="true" />
<Os>linux</Os>
<Type>PHP</Type>
<Version>7.1.12</Version>
</FrameWork>
<FreqLogs>0</FreqLogs>
<GroupServerId>0</GroupServerId>
<HasLogs>false</HasLogs>
<HasStats>false</HasStats>
<HasWordPressOneClick>false</HasWordPressOneClick>
<HostingEtat>0</HostingEtat>
<HostingHandle>myhost1</HostingHandle>
<HostingName>mydomain.com</HostingName>
<IsDemo>false</IsDemo>
<IsFp>false</IsFp>
<Limits i:nil="true" />
<ObjectHandle i:nil="true" />
<Os>linux</Os>
<OsVersion i:nil="true" />
<PackId>0</PackId>
<PackName>Linux 5</PackName>
<PackType>linux</PackType>
<PublicIp i:nil="true" />
<RegDate>0001-01-01T00:00:00</RegDate>
<Status i:nil="true" />
<TransferInDate>0001-01-01T00:00:00</TransferInDate>
<WindowsConfig i:nil="true" />
</Hosting>