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,12 +89,10 @@ reverse lookup.
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"name": "example.org.",
|
||||
"email": "admin@example.org",
|
||||
"ttl": 3600,
|
||||
"description": "A great example zone"
|
||||
}
|
||||
"name": "example.org.",
|
||||
"email": "admin@example.org",
|
||||
"ttl": 3600,
|
||||
"description": "A great example zone"
|
||||
}
|
||||
|
||||
|
||||
@ -111,24 +109,22 @@ Here is the JSON response describing the new zone.
|
||||
Connection: keep-alive
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"email": "admin@example.org",
|
||||
"project_id": "noauth-project",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
|
||||
"created_at": "2015-02-20T21:20:28.000000",
|
||||
"name": "example.org.",
|
||||
"id": "fe078042-0aa3-4500-a81e-8f328f79bf75",
|
||||
"serial": 1424467228,
|
||||
"ttl": 3600,
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/fe078042-0aa3-4500-a81e-8f328f79bf75"
|
||||
},
|
||||
"description": "A great example zone",
|
||||
"status": "PENDING"
|
||||
}
|
||||
"email": "admin@example.org",
|
||||
"project_id": "noauth-project",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
|
||||
"created_at": "2015-02-20T21:20:28.000000",
|
||||
"name": "example.org.",
|
||||
"id": "fe078042-0aa3-4500-a81e-8f328f79bf75",
|
||||
"serial": 1424467228,
|
||||
"ttl": 3600,
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/fe078042-0aa3-4500-a81e-8f328f79bf75"
|
||||
},
|
||||
"description": "A great example zone",
|
||||
"status": "PENDING"
|
||||
}
|
||||
|
||||
.. note::
|
||||
@ -150,12 +146,10 @@ name when we do a reverse look up.
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"email": "admin@example.org",
|
||||
"ttl": 3600,
|
||||
"description": "A in-addr.arpa. zone for reverse lookups."
|
||||
}
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"email": "admin@example.org",
|
||||
"ttl": 3600,
|
||||
"description": "A in-addr.arpa. zone for reverse lookups."
|
||||
}
|
||||
|
||||
As you can see, in the `name` field we've reversed our IP address and
|
||||
@ -174,24 +168,22 @@ Here is the response.
|
||||
Connection: keep-alive
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"email": "admin@example.org",
|
||||
"project_id": "noauth-project",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
|
||||
"created_at": "2015-02-20T21:35:41.000000",
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"id": "1bed5d24-d487-4410-b813-f1c637db0ba3",
|
||||
"serial": 1424468141,
|
||||
"ttl": 3600,
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/1bed5d24-d487-4410-b813-f1c637db0ba3"
|
||||
},
|
||||
"description": "A in-addr.arpa. zone for reverse lookups.",
|
||||
"status": "PENDING"
|
||||
}
|
||||
"email": "admin@example.org",
|
||||
"project_id": "noauth-project",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"pool_id": "794ccc2c-d751-44fe-b57f-8894c9f5c842",
|
||||
"created_at": "2015-02-20T21:35:41.000000",
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"id": "1bed5d24-d487-4410-b813-f1c637db0ba3",
|
||||
"serial": 1424468141,
|
||||
"ttl": 3600,
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/1bed5d24-d487-4410-b813-f1c637db0ba3"
|
||||
},
|
||||
"description": "A in-addr.arpa. zone for reverse lookups.",
|
||||
"status": "PENDING"
|
||||
}
|
||||
|
||||
Now that we have our `in-addr.arpa.` zone, we add a new `PTR` record
|
||||
@ -204,15 +196,13 @@ to the zone.
|
||||
Accept: application/json
|
||||
|
||||
{
|
||||
"recordset": {
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"description": "A PTR recordset",
|
||||
"type": "PTR",
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"example.org."
|
||||
]
|
||||
}
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"description": "A PTR recordset",
|
||||
"type": "PTR",
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"example.org."
|
||||
]
|
||||
}
|
||||
|
||||
Here is the response.
|
||||
@ -228,25 +218,23 @@ Here is the response.
|
||||
Connection: keep-alive
|
||||
|
||||
{
|
||||
"recordset": {
|
||||
"type": "PTR",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"created_at": "2015-02-20T21:42:45.000000",
|
||||
"zone_id": "1bed5d24-d487-4410-b813-f1c637db0ba3",
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"id": "a3dca24e-3eba-4523-8607-c0ad4b9a9272",
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"example.org."
|
||||
],
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/1bed5d24-d487-4410-b813-f1c637db0ba3/recordsets/a3dca24e-3eba-4523-8607-c0ad4b9a9272"
|
||||
},
|
||||
"description": "A PTR recordset",
|
||||
"status": "PENDING"
|
||||
}
|
||||
"type": "PTR",
|
||||
"action": "CREATE",
|
||||
"version": 1,
|
||||
"created_at": "2015-02-20T21:42:45.000000",
|
||||
"zone_id": "1bed5d24-d487-4410-b813-f1c637db0ba3",
|
||||
"name": "11.2.0.192.in-addr.arpa.",
|
||||
"id": "a3dca24e-3eba-4523-8607-c0ad4b9a9272",
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"example.org."
|
||||
],
|
||||
"updated_at": null,
|
||||
"links": {
|
||||
"self": "http://127.0.0.1:9001/v2/zones/1bed5d24-d487-4410-b813-f1c637db0ba3/recordsets/a3dca24e-3eba-4523-8607-c0ad4b9a9272"
|
||||
},
|
||||
"description": "A PTR recordset",
|
||||
"status": "PENDING"
|
||||
}
|
||||
|
||||
We should now have a correct `PTR` record assigned in our nameserver
|
||||
@ -305,11 +293,9 @@ ensure *any* IP in a subnet resolves to a specific domain.
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"name": "2.0.192.in-addr.arpa.",
|
||||
"ttl": 3600,
|
||||
"email": "admin@example.com"
|
||||
}
|
||||
"name": "2.0.192.in-addr.arpa.",
|
||||
"ttl": 3600,
|
||||
"email": "admin@example.com"
|
||||
}
|
||||
|
||||
We then could use the corresponding domain to create a `PTR` record
|
||||
@ -322,14 +308,12 @@ for a specific IP.
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"recordset": {
|
||||
"name": "3.2.0.192.in-addr.arpa.",
|
||||
"type": "PTR"
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"cats.example.com."
|
||||
]
|
||||
}
|
||||
"name": "3.2.0.192.in-addr.arpa.",
|
||||
"type": "PTR"
|
||||
"ttl": 3600,
|
||||
"records": [
|
||||
"cats.example.com."
|
||||
]
|
||||
}
|
||||
|
||||
When we do our reverse look, we should see `cats.example.com.`
|
||||
|
@ -207,12 +207,10 @@ Defintion of values:
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"name": "example.com.",
|
||||
"type": "SECONDARY",
|
||||
"masters": ["192.168.27.100"],
|
||||
"description": "This is a slave for example.com."
|
||||
}
|
||||
}
|
||||
|
||||
**Example response:**
|
||||
@ -223,7 +221,6 @@ Defintion of values:
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||
@ -242,7 +239,6 @@ Defintion of values:
|
||||
"links": {
|
||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -272,7 +268,6 @@ Get Zone
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||
@ -291,7 +286,6 @@ Get Zone
|
||||
"links": {
|
||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:statuscode 200: Success
|
||||
@ -333,7 +327,7 @@ List Secondary Zones
|
||||
"ttl": 3600,
|
||||
"serial": 1404757531,
|
||||
"status": "ACTIVE",
|
||||
"description": "This is a slave for example.com."
|
||||
"description": "This is a slave for example.com.",
|
||||
"masters": ["192.168.27.100"],
|
||||
"type": "SECONDARY",
|
||||
"transferred_at": null,
|
||||
@ -343,7 +337,6 @@ List Secondary Zones
|
||||
"links": {
|
||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca4",
|
||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||
@ -353,10 +346,10 @@ List Secondary Zones
|
||||
"ttl": 3600,
|
||||
"serial": 10,
|
||||
"status": "ACTIVE",
|
||||
"description": "This is a slave for bar.io."
|
||||
"description": "This is a slave for bar.io.",
|
||||
"masters": ["192.168.27.100"],
|
||||
"type": "SECONDARY",
|
||||
"transferred_at": 2014-07-07T18:25:35.275934,
|
||||
"transferred_at": "2014-07-07T18:25:35.275934",
|
||||
"version": 2,
|
||||
"created_at": "2014-07-07T18:25:31.275934",
|
||||
"updated_at": null,
|
||||
@ -391,9 +384,7 @@ Update Zone
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"masters": ["192.168.27.101"]
|
||||
}
|
||||
}
|
||||
|
||||
**Response:**
|
||||
@ -404,7 +395,6 @@ Update Zone
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"zone": {
|
||||
"id": "a86dba58-0043-4cc6-a1bb-69d5e86f3ca3",
|
||||
"pool_id": "572ba08c-d929-4c70-8e42-03824bb24ca2",
|
||||
"project_id": "4335d1f0-f793-11e2-b778-0800200c9a66",
|
||||
@ -413,17 +403,16 @@ Update Zone
|
||||
"ttl": 3600,
|
||||
"serial": 1404757531,
|
||||
"status": "ACTIVE",
|
||||
"description": "This is a slave for example.com."
|
||||
"description": "This is a slave for example.com.",
|
||||
"masters": ["192.168.27.101"],
|
||||
"type": "SECONDARY",
|
||||
"transferred_at": null,
|
||||
"version": 2,
|
||||
"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": {
|
||||
"self": "https://127.0.0.1:9001/v2/zones/a86dba58-0043-4cc6-a1bb-69d5e86f3ca3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:form description: UTF-8 text field.
|
||||
|
Loading…
Reference in New Issue
Block a user