DNS zone management resources:
Record management resources:
Available parameters:
page
(int, not required)pagesize
(int, not required)Example of usage: add ?page=1&pagesize=20
to the end of the address. Default page size is unlimited.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone" -v -u key:signature -H "Date: request_date_time"
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone
Request
GET https://rest.websupport.sk/v1/user/:id/zone HTTP/1.1 Accept: application/json
Response
200
{ "items": [ { "id": 1, "name": "scaledo.com" }, { "id": 2, "name": "scaledo.co" }, ], "pager": { "page": 1, "pagesize": null, "items": 2 } }
Get a zone detail by its domain name.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name" -v -u key:signature -H "Date: request_date_time"
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name
Request
GET https://rest.websupport.sk/v1/user/:id/zone/:domain_name HTTP/1.1 Accept: application/json
Response
200
{ "id": 1, "name": "scaledo.com", "updateTime": 1381169608 }
Response
404
{ "code": 404, "message": "Zone not found" }
Available parameters:
page
(int, not required)pagesize
(int, not required)Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record" -v -u key:signature -H "Date: request_date_time"
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name/record
Request
GET https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record HTTP/1.1 Accept: application/json
Response
200
{ "items": [ { "id": 1, "type": "A", "name": "@", "content": "37.9.169.99", "ttl": 600, "prio": null, "weight": null, "port": null }, { "id": 2, "type": "NS", "name": "@", "content": "ns1.scaledo.com", "ttl": 600, "prio": null, "weight": null, "port": null } ], "pager": { "page": 1, "pagesize": null, "items": 2 } }
Response
404
{ "code": 404, "message": "Zone not found" }
Get a record detail by domain name and record id.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id" -v -u key:signature -H "Date: request_date_time"
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name/record
Request
GET https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id HTTP/1.1 Accept: application/json
Response
200
{ "id": 1, "type": "A", "name": "@", "content": "37.9.169.99", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 399, "name": "scaledo.com", "updateTime": 1381169608 } }
Response
404
{ "code": 404, "message": "Record not found" }
Supported record types are A
, AAAA
, MX
, ANAME
, CNAME
, NS
, TXT
and SRV
.
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: A |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | IPv4 address in dotted decimal format, i.e. 1.2.3.4 |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: AAAA |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | IPv6 address ex. 2001:db8::3 |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: MX |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | domain name of mail servers, i.e. mail1.scaledo.com |
prio | int | yes | record priority |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: ANAME |
name | string | yes | value: @ or empty string |
content | string | yes | the canonical hostname something.scaledo.com |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: CNAME |
name | string | yes | subdomain name |
content | string | yes | the canonical hostname something.scaledo.com |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: NS |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | the canonical hostname of the DNS server, i.e. ns1.scaledo.com |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: TXT |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | text used for DKIM or other purposes |
ttl | int | no | time to live, default 600 |
Name | Type | Required | Comment |
---|---|---|---|
type | string | yes | value: TXT |
name | string | yes | subdomain name or @ if you don't want subdomain |
content | string | yes | the canonical hostname of the machine providing the service |
prio | int | yes | record priority |
port | int | yes | the TCP or UDP port on which the service is to be found |
weight | int | yes | a relative weight for records with the same priority |
ttl | int | no | time to live, default 600 |
*all changes are immediately reflected to our DNS servers, but records can be cached for a few minutes in your computer or in other DNS servers.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record" -H "Content-Type: application/json" -H "Date: request_date_time" \ -X POST -d '{"type":"A","name":"@","content": "1.2.3.4","ttl": 600}' -u key:signature
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name/record
Request
POST https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record HTTP/1.1 Accept: application/json Content-Type: application/json { "type":"A", "name":"@", "content": "1.2.3.4", "ttl": 600 }
Response
201
(success)
{ "status": "success", "item": { "id": 4, "type": "A", "name": "@", "content": "1.2.3.4", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 1, "name": "scaledo.com", "updateTime": 1381169608 } }, "errors": [] }
Response
400
(validation error)
{ "status": "error", "item": { "id": null, "type": "A", "name": "something bad !@#$%^&*(", "content": "123.456.789.123", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 1, "name": "scaledo.com", "updateTime": 1381169608 } }, "errors": { "content": [ "Wrong IP address format" ], "name": [ "Invalid input." ] } }
Response
404
{ "code": 404, "message": "Zone not found" }
The field type
is not allowed here. You can't change the record type. All parameters are optional. Please refer to the Create a new record resource for more parameter info.
*all changes are immediately reflected to our DNS servers, but records can be cached for a few minutes in your computer or other DNS servers.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id" -H "Content-Type: application/json" -H "Date: request_date_time" \ -X PUT -d '{"name":"@","content": "1.2.3.4","ttl": 600}' -u key:signature
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name/record/:id
Request
PUT https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id HTTP/1.1 Accept: application/json Content-Type: application/json { "name":"@", "content": "1.2.3.4", "ttl": 600 }
Response
200
(success)
{ "status": "success", "item": { "id": 4, "type": "A", "name": "@", "content": "1.2.3.4", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 1, "name": "scaledo.com", "updateTime": 1381169608 } }, "errors": [] }
Response
400
(validation error)
{ "status": "error", "item": { "id": null, "type": "A", "name": "something bad !@#$%^&*(", "content": "123.456.789.123", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 1, "name": "scaledo.com", "updateTime": 1381169608 } }, "errors": { "content": [ "Wrong IP address format" ], "name": [ "Invalid input." ] } }
Response
404
{ "code": 404, "message": "Zone not found" }
No parameters required.
*all changes are immediately reflected to our DNS servers, but records can be cached for a few minutes in your computer or other DNS servers.
Curl
curl "https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id" -X DELETE -u key:signature -H "Date: request_date_time"
*if you don't know user ID of currently logged user, you can use string "self", i.e.: https://rest.websupport.sk/v1/user/self/zone/:domain_name/record/:id
Request
DELETE https://rest.websupport.sk/v1/user/:id/zone/:domain_name/record/:id HTTP/1.1 Accept: application/json
Response
200
{ "status": "success", "item": { "id": 1, "type": "A", "name": "@", "content": "1.2.3.4", "ttl": 600, "prio": null, "weight": null, "port": null, "zone": { "id": 1, "name": "scaledo.com", "updateTime": 1381316081 } }, "errors": [] }
Response
404
{ "code": 404, "message": "Record not found" }