Tld (Top level domain) entries are used to manage the Tlds that Designate recognizes. By default, only an admin can manage these entries. The Tlds are stored in the Database/Storage in the table tlds and are not propagated to the DNS Backend. By default when Designate starts up there are no Tlds in the database.
When there are no Tld entries in the database, Tld checks are not enforced and any domain/zone name can be created, as long as it adheres to the domain name schema. When there are Tlds present in the database, then when a domain/zone is created the name has to pass the following checks.
Create a tld. name is the only entry that is required. The name should not end in a period (.).
Example request:
POST /tlds HTTP/1.1
Host: example.com
Accept: application/json
Content-Type: application/json
{
"name" : "com",
"description" : "Tld source http://data.iana.org/TLD/tlds-alpha-by-domain.txt"
}
Example response:
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://127.0.0.1:9001/v2/tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9
{
"description":"Tld source http://data.iana.org/TLD/tlds-alpha-by-domain.txt",
"links":{
"self":"http://127.0.0.1:9001/v2/tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9"
},
"created_at":"2014-01-23T18:39:26.710827",
"updated_at":null,
"id":"5abe514c-9fb5-41e8-ab73-5ed25f8a73e9",
"name":"com"
}
Form Parameters: | |
---|---|
|
|
Status Codes: |
|
Lists a particular Tld
Example request:
GET /tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9 HTTP/1.1
Host: example.com
Accept: application/json
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"description":"Tld source http://data.iana.org/TLD/tlds-alpha-by-domain.txt",
"links":{
"self":"http://127.0.0.1:9001/v2/tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9"
},
"created_at":"2014-01-23T18:39:26.710827",
"updated_at":null,
"id":"5abe514c-9fb5-41e8-ab73-5ed25f8a73e9",
"name":"com"
}
Form Parameters: | |
---|---|
|
|
Status Codes: |
|
Lists all tlds
Example request:
GET /tlds HTTP/1.1
Host: example.com
Accept: application/json
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"tlds":[
{
"description":"Tld source http://data.iana.org/TLD/tlds-alpha-by-domain.txt",
"links":{
"self":"http://127.0.0.1:9001/v2/tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9"
},
"created_at":"2014-01-23T18:39:26.710827",
"updated_at":null,
"id":"5abe514c-9fb5-41e8-ab73-5ed25f8a73e9",
"name":"com"
},
{
"description":"Tld source http://data.iana.org/TLD/tlds-alpha-by-domain.txt",
"links":{
"self":"http://127.0.0.1:9001/v2/tlds/46e50ebc-1b51-41ee-bc1f-8e75a470c5be"
},
"created_at":"2014-01-23T19:59:53.985455",
"updated_at":null,
"id":"46e50ebc-1b51-41ee-bc1f-8e75a470c5be",
"name":"net"
}
],
"links":{
"self":"http://127.0.0.1:9001/v2/tlds"
}
}
Form Parameters: | |
---|---|
|
|
Status Codes: |
|
updates a tld
Example request:
PATCH /tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9 HTTP/1.1
Host: example.com
Accept: application/json
Content-Type: application/json
{
"name" : "org",
"description" : "Updated the name from com to org"
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"description":"Updated the name from com to org",
"links":{
"self":"http://127.0.0.1:9001/v2/tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9"
},
"created_at":"2014-01-23T18:39:26.710827",
"updated_at":"2014-01-23T20:35:12.449599",
"id":"5abe514c-9fb5-41e8-ab73-5ed25f8a73e9",
"name":"org"
}
Form Parameters: | |
---|---|
|
|
Status Codes: |
|
delete a tld
Example request:
DELETE /tlds/5abe514c-9fb5-41e8-ab73-5ed25f8a73e9 HTTP/1.1
Host: example.com
Example response:
HTTP/1.1 204 No Content
Content-Type: application/json; charset=UTF-8
Content-Length: 0
Status Codes: |
|
---|