Download OpenAPI specification:Download
ZoneID APIv2 is JSON based RESTful API for managing Domain, Webhosting, Cloudserver VPS and DNS services.
HTTP basic auth is used for authentication:
Use following header:
Authorization: Basic base64(zoneid_username:zoneid_api_token)
URLs are built as:
https://api.zone.eu/v2/{service_type}/{service_name}/{resource_name*}/{resource_identificator*}
Where
{service_type} is
{service_name} is
Additional child endpoints may follow as /{child}/{child_identificator*}
* optional
For example to get single DNS A record, we use following url:
https://api.zone.eu/v2/dns/example.com/a/1
or to get all DNS A Records, we use following url:
https://api.zone.eu/v2/dns/example.com/a
There is exception for service ordering endpoints where path is build as:
https://api.zone.eu/v2/order/{service_type}
Request types are divided into 4 separate HTTP codes.
Code | Description |
---|---|
GET | Access one or more resource. All resources are returned in array. Single resources are returned as single array element. When accessing single resourse, then URL must end with giver resource identificator |
POST | Create new resource. Resouce data in JSON structure should be sent in request body. Generated resource is returned in response as single array element. |
PUT | Update existing resource. URL must contain given resource identificator of resource that is updated. Otherwise same as POST request |
DELETE | Delete existing resource. URL must contain given resource identificator. |
Standard HTTP status codes are used to give feedback about operation. In addition, human readable response message is sent in header X-Status-Message. Using response message in your scripts is not recommended as these may change without warning. Descriptions of all HTTP standard status codes are here. Most commonly used in ZoneID API are:
Code | Description |
---|---|
200 | successful GET request |
201 | successful POST/PUT request |
202 | successful POST/PUT request in case request was accepted, but will be processed later (for example ordering new services) |
204 | successful DELETE request |
422 | unsuccessful request in case resource in request has validation errors. Error codes in response are in same structure as resource itself. |
400 | unsuccessful request in case request itself is invalid |
402 | unsuccessful request in case payment is required for further actions. Mostly used when package upgrade is required. |
The number of request is limited to 60 per minute per IP.
Rate limit information is contained in every response headers.
If you have reached the rate limit, then HTTP response code 429 is returned
Don't create requests without need. Don't update resources that are not modified and don't ask for data that you already know.
For example when writing custom dynamic DNS style script for DNS A record, then.
On some GET endpoints we have enabled pagination. In that case there is header x-pager-enabled is sent in response.
Response headers describing pager:
Header | Description |
---|---|
x-pager-enabled | 1 when pager is enabled |
x-pager-page | Current page number |
x-pager-pages | Total number of pages |
x-pag |