Update JSON in howtos examples to match the API
Some of the howto examples haven't been updated to match the removal of wrapping resources in the API, this fixes that Change-Id: I84a349e2848329a63f84b6073ba65ac5fd56877c
This commit is contained in:
parent
ed816e366a
commit
fc2f733cb5
@ -89,13 +89,11 @@ reverse lookup.
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"name": "example.org.",
|
"name": "example.org.",
|
||||||
"email": "admin@example.org",
|
"email": "admin@example.org",
|
||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"description": "A great example zone"
|
"description": "A great example zone"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Here is the JSON response describing the new zone.
|
Here is the JSON response describing the new zone.
|
||||||
@ -111,7 +109,6 @@ Here is the JSON response describing the new zone.
|
|||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"email": "admin@example.org",
|
"email": "admin@example.org",
|
||||||
"project_id": "noauth-project",
|
"project_id": "noauth-project",
|
||||||
"action": "CREATE",
|
"action": "CREATE",
|
||||||
@ -129,7 +126,6 @@ Here is the JSON response describing the new zone.
|
|||||||
"description": "A great example zone",
|
"description": "A great example zone",
|
||||||
"status": "PENDING"
|
"status": "PENDING"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The `status` is `PENDING`. If we make a `GET` request to
|
The `status` is `PENDING`. If we make a `GET` request to
|
||||||
@ -150,13 +146,11 @@ name when we do a reverse look up.
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"name": "11.2.0.192.in-addr.arpa.",
|
"name": "11.2.0.192.in-addr.arpa.",
|
||||||
"email": "admin@example.org",
|
"email": "admin@example.org",
|
||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"description": "A in-addr.arpa. zone for reverse lookups."
|
"description": "A in-addr.arpa. zone for reverse lookups."
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
As you can see, in the `name` field we've reversed our IP address and
|
As you can see, in the `name` field we've reversed our IP address and
|
||||||
used that as a subdomain in the `in-addr.arpa.` zone.
|
used that as a subdomain in the `in-addr.arpa.` zone.
|
||||||
@ -174,7 +168,6 @@ Here is the response.
|
|||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"email": "admin@example.org",
|
"email": "admin@example.org",
|
||||||
"project_id": "noauth-project",
|
"project_id": "noauth-project",
|
||||||
"action": "CREATE",
|
"action": "CREATE",
|
||||||
@ -192,7 +185,6 @@ Here is the response.
|
|||||||
"description": "A in-addr.arpa. zone for reverse lookups.",
|
"description": "A in-addr.arpa. zone for reverse lookups.",
|
||||||
"status": "PENDING"
|
"status": "PENDING"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Now that we have our `in-addr.arpa.` zone, we add a new `PTR` record
|
Now that we have our `in-addr.arpa.` zone, we add a new `PTR` record
|
||||||
to the zone.
|
to the zone.
|
||||||
@ -204,7 +196,6 @@ to the zone.
|
|||||||
Accept: application/json
|
Accept: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"recordset": {
|
|
||||||
"name": "11.2.0.192.in-addr.arpa.",
|
"name": "11.2.0.192.in-addr.arpa.",
|
||||||
"description": "A PTR recordset",
|
"description": "A PTR recordset",
|
||||||
"type": "PTR",
|
"type": "PTR",
|
||||||
@ -213,7 +204,6 @@ to the zone.
|
|||||||
"example.org."
|
"example.org."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Here is the response.
|
Here is the response.
|
||||||
|
|
||||||
@ -228,7 +218,6 @@ Here is the response.
|
|||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
|
|
||||||
{
|
{
|
||||||
"recordset": {
|
|
||||||
"type": "PTR",
|
"type": "PTR",
|
||||||
"action": "CREATE",
|
"action": "CREATE",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
@ -247,7 +236,6 @@ Here is the response.
|
|||||||
"description": "A PTR recordset",
|
"description": "A PTR recordset",
|
||||||
"status": "PENDING"
|
"status": "PENDING"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
We should now have a correct `PTR` record assigned in our nameserver
|
We should now have a correct `PTR` record assigned in our nameserver
|
||||||
that we can test.
|
that we can test.
|
||||||
@ -305,12 +293,10 @@ ensure *any* IP in a subnet resolves to a specific domain.
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"name": "2.0.192.in-addr.arpa.",
|
"name": "2.0.192.in-addr.arpa.",
|
||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"email": "admin@example.com"
|
"email": "admin@example.com"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
We then could use the corresponding domain to create a `PTR` record
|
We then could use the corresponding domain to create a `PTR` record
|
||||||
for a specific IP.
|
for a specific IP.
|
||||||
@ -322,7 +308,6 @@ for a specific IP.
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"recordset": {
|
|
||||||
"name": "3.2.0.192.in-addr.arpa.",
|
"name": "3.2.0.192.in-addr.arpa.",
|
||||||
"type": "PTR"
|
"type": "PTR"
|
||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
@ -330,7 +315,6 @@ for a specific IP.
|
|||||||
"cats.example.com."
|
"cats.example.com."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
When we do our reverse look, we should see `cats.example.com.`
|
When we do our reverse look, we should see `cats.example.com.`
|
||||||
|
|
||||||
|
@ -207,13 +207,11 @@ Defintion of values:
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"name": "example.com.",
|
"name": "example.com.",
|
||||||
"type": "SECONDARY",
|
"type": "SECONDARY",
|
||||||
"masters": ["192.168.27.100"],
|
"masters": ["192.168.27.100"],
|
||||||
"description": "This is a slave for example.com."
|
"description": "This is a slave for example.com."
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
**Example response:**
|
**Example response:**
|
||||||
|
|
||||||
@ -223,7 +221,6 @@ Defintion of values:
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||||
@ -243,7 +240,6 @@ Defintion of values:
|
|||||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Get Zone
|
Get Zone
|
||||||
@ -272,7 +268,6 @@ Get Zone
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||||
@ -292,7 +287,6 @@ Get Zone
|
|||||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
:statuscode 200: Success
|
:statuscode 200: Success
|
||||||
:statuscode 401: Access Denied
|
:statuscode 401: Access Denied
|
||||||
@ -333,7 +327,7 @@ List Secondary Zones
|
|||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"serial": 1404757531,
|
"serial": 1404757531,
|
||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"description": "This is a slave for example.com."
|
"description": "This is a slave for example.com.",
|
||||||
"masters": ["192.168.27.100"],
|
"masters": ["192.168.27.100"],
|
||||||
"type": "SECONDARY",
|
"type": "SECONDARY",
|
||||||
"transferred_at": null,
|
"transferred_at": null,
|
||||||
@ -343,7 +337,6 @@ List Secondary Zones
|
|||||||
"links": {
|
"links": {
|
||||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca4",
|
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca4",
|
||||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||||
@ -353,10 +346,10 @@ List Secondary Zones
|
|||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"serial": 10,
|
"serial": 10,
|
||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"description": "This is a slave for bar.io."
|
"description": "This is a slave for bar.io.",
|
||||||
"masters": ["192.168.27.100"],
|
"masters": ["192.168.27.100"],
|
||||||
"type": "SECONDARY",
|
"type": "SECONDARY",
|
||||||
"transferred_at": 2014-07-07T18:25:35.275934,
|
"transferred_at": "2014-07-07T18:25:35.275934",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"created_at": "2014-07-07T18:25:31.275934",
|
"created_at": "2014-07-07T18:25:31.275934",
|
||||||
"updated_at": null,
|
"updated_at": null,
|
||||||
@ -391,10 +384,8 @@ Update Zone
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"masters": ["192.168.27.101"]
|
"masters": ["192.168.27.101"]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|
||||||
@ -404,7 +395,6 @@ Update Zone
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"zone": {
|
|
||||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||||
@ -413,18 +403,17 @@ Update Zone
|
|||||||
"ttl": 3600,
|
"ttl": 3600,
|
||||||
"serial": 1404757531,
|
"serial": 1404757531,
|
||||||
"status": "ACTIVE",
|
"status": "ACTIVE",
|
||||||
"description": "This is a slave for example.com."
|
"description": "This is a slave for example.com.",
|
||||||
"masters": ["192.168.27.101"],
|
"masters": ["192.168.27.101"],
|
||||||
"type": "SECONDARY",
|
"type": "SECONDARY",
|
||||||
"transferred_at": null,
|
"transferred_at": null,
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"created_at": "2014-07-07T18:25:31.275934",
|
"created_at": "2014-07-07T18:25:31.275934",
|
||||||
"updated_at": 2014-07-07T18:25:34.275934,
|
"updated_at": "2014-07-07T18:25:34.275934",
|
||||||
"links": {
|
"links": {
|
||||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
:form description: UTF-8 text field.
|
:form description: UTF-8 text field.
|
||||||
:form name: Valid zone name (Immutable).
|
:form name: Valid zone name (Immutable).
|
||||||
|
Loading…
Reference in New Issue
Block a user