Liking cljdoc? Tell your friends :D

metabase.api.collection

/api/collection endpoints.

/api/collection endpoints.
raw docstring

GET_clj

GET /api/collection/

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.

PARAMS:
  • archived value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
## `GET /api/collection/`

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

##### PARAMS:

*  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
sourceraw docstring

GET_:idclj

GET /api/collection/:id

Fetch a specific Collection with standard details added

PARAMS:
  • id
## `GET /api/collection/:id`

Fetch a specific Collection with standard details added

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_:id_itemsclj

GET /api/collection/:id/items

Fetch a specific Collection's items with the following options:

  • model - only include objects of a specific model. If unspecified, returns objects of all models
  • archived - when true, return archived objects instead of unarchived ones. Defaults to false.
PARAMS:
  • id

  • model value may be nil, or if non-nil, value must be one of: card, collection, dashboard, pulse.

  • archived value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').

## `GET /api/collection/:id/items`

Fetch a specific Collection's items with the following options:

  *  `model` - only include objects of a specific `model`. If unspecified, returns objects of all models
  *  `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.

##### PARAMS:

*  **`id`** 

*  **`model`** value may be nil, or if non-nil, value must be one of: `card`, `collection`, `dashboard`, `pulse`.

*  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
sourceraw docstring

GET_graphclj

GET /api/collection/graph

Fetch a graph of all Collection Permissions.

You must be a superuser to do this.

## `GET /api/collection/graph`

Fetch a graph of all Collection Permissions.

You must be a superuser to do this.
sourceraw docstring

GET_rootclj

GET /api/collection/root

Return the 'Root' Collection object with standard details added

## `GET /api/collection/root`

Return the 'Root' Collection object with standard details added
sourceraw docstring

GET_root_itemsclj

GET /api/collection/root/items

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.

PARAMS:
  • model value may be nil, or if non-nil, value must be one of: card, collection, dashboard, pulse.

  • archived value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').

## `GET /api/collection/root/items`

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.

##### PARAMS:

*  **`model`** value may be nil, or if non-nil, value must be one of: `card`, `collection`, `dashboard`, `pulse`.

*  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
sourceraw docstring

POST_clj

POST /api/collection/

Create a new Collection.

PARAMS:
  • name value must be a non-blank string.

  • color value must be a string that matches the regex ^#[0-9A-Fa-f]{6}$.

  • description value may be nil, or if non-nil, value must be a non-blank string.

  • parent_id value may be nil, or if non-nil, value must be an integer greater than zero.

## `POST /api/collection/`

Create a new Collection.

##### PARAMS:

*  **`name`** value must be a non-blank string.

*  **`color`** value must be a string that matches the regex `^#[0-9A-Fa-f]{6}$`.

*  **`description`** value may be nil, or if non-nil, value must be a non-blank string.

*  **`parent_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
sourceraw docstring

PUT_:idclj

PUT /api/collection/:id

Modify an existing Collection, including archiving or unarchiving it, or moving it.

PARAMS:
  • id

  • name value may be nil, or if non-nil, value must be a non-blank string.

  • color value may be nil, or if non-nil, value must be a string that matches the regex ^#[0-9A-Fa-f]{6}$.

  • description value may be nil, or if non-nil, value must be a non-blank string.

  • archived value may be nil, or if non-nil, value must be a boolean.

  • parent_id value may be nil, or if non-nil, value must be an integer greater than zero.

  • collection-updates

## `PUT /api/collection/:id`

Modify an existing Collection, including archiving or unarchiving it, or moving it.

##### PARAMS:

*  **`id`** 

*  **`name`** value may be nil, or if non-nil, value must be a non-blank string.

*  **`color`** value may be nil, or if non-nil, value must be a string that matches the regex `^#[0-9A-Fa-f]{6}$`.

*  **`description`** value may be nil, or if non-nil, value must be a non-blank string.

*  **`archived`** value may be nil, or if non-nil, value must be a boolean.

*  **`parent_id`** value may be nil, or if non-nil, value must be an integer greater than zero.

*  **`collection-updates`** 
sourceraw docstring

PUT_graphclj

PUT /api/collection/graph

Do a batch update of Collections Permissions by passing in a modified graph.

You must be a superuser to do this.

PARAMS:
  • body value must be a map.
## `PUT /api/collection/graph`

Do a batch update of Collections Permissions by passing in a modified graph.

You must be a superuser to do this.

##### PARAMS:

*  **`body`** value must be a map.
sourceraw docstring

routesclj

Ring routes for api/collection: (POST_ PUT_:id GET_root GET_root_items GET_graph PUT_graph GET_ GET_:id_items GET_:id)

Ring routes for api/collection:
(POST_ PUT_:id GET_root GET_root_items GET_graph PUT_graph GET_ GET_:id_items GET_:id)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close