#data-Collection-Tree
Steps to run
- clone the repository in $go Path/src
- cd ../path/src
- go run main.go
Run On Postman.
-
select POST Api option
-
select Body To Set Data a. http://localhost:8081/v1/insert b. select Raw -> Json. c. { "dim": [{ "key": "device", "val": "desktop" }, { "key": "country", "val": "IN" } ], "metrics": [{ "key": "webreq", "val": 50 }, { "key": "timespent", "val": 40 } ] } d. click on Send
To Get Data a. http://localhost:8081/v1/query b. select Raw -> Json. c. { "dim": [{ "key": "country", "val": "IN" }] } d. click on send
** all names are case sensitive
Output for Set Data: { "Res":"200 OK", "Output":{ "dim":null, "metrics":null } }
Output for Get Data: { "Res":"200 OK", "Output":{ "dim":[ { "key":"country", "val":"IN" } ], "metrics":[ { "key":"webreq", "val":50 }, { "key":"timespent", "val":40 } ] } }
++ Data may not apear in alignment