]> granicus.if.org Git - pdns/commitdiff
Update remotebackend documentation
authorAki Tuomi <cmouse@desteem.org>
Sat, 1 Aug 2015 05:34:03 +0000 (08:34 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 4 Aug 2015 12:26:16 +0000 (15:26 +0300)
docs/markdown/authoritative/backend-remote.md

index 01c1d2ee81bbb4c4f6a1e6c84c62a4f8a042f94c..cf0ef351767fab52361f11a5256077d4bed94cf5 100644 (file)
@@ -1045,6 +1045,38 @@ Content-Type: text/javascript; charset=utf-8
 {"result":"PONG"}
 ```
 
+### `searchRecords`
+Can be used to search records from the backend. This is used by web api.
+
+* Mandatory: no
+* Parameters: pattern, maxResults
+* Reply: same as [lookup](#lookup) or false to indicate failed search
+
+#### Example JSON/RPC
+Query:
+```
+{"method":"searchRecords","parameters":{"pattern":"www.example*","maxResults":100}}
+```
+
+Response:
+```
+{"result":[{"qtype":"A", "qname":"www.example.com", "content":"203.0.113.2", "ttl": 60}]}
+```
+
+#### Example HTTP/RPC
+Query:
+```
+GET /dnsapi/searchRecords?q=www.example*&maxResults=100
+```
+
+Response:
+```
+HTTP/1.1 200 OK
+Content-Type: text/javascript; charset=utf-8
+
+{"result":[{"qtype":"A", "qname":"www.example.com", "content":"203.0.113.2", "ttl": 60}]}
+```
+
 # Examples
 ## Scenario: SOA lookup via pipe or unix connector
 Query: