GET /api/collection/tree
Similar to GET /, but returns Collections in a tree structure, e.g.
[{:name "A"
:below #{:card :dataset}
:children [{:name "B"}
{:name "C"
:here #{:dataset :card}
:below #{:dataset :card}
:children [{:name "D"
:here #{:dataset}
:children [{:name "E"}]}
{:name "F"
:here #{:card}
:children [{:name "G"}]}]}]}
{:name "H"}]
The here and below keys indicate the types of items at this particular level of the tree (here) and in its subtree (below).
TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at some point in the future.
By default, looks at the analytics (if enabled) and regular (nil) namespaces. You can optionally pass a namespace argument, or one or many namespaces, to specify the particular collection namespaces you wish to look at. For example, namespaces=analytics&namespaces= would match the default behavior.
When shallow is true, takes an optional collection-id and returns only the requested collection (or the root, if collection-id is nil).
Query parameters
value must be an integer greater than zero.
Response
Successful response