| title | summary |
|---|---|
Collection |
`/api/collection` endpoints. By default, these endpoints operate on Collections in the 'default' namespace, which is
the namespace that has things like Dashboards and Cards. Other namespaces of Collections exist as well, such as the
`:snippet` namespace, ('Snippet folders' in the UI). These namespaces are independent hierarchies. To use these
endpoints for other Collections namespaces, you can pass the `?namespace=` parameter (e.g., `?namespace=snippet`).
|
/api/collection endpoints. By default, these endpoints operate on Collections in the 'default' namespace, which is
the namespace that has things like Dashboards and Cards. Other namespaces of Collections exist as well, such as the
:snippet namespace, ('Snippet folders' in the UI). These namespaces are independent hierarchies. To use these
endpoints for other Collections namespaces, you can pass the ?namespace= parameter (e.g., ?namespace=snippet).
Fetch a list of all Collections that the current user has read permissions for (:can_write is returned as an
additional property of each Collection so you can tell which of these you have write permissions for.)
By default, this returns non-archived Collections, but instead you can show archived ones by passing
?archived=true.
By default, admin users will see all collections. To hide other user's collections pass in
?exclude-other-user-collections=true.
If personal-only is true, then return only personal collections where personal_owner_id is not nil.
-
archivednullable value must be a valid boolean string ('true' or 'false'). -
exclude-other-user-collectionsnullable value must be a valid boolean string ('true' or 'false'). -
namespacenullable value must be a non-blank string. -
personal-onlynullable value must be a valid boolean string ('true' or 'false').
Fetch a specific Collection with standard details added.
idvalue must be an integer greater than zero.
Fetch a specific Collection's items with the following options:
models- only include objects of a specific set ofmodels. If unspecified, returns objects of all modelsarchived- whentrue, return archived objects instead of unarchived ones. Defaults tofalse.pinned_state- whenis_pinned, return pinned objects only. whenis_not_pinned, return non pinned objects only. whenall, return everything. By default returns everything.
-
idvalue must be an integer greater than zero. -
modelsnullable vector of enum of dashboard, dataset, no_models, timeline, snippet, collection, pulse, metric, card. -
archivednullable value must be a valid boolean string ('true' or 'false'). -
pinned_statenullable enum of is_not_pinned, is_pinned, all. -
sort_columnnullable enum of model, name, last_edited_by, last_edited_at. -
sort_directionnullable enum of desc, asc. -
official_collections_firstnullable value must be a valid boolean string ('true' or 'false').
Fetch a specific Collection's timelines.
-
idvalue must be an integer greater than zero. -
includenullable must equal events. -
archivednullable boolean.
Fetch a graph of all Collection Permissions.
You must be a superuser to do this.
namespacenullable value must be a non-blank string.
Return the 'Root' Collection object with standard details added.
namespacenullable value must be a non-blank string.
Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection
doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no
collection_id exist. It does, however, have its own set of Permissions.
This endpoint will actually show objects with no collection_id for Users that have Root Collection
permissions, but for people without Root Collection perms, we'll just show the objects that have an effective
location of /.
This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the top-level objects you're allowed to access.
By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as
snippets, you can pass the ?namespace= parameter.
-
modelsnullable vector of enum of dashboard, dataset, no_models, timeline, snippet, collection, pulse, metric, card. -
archivednullable value must be a valid boolean string ('true' or 'false'). -
namespacenullable value must be a non-blank string. -
pinned_statenullable enum of is_not_pinned, is_pinned, all. -
sort_columnnullable enum of model, name, last_edited_by, last_edited_at. -
sort_directionnullable enum of desc, asc. -
official_collections_firstnullable value must be a valid boolean string ('true' or 'false').
Fetch the root Collection's timelines.
-
includenullable must equal events. -
archivednullable boolean.
Fetch the trash collection, as in /api/collection/:trash-id.
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.
-
exclude-archivednullable boolean. -
exclude-other-user-collectionsnullable boolean. -
namespacenullable value must be a non-blank string. -
shallownullable boolean. -
collection-idnullable value must be an integer greater than zero.
Create a new Collection.
-
namevalue must be a non-blank string. -
descriptionnullable value must be a non-blank string. -
parent_idnullable value must be an integer greater than zero. -
namespacenullable value must be a non-blank string. -
authority_levelnullable enum of official.
Modify an existing Collection, including archiving or unarchiving it, or moving it.
-
idvalue must be an integer greater than zero. -
namenullable value must be a non-blank string. -
descriptionnullable value must be a non-blank string. -
archivednullable value must be a valid boolean string ('true' or 'false'). -
parent_idnullable value must be an integer greater than zero. -
authority_levelnullable enum of official. -
collection-updates
Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that are present in the request, and leave the rest unchanged.
If the skip_graph query parameter is true, it will only return the current revision.
You must be a superuser to do this.
-
namespacenullable value must be a non-blank string. -
revisionvalue must be an integer. -
groupsmap. -
skip_graphnullable value must be a valid boolean string ('true' or 'false').