]> granicus.if.org Git - pdns/commitdiff
API: Clarify record creation in example
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 26 Oct 2014 14:31:32 +0000 (15:31 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 26 Oct 2014 14:31:32 +0000 (15:31 +0100)
Also fix it to have required 'priority' field.

pdns/docs/httpapi/README.md

index 3694087dd1f531681dbad2292931331f487b3969..fd75cdf32f1d7328187287867251eef690c19254 100644 (file)
@@ -30,16 +30,16 @@ Then configure as follows:
 After restarting `pdns_server`, the following examples should start working:
 
     # List zones
-    curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones | jq .
+    curl -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones | jq .
     
     # Create new zone "example.org" with nameservers ns1.example.org, ns2.example.org
     curl -X POST --data '{"name":"example.org", "kind": "Native", "masters": [], "nameservers": ["ns1.example.org", "ns2.example.org"]}' -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones | jq .
     
     # Show the new zone
-    curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.org | jq .
+    curl -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.org | jq .
     
-    # Add a new record to the new zone
-    curl -X PATCH --data '{"rrsets": [ {"name": "test.example.org", "type": "A", "changetype": "REPLACE", "records": [ {"content": "1.1.1.1", "disabled": false,"name": "test.example.org", "ttl": 86400, "type": "A" } ] } ] }' -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.org | jq .
+    # Add a new record to the new zone (would replace any existing test.example.org/A records)
+    curl -X PATCH --data '{"rrsets": [ {"name": "test.example.org", "type": "A", "changetype": "REPLACE", "records": [ {"content": "1.1.1.1", "disabled": false, "name": "test.example.org", "ttl": 86400, "type": "A", "priority": 0 } ] } ] }' -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.org | jq .
 
 `jq` is a highly recommended tool for pretty-printing JSON. If you don't have
 `jq`, try `json_pp` or `python -mjson.tool` instead.