Hostings

Detailed representation attributes

identifier The identifier for the hosting account.

JSON representation

{
    "identifier": "abc.be"
}

Get hostings

Possible errors:

Errorcode HTTP statuscode Description
invalid_paging_request 400 Incorrect paging parameters are passed. Check the 'conventions' documentation for more information.

Example request (default paging)

GET /hostingaccounts HTTP/1.1
Authorization: hmac 144...07f:Jxo...aiM=:2cb...dd3:1459425654
Accept: application/json, application/xml;q=0.8, */*;q=0.5

Example paged request

GET /hostingaccounts?skip=100&take=50 HTTP/1.1
Authorization: hmac 144...07f:Jxo...aiM=:2cb...dd3:1459425654
Accept: application/json, application/xml;q=0.8, */*;q=0.5

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Mar 2016 20:11:05 GMT
X-Ratelimit-Limit: 10
X-Ratelimit-Usage: 4
X-Paging-Skipped: 100
X-Paging-Take: 50
X-Paging-TotalResults: 170
[{ },{ },...,{ }]

Get specific hosting

Possible errors:

Errorcode HTTP statuscode Description
hostingaccount_invalid_identifier 403 You do not own the hosting account.

Example request

GET /hostingaccounts/myhosting.be HTTP/1.1
Authorization: hmac 144...07f:Jxo...aiM=:2cb...dd3:1459425654
Accept: application/json, application/xml;q=0.8, */*;q=0.5

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Mar 2016 20:11:05 GMT
X-Ratelimit-Limit: 10
X-Ratelimit-Usage: 4
{ }

Create a hosting

Detailed representation attributes

servicepack_id The id of the servicepack. To get the ids, you can get the servicepacks (see servicepack-resource definition).
identifier The identifier for the account.
password The ftp password for the account.

Response content:

Status code 202 (Accepted)
Location header The api location to check for creation status.

Possible errors:

Errorcode HTTP statuscode Description
hosting_already_exist 400 There is already a hosting with the provided identifier.
missing_reseller 403
missing_reseller_profile 403
invalid_service_pack 400 The given service pack is invalid for the account creation.

Example hosting account creation request

POST /hostingaccounts HTTP/1.1
Authorization: hmac 144...07f:Jxo...aiM=:2cb...dd3:1459425654
Accept: application/json, application/xml;q=0.8, */*;q=0.5
{
    "servicepack_id" : "13252"
    "identifier" : "myhosting.be"
    "password" : "test123!"
}

Example response

HTTP/1.1 202 ACCEPTED
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Mar 2016 20:11:05 GMT
Check-After: 60
Location: /hostingaccounts/myhosting.be