From: Aki Tuomi Date: Sat, 1 Aug 2015 05:34:03 +0000 (+0300) Subject: Update remotebackend documentation X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d77e867c849d4d9b9e8833a86c6e56b607bfe630;p=pdns Update remotebackend documentation --- diff --git a/docs/markdown/authoritative/backend-remote.md b/docs/markdown/authoritative/backend-remote.md index 01c1d2ee8..cf0ef3517 100644 --- a/docs/markdown/authoritative/backend-remote.md +++ b/docs/markdown/authoritative/backend-remote.md @@ -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: