Servers

Server entries are used to generate NS records for zones..

TODO: More detail.

TODO: Server Groups Concept.

Create Server

POST /servers

Create a DNS server

Example request:

POST /servers HTTP/1.1
Host: example.com
Accept: application/json
Content-Type: application/json

{
  "name": "ns1.example.org."
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
  "id": "384a9b20-239c-11e2-81c1-0800200c9a66",
  "name": "ns1.example.org.",
  "created_at": "2011-01-21T11:33:21Z",
  "updated_at": null
}
Form Parameters:
 
  • name – Server hostname
Status Codes:

Get Server

GET /servers/(uuid: server_id)

Lists all configured DNS servers

Example request:

GET /servers/384a9b20-239c-11e2-81c1-0800200c9a66 HTTP/1.1
Host: example.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
  "id": "384a9b20-239c-11e2-81c1-0800200c9a66",
  "name": "ns1.example.org.",
  "created_at": "2011-01-21T11:33:21Z",
  "updated_at": null
}
Parameters:
  • server_id (uuid) – The server’s unique id
Form Parameters:
 
  • name – Server hostname
  • created_at – timestamp
  • updated_at – timestamp
Status Codes:

Update Server

PUT /servers/(uuid: server_id)

Create a DNS server

Example request:

PUT /servers/879c1100-9c92-4244-bc83-9535ee6534d0 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Type: application/json

{
  "name": "ns1.example.org."
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

{
  "id": "879c1100-9c92-4244-bc83-9535ee6534d0",
  "name": "ns1.example.org.",
  "created_at": "2012-11-02T02:55:44.000000",
  "updated_at": "2012-11-02T02:58:41.993556"
}
Form Parameters:
 
  • id – UUID server_id
  • name – Server hostname
  • created_at – timestamp
  • updated_at – timestamp
Status Codes:

List Servers

GET /servers

Lists all configured DNS servers

Example request:

GET /servers HTTP/1.1
Host: example.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
    "id": "384a9b20-239c-11e2-81c1-0800200c9a66",
    "name": "ns1.example.org.",
    "created_at": "2011-01-21T11:33:21Z",
    "updated_at": null
  },
  {
    "id": "cf661142-e577-40b5-b3eb-75795cdc0cd7",
    "name": "ns2.example.org.",
    "created_at": "2011-01-21T11:33:21Z",
    "updated_at": "2011-01-21T11:33:21Z"
  }
]
Form Parameters:
 
  • id – UUID server_id
  • name – Server hostname
  • created_at – timestamp
  • updated_at – timestamp
Status Codes:

Delete Server

DELETE /servers/(uuid: server_id)
Deletes a specified server

Example request:

DELETE /servers/5d1d7879-b778-4f77-bb95-02f4a5a224d8 HTTP/1.1
Host: example.com

Example response

   HTTP/1.1 200 OK
   Content-Type: text/html; charset=utf-8
   Content-Length: 0
   Date: Thu, 01 Nov 2012 10:00:00 GMT

:statuscode 200: Success
:statuscode 401: Access Denied
:statuscode 404: Not Found