From b3fa78e2cff68f6b600314bde984661b8f707f8f Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Tue, 13 Sep 2022 17:56:58 +0200
Subject: [PATCH] update docs

---
 README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 143870e..d8af66b 100644
--- a/README.md
+++ b/README.md
@@ -66,8 +66,53 @@ in all object types
 
 ### dns-api.sh
 
-Low level command to access the api
+Low level command to access the api. It is called from ./dns-search.sh too - but can be started manually for custom api urls.
 
 `dns-api.sh [METHOD] URL`
 
 This script is used by dns-search.sh. Maybe you don't want to execute it directly.
+
+### Output
+
+You maybe want to start with the lazy mode.
+
+Here you see how it accesses the api and the returned json data of each request.
+
+Between the json data are lines starting with a semikolon - these are comments
+written to STDERR. To hide them add a 2>/dev/null to hide the comments.
+
+```txt
+./dns-search.sh www.iml.unibe.ch
+;
+; === INFOBLOX DNS SEARCH
+;
+; search for type : 
+; search regex    : www.iml.unibe.ch
+;
+; === DNS API :: GET /record:host?name~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl
+[
+  {
+    "_ref": "record:host/REFID:www.iml.unibe.ch/default",
+    "aliases": [
+      ...
+    ],
+    "ipv4addrs": [
+      {
+        "_ref": "record:host_ipv4addr/REFID_2:86.119.35.66/www.iml.unibe.ch/default",
+        "configure_for_dhcp": false,
+        "host": "www.iml.unibe.ch",
+        "ipv4addr": "86.119.35.66"
+      }
+    ],
+    "name": "www.iml.unibe.ch",
+    "ttl": 300,
+    "view": "default"
+  }
+]
+; === DNS API :: GET /record:host?alias~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl
+[]
+; === DNS API :: GET /record:host?ipv4addr~=www.iml.unibe.ch&_return_fields%2B=aliases,ttl
+[]
+; === DNS API :: GET /record:cname?name~=www.iml.unibe.ch&_return_fields%2B=ttl
+[]
+```
-- 
GitLab