]> granicus.if.org Git - pdns/commitdiff
Add documentation for directBackendCmd
authorAki Tuomi <cmouse@cmouse.fi>
Tue, 30 Jun 2015 06:20:58 +0000 (09:20 +0300)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Tue, 30 Jun 2015 12:40:09 +0000 (14:40 +0200)
docs/markdown/authoritative/backend-remote.md

index 25c679513fdb3f776d75f3cee78c63377a920ff6..01c1d2ee81bbb4c4f6a1e6c84c62a4f8a042f94c 100644 (file)
@@ -1009,6 +1009,42 @@ Content-Type: text/javascript; charset=utf-8
 {"result":2013060501}
 ```
 
+### `directBackendCmd`
+Can be used to send arbitrary commands to your backend using (backend-cmd)(dnssec.md#pdnssec).
+
+* Mandatory: no
+* Parameters: query
+* Reply: anything but boolean false for success, false for failure
+
+#### Example JSON/RPC
+Query:
+```
+{"method":"directBackendCmd","parameters":{"query":"PING"}}
+```
+
+Response:
+```
+{"result":"PONG"}
+```
+
+#### Example HTTP/RPC
+Query:
+```
+POST /dnsapi/directBackendCmd
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 10
+
+query=PING
+```
+
+Response:
+```
+HTTP/1.1 200 OK
+Content-Type: text/javascript; charset=utf-8
+
+{"result":"PONG"}
+```
+
 # Examples
 ## Scenario: SOA lookup via pipe or unix connector
 Query: