v12

latestOpenAPI 3.1.0AGPL-3.0raw.githubusercontent.com2026-05-286377631.6 MB
/api/collection

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).

get/api/collection/tree

Query parameters

exclude-archivedboolean nullable required
exclude-other-user-collectionsboolean nullable required
include-libraryboolean nullable required
namespacestring nullable
namespacesstring[] nullable
shallowboolean nullable required
collection-idinteger nullable

value must be an integer greater than zero.

Response

Successful response