]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add documentation on searching data via the API
authorMark Schouten <mark@tuxis.nl>
Fri, 5 Aug 2016 13:13:30 +0000 (15:13 +0200)
committerMark Schouten <mark@tuxis.nl>
Fri, 5 Aug 2016 13:13:30 +0000 (15:13 +0200)
docs/markdown/httpapi/api_spec.md

index bdcb78cff14ee2d410cef853184cc922c9d447a2..cbca44ed31fba9ceebf2a4d8b1a4407d38e08668 100644 (file)
@@ -713,6 +713,51 @@ Returns all public data about cryptokeys, including `privatekey`.
 
 **TODO**: Not yet implemented.
 
+Data searching
+==============
+
+URL: /api/v1/servers/localhost/search-data?q=:search\_term&max=:max\_results
+---------------------------------------------------------------------------
+
+Allowed methods: `GET`
+
+#### GET
+
+Search the data inside PowerDNS for :search\_term and return at most
+:max\_results. This includes zones, records and comments. Responsebody is an
+array of one or more of the following objects:
+
+For a zone:
+
+    {
+      "name": "<zonename>",
+      "object_type": "zone",
+      "zone_id": "<zoneid>"
+    },
+
+For a record:
+
+    {
+      "content": "<content>",
+      "disabled": <bool>,
+      "name": "<name>",
+      "object_type": "record",
+      "ttl": <ttl>,
+      "type": "<type>",
+      "zone": "<zonename>,
+      "zone_id": "<zoneid>"
+    },
+
+For a comment:
+
+    {
+      "object_type": "comment",
+      "name": "<name>",
+      "content": "<content>"
+      "zone": "<zonename>,
+      "zone_id": "<zoneid>"
+    }
+
 Cache Access
 ============