From: Aki Tuomi Date: Tue, 30 Jun 2015 06:20:58 +0000 (+0300) Subject: Add documentation for directBackendCmd X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~77^2~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a9ca8ecd43e6166e00f8ddc4a4fa162915302fb;p=pdns Add documentation for directBackendCmd --- diff --git a/docs/markdown/authoritative/backend-remote.md b/docs/markdown/authoritative/backend-remote.md index 25c679513..01c1d2ee8 100644 --- a/docs/markdown/authoritative/backend-remote.md +++ b/docs/markdown/authoritative/backend-remote.md @@ -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: