From 65db701bd1042fed345490ee287ae23e8d8c3ad7 Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Fri, 5 Aug 2016 15:13:30 +0200 Subject: [PATCH] Add documentation on searching data via the API --- docs/markdown/httpapi/api_spec.md | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) 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 ============ -- 2.47.2