From: Mark Schouten Date: Fri, 5 Aug 2016 13:13:30 +0000 (+0200) Subject: Add documentation on searching data via the API X-Git-Tag: dnsdist-1.1.0-beta2~138^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65db701bd1042fed345490ee287ae23e8d8c3ad7;p=thirdparty%2Fpdns.git Add documentation on searching data via the API --- diff --git a/docs/markdown/httpapi/api_spec.md b/docs/markdown/httpapi/api_spec.md index bdcb78cff1..cbca44ed31 100644 --- a/docs/markdown/httpapi/api_spec.md +++ b/docs/markdown/httpapi/api_spec.md @@ -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": "", + "object_type": "zone", + "zone_id": "" + }, + +For a record: + + { + "content": "", + "disabled": , + "name": "", + "object_type": "record", + "ttl": , + "type": "", + "zone": ", + "zone_id": "" + }, + +For a comment: + + { + "object_type": "comment", + "name": "", + "content": "" + "zone": ", + "zone_id": "" + } + Cache Access ============