Domains¶
Domain entries are used to generate zones containing RR
TODO: More detail.
Create Domain¶
-
POST
/domains
¶ Create a domain
Example request:
POST /domains HTTP/1.1 Host: example.com Accept: application/json Content-Type: application/json { "name": "domain1.com.", "ttl": 3600, "email": "nsadmin@example.org" }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "89acac79-38e7-497d-807c-a011e1310438", "name": "domain1.com.", "ttl": 3600, "serial": 1351800588, "email": "nsadmin@example.org", "created_at": "2012-11-01T20:09:48.094457", "updated_at": null, "description": null }
Form Parameters: - created_at – timestamp
- updated_at – timestamp
- name – domain name
- id – uuid
- ttl – time-to-live numeric value in seconds
- serial – numeric seconds
- email – email address
- description – UTF-8 text field
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 400 Bad Request – Invalid Object
- 409 Conflict – Duplicate Domain
Get a Domain¶
-
GET
/domains/
(uuid: id)¶ Lists a particular domain
Example request:
GET /domains/09494b72-b65b-4297-9efb-187f65a0553e HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "id": "09494b72-b65b-4297-9efb-187f65a0553e", "name": "domain1.com.", "ttl": 3600, "serial": 1351800668, "email": "nsadmin@example.org", "created_at": "2012-11-01T20:11:08.000000", "updated_at": null, "description": null }
Form Parameters: - created_at – timestamp
- updated_at – timestamp
- name – domain name
- id – uuid
- ttl – time-to-live numeric value in seconds
- serial – numeric seconds
- email – email address
- description – UTF-8 text field
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
Update a Domain¶
-
PUT
/domains/
(uuid: id)¶ updates a domain
Example request:
PUT /domains/09494b72-b65b-4297-9efb-187f65a0553e HTTP/1.1 Host: example.com Accept: application/json Content-Type: application/json { "name": "domainnamex.com", "ttl": 7200, "email": "nsadmin@example.org" }
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json Content-Length: 422 Date: Fri, 02 Nov 2012 01:06:19 GMT { "id": "09494b72-b65b-4297-9efb-187f65a0553e", "name": "domain1.com.", "email": "nsadmin@example.org", "ttl": 7200, "serial": 1351818367, "created_at": "2012-11-02T00:58:42.000000", "updated_at": "2012-11-02T01:06:07.000000", "description": null }
Form Parameters: - created_at – timestamp
- updated_at – timestamp
- name – domain name
- id – uuid
- ttl – time-to-live numeric value in seconds
- serial – numeric seconds
- email – email address
- description – UTF-8 text field
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 400 Bad Request – Invalid Object
- 400 Bad Request – Domain not found
- 409 Conflict – Duplicate Domain
Delete a Domain¶
-
DELETE
/domains/
(uuid: id)¶ delete a domain
Example request:
DELETE /domains/09494b72-b65b-4297-9efb-187f65a0553e HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Content-Length: 0 Date: Fri, 02 Nov 2012 01:26:06 GMT
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 400 Bad Request – Invalid Object
- 404 Not Found – Domain not found
Get Servers Hosting a Domain¶
-
GET
/domains/
(uuid: id)/servers
¶ Lists the nameservers hosting a particular domain
Example request:
GET /domains/09494b72-b65b-4297-9efb-187f65a0553e/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.provider.com.", "created_at": "2011-01-21T11:33:21Z", "updated_at": null }, { "id": "cf661142-e577-40b5-b3eb-75795cdc0cd7", "name": "ns2.provider.com.", "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: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 404 Not Found – Domain Not Found
List Domains¶
-
GET
/domains
¶ Lists all domains
Example request:
GET /domains HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "domains": [ { "name": "domain1.com.", "created_at": "2012-11-01T20:11:08.000000", "email": "nsadmin@example.org", "ttl": 3600, "serial": 1351800668, "id": "09494b72-b65b-4297-9efb-187f65a0553e" }, { "name": "domain2.com.", "created_at": "2012-11-01T20:09:48.000000", "email": "nsadmin@example.org", "ttl": 3600, "serial": 1351800588, "id": "89acac79-38e7-497d-807c-a011e1310438" } ] }
Form Parameters: - name – domain name
- created_at – timestamp
- email – email address
- ttl – time-to-live numeric value in seconds
- serial – numeric seconds
Parameters: - id (uuid) – Domain ID
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied