Skip to content
Snippets Groups Projects
Commit 0981d3bc authored by Simon Belak's avatar Simon Belak
Browse files

Add /:prefix/:rule endpoint for questions and ad-hoc

parent b548ef4c
No related branches found
No related tags found
No related merge requests found
......@@ -151,6 +151,15 @@
{show Show}
(-> id Card api/check-404 (magic/automagic-analysis {:show (keyword show)})))
(api/defendpoint GET "/question/:id/:prefix/:rule"
"Return an automagic dashboard analyzing question with id `id` using rule `rule`."
[id prefix rule show]
{show Show
prefix Prefix
rule Rule}
(-> id Card api/check-404 (magic/automagic-analysis {:show (keyword show)
:rule (load-rule "table" prefix rule)})))
(api/defendpoint GET "/adhoc/:query"
"Return an automagic dashboard analyzing ad hoc query."
[query show]
......@@ -161,6 +170,19 @@
query/adhoc-query
(magic/automagic-analysis {:show (keyword show)})))
(api/defendpoint GET "/adhoc/:query/:prefix/:rule"
"Return an automagic dashboard analyzing ad hoc query."
[query prefix rule show]
{show Show
query Base64EncodedJSON
prefix Prefix
rule Rule}
(-> query
decode-base64-json
query/adhoc-query
(magic/automagic-analysis {:show (keyword show)
:rule (load-rule "table" prefix rule)})))
(api/defendpoint GET "/adhoc/:query/cell/:cell-query"
"Return an automagic dashboard analyzing ad hoc query."
[query cell-query show]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment