Skip to content
Snippets Groups Projects
api-documentation.md 98 KiB
Newer Older
  • Learn to ignore specific revisions
  • flamber's avatar
    flamber committed
    # API Documentation for Metabase
    
    
    Cam Saul's avatar
    Cam Saul committed
    _This file was generated from source comments by `clojure -M:run api-documentation`_.
    
    Check out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).
    
    ## Activity
    
      - [GET /api/activity/](#get-apiactivity)
    
      - [GET /api/activity/recent_views](#get-apiactivityrecent_views)
    
    ### `GET /api/activity/`
    
    Get recent activity.
    
    ### `GET /api/activity/recent_views`
    
    
    Get the list of 10 things the current user has been viewing most recently.
    
    
    
    ## Alert
    
    /api/alert endpoints.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
      - [DELETE /api/alert/:id](#delete-apialertid)
      - [GET /api/alert/](#get-apialert)
      - [GET /api/alert/:id](#get-apialertid)
      - [GET /api/alert/question/:id](#get-apialertquestionid)
      - [POST /api/alert/](#post-apialert)
      - [PUT /api/alert/:id](#put-apialertid)
      - [PUT /api/alert/:id/unsubscribe](#put-apialertidunsubscribe)
    
    ### `DELETE /api/alert/:id`
    
    Delete an Alert. (DEPRECATED -- don't delete a Alert anymore -- archive it instead.).
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `GET /api/alert/`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Fetch all alerts.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    ##### PARAMS:
    
    *  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
    
    
    *  **`user_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `GET /api/alert/:id`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Fetch an alert by ID.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `GET /api/alert/question/:id`
    
    Fetch all questions for the given question (`Card`) id.
    
    ##### PARAMS:
    
    
    *  **`id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    *  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `POST /api/alert/`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    Create a new Alert.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    ##### PARAMS:
    
    *  **`alert_condition`** value must be one of: `goal`, `rows`.
    
    
    *  **`card`** value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    *  **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
    
    *  **`alert_first_only`** value must be a boolean.
    
    *  **`alert_above_goal`** value may be nil, or if non-nil, value must be a boolean.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`new-alert-request-body`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `PUT /api/alert/:id`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    Update a `Alert` with ID.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`alert_condition`** value may be nil, or if non-nil, value must be one of: `goal`, `rows`.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    *  **`card`** value may be nil, or if non-nil, value must be a map with the keys `id`, `include_csv`, `include_xls`, and `dashboard_card_id`.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`channels`** value may be nil, or if non-nil, value must be an array. Each value must be a map. The array cannot be empty.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`alert_first_only`** value may be nil, or if non-nil, value must be a boolean.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    *  **`alert_above_goal`** value may be nil, or if non-nil, value must be a boolean.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`archived`** value may be nil, or if non-nil, value must be a boolean.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`alert-updates`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `PUT /api/alert/:id/unsubscribe`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Unsubscribes a user from the given alert.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ## Automagic dashboards
    
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-query)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-query)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-querycomparecomparison-entitycomparison-entity-id-or-query)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-queryruleprefixrule)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-queryruleprefixrulecomparecomparison-entitycomparison-entity-id-or-query)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycomparecomparison-entitycomparison-entity-id-or-query)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule](#get-apiautomagic-dashboardsentityentity-id-or-queryruleprefixrule)
      - [GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-queryruleprefixrulecomparecomparison-entitycomparison-entity-id-or-query)
      - [GET /api/automagic-dashboards/database/:id/candidates](#get-apiautomagic-dashboardsdatabaseidcandidates)
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query`
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    Return an automagic dashboard for entity `entity` with id `ìd`.
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`show`** invalid show value
    
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic dashboard analyzing cell in  automagic dashboard for entity `entity`
       defined by
       query `cell-querry`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`cell-query`** value couldn't be parsed as base64 encoded JSON
    
    *  **`show`** invalid show value
    
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/compare/:comparison-entity/:comparison-entity-id-or-query`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`
       with id `ìd` defined by query `cell-querry`; compared with entity `comparison-entity` with id
       `comparison-entity-id-or-query.`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`cell-query`** value couldn't be parsed as base64 encoded JSON
    
    *  **`show`** invalid show value
    
    *  **`comparison-entity`** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc"
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`comparison-entity-id-or-query`** 
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic dashboard analyzing cell in question  with id `id` defined by
       query `cell-querry` using rule `rule`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`cell-query`** value couldn't be parsed as base64 encoded JSON
    
    *  **`prefix`** invalid value for prefix
    
    *  **`rule`** invalid value for rule name
    
    *  **`show`** invalid show value
    
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`
       with id `ìd` defined by query `cell-querry` using rule `rule`; compared with entity
       `comparison-entity` with id `comparison-entity-id-or-query.`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`cell-query`** value couldn't be parsed as base64 encoded JSON
    
    *  **`prefix`** invalid value for prefix
    
    *  **`rule`** invalid value for rule name
    
    *  **`show`** invalid show value
    
    *  **`comparison-entity`** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc"
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`comparison-entity-id-or-query`** 
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/compare/:comparison-entity/:comparison-entity-id-or-query`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic comparison dashboard for entity `entity` with id `ìd` compared with entity
    
       `comparison-entity` with id `comparison-entity-id-or-query.`.
    
    Cam Saul's avatar
    Cam Saul committed
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`show`** invalid show value
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`comparison-entity`** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc"
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`comparison-entity-id-or-query`** 
    
    Ryan Senior's avatar
    Ryan Senior committed
    
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic dashboard for entity `entity` with id `ìd` using rule `rule`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`prefix`** invalid value for prefix
    
    *  **`rule`** invalid value for rule name
    
    *  **`show`** invalid show value
    
    
    ### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return an automagic comparison dashboard for entity `entity` with id `ìd` using rule `rule`;
       compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.
    
    ##### PARAMS:
    
    *  **`entity`** Invalid entity type
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`entity-id-or-query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`prefix`** invalid value for prefix
    
    *  **`rule`** invalid value for rule name
    
    *  **`show`** invalid show value
    
    *  **`comparison-entity`** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc"
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`comparison-entity-id-or-query`** 
    
    ### `GET /api/automagic-dashboards/database/:id/candidates`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return a list of candidates for automagic dashboards orderd by interestingness.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ## Card
    
    /api/card endpoints.
    
      - [DELETE /api/card/:card-id/favorite](#delete-apicardcard-idfavorite)
    
      - [DELETE /api/card/:card-id/public_link](#delete-apicardcard-idpublic_link)
    
      - [DELETE /api/card/:id](#delete-apicardid)
      - [GET /api/card/](#get-apicard)
      - [GET /api/card/:id](#get-apicardid)
      - [GET /api/card/:id/related](#get-apicardidrelated)
      - [GET /api/card/embeddable](#get-apicardembeddable)
      - [GET /api/card/public](#get-apicardpublic)
      - [POST /api/card/](#post-apicard)
      - [POST /api/card/:card-id/favorite](#post-apicardcard-idfavorite)
    
      - [POST /api/card/:card-id/public_link](#post-apicardcard-idpublic_link)
    
      - [POST /api/card/:card-id/query](#post-apicardcard-idquery)
      - [POST /api/card/:card-id/query/:export-format](#post-apicardcard-idqueryexport-format)
      - [POST /api/card/collections](#post-apicardcollections)
      - [POST /api/card/pivot/:card-id/query](#post-apicardpivotcard-idquery)
      - [POST /api/card/related](#post-apicardrelated)
      - [PUT /api/card/:id](#put-apicardid)
    
    ### `DELETE /api/card/:card-id/favorite`
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    ### `DELETE /api/card/:card-id/public_link`
    
    Cam Saul's avatar
    Cam Saul committed
    Delete the publicly-accessible link to this Card.
    
    
    You must be a superuser to do this.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    ### `DELETE /api/card/:id`
    
    Delete a Card. (DEPRECATED -- don't delete a Card anymore -- archive it instead.).
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/card/`
    
    Cam Saul's avatar
    Cam Saul committed
    Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is
    
      `all`, but other options include `mine`, `fav`, `database`, `table`, `recent`, `popular`, and `archived`. See
    
      corresponding implementation functions above for the specific behavior of each filter option. :card_index:.
    
    *  **`f`** value may be nil, or if non-nil, value must be one of: `all`, `archived`, `database`, `fav`, `mine`, `popular`, `recent`, `table`.
    
    
    *  **`model_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    ### `GET /api/card/:id`
    
    
    Get `Card` with ID.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/card/:id/related`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return related entities.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/card/embeddable`
    
    Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints
      and a signed JWT.
    
    
    You must be a superuser to do this.
    
    
    ### `GET /api/card/public`
    
    Cam Saul's avatar
    Cam Saul committed
    Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.
    
    
    You must be a superuser to do this.
    
    
    ### `POST /api/card/`
    
    
    Create a new `Card`.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`visualization_settings`** value must be a map.
    
    *  **`description`** value may be nil, or if non-nil, value must be a non-blank string.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`collection_position`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    Ryan Senior's avatar
    Ryan Senior committed
    *  **`result_metadata`** value may be nil, or if non-nil, value must be an array of valid results column metadata maps.
    
    *  **`metadata_checksum`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`collection_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`name`** value must be a non-blank string.
    
    *  **`cache_ttl`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dataset_query`** 
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`display`** value must be a non-blank string.
    
    ### `POST /api/card/:card-id/favorite`
    
    Cam Saul's avatar
    Cam Saul committed
    Favorite a Card.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    ### `POST /api/card/:card-id/public_link`
    
    Cam Saul's avatar
    Cam Saul committed
    Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has
    
      already been shared, it will return the existing public link rather than creating a new one.)  Public sharing must
      be enabled.
    
    
    You must be a superuser to do this.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    ### `POST /api/card/:card-id/query`
    
    
    Run the query associated with a Card.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`parameters`** 
    
    *  **`ignore_cache`** value may be nil, or if non-nil, value must be a boolean.
    
    
    *  **`dashboard_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    ### `POST /api/card/:card-id/query/:export-format`
    
    Run the query associated with a Card, and return its results as a file in the specified format. Note that this
    
      expects the parameters as serialized JSON in the 'parameters' parameter.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-id`** 
    
    flamber's avatar
    flamber committed
    *  **`export-format`** value must be one of: `api`, `csv`, `json`, `xlsx`.
    
    
    *  **`parameters`** value may be nil, or if non-nil, value must be a valid JSON string.
    
    ### `POST /api/card/collections`
    
    Bulk update endpoint for Card Collections. Move a set of `Cards` with CARD_IDS into a `Collection` with
      COLLECTION_ID, or remove them from any Collections by passing a `null` COLLECTION_ID.
    
    
    ##### PARAMS:
    
    *  **`card_ids`** value must be an array. Each value must be an integer greater than zero.
    
    *  **`collection_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    ### `POST /api/card/pivot/:card-id/query`
    
    
    Run the query associated with a Card.
    
    ##### PARAMS:
    
    *  **`card-id`** 
    
    *  **`parameters`** 
    
    *  **`ignore_cache`** value may be nil, or if non-nil, value must be a boolean.
    
    
    ### `POST /api/card/related`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return related entities for an ad-hoc query.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`query`** 
    
    ### `PUT /api/card/:id`
    
    *  **`visualization_settings`** value may be nil, or if non-nil, value must be a map.
    
    *  **`description`** value may be nil, or if non-nil, value must be a string.
    
    *  **`archived`** value may be nil, or if non-nil, value must be a boolean.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`collection_position`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    Ryan Senior's avatar
    Ryan Senior committed
    *  **`result_metadata`** value may be nil, or if non-nil, value must be an array of valid results column metadata maps.
    
    *  **`metadata_checksum`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    *  **`enable_embedding`** value may be nil, or if non-nil, value must be a boolean.
    
    *  **`collection_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`card-updates`** 
    
    *  **`name`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    *  **`embedding_params`** value may be nil, or if non-nil, value must be a valid embedding params map.
    
    *  **`cache_ttl`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    *  **`dataset_query`** value may be nil, or if non-nil, value must be a map.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    
    *  **`display`** value may be nil, or if non-nil, value must be a non-blank string.
    
    ## Collection
    
    `/api/collection` endpoints. By default, these endpoints operate on Collections in the 'default' namespace, which is
      the one that has things like Dashboards and Cards. Other namespaces of Collections exist as well, such as the
      `:snippet` namespace, (called 'Snippet folders' in the UI). These namespaces are completely independent hierarchies.
      To use these endpoints for other Collections namespaces, you can pass the `?namespace=` parameter (e.g.
      `?namespace=snippet`).
    
      - [GET /api/collection/](#get-apicollection)
      - [GET /api/collection/:id](#get-apicollectionid)
      - [GET /api/collection/:id/items](#get-apicollectioniditems)
      - [GET /api/collection/graph](#get-apicollectiongraph)
      - [GET /api/collection/root](#get-apicollectionroot)
      - [GET /api/collection/root/items](#get-apicollectionrootitems)
      - [GET /api/collection/tree](#get-apicollectiontree)
      - [POST /api/collection/](#post-apicollection)
      - [PUT /api/collection/:id](#put-apicollectionid)
      - [PUT /api/collection/graph](#put-apicollectiongraph)
    
    ### `GET /api/collection/`
    
    Cam Saul's avatar
    Cam Saul committed
    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.)
    
    Cam Saul's avatar
    Cam Saul committed
      By default, this returns non-archived Collections, but instead you can show archived ones by passing
      `?archived=true`.
    
    *  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    ### `GET /api/collection/:id`
    
    Fetch a specific Collection with standard details added.
    
    Cam Saul's avatar
    Cam Saul committed
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/collection/:id/items`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Fetch a specific Collection's items with the following options:
    
    
      *  `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models
    
    Cam Saul's avatar
    Cam Saul committed
      *  `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.
    
      *  `pinned_state` - when `is_pinned`, return pinned objects only.
                       when `is_not_pinned`, return non pinned objects only.
    
                       when `all`, return everything. By default returns everything.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    *  **`models`** value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be an array. Each value must be one of: `card`, `collection`, `dashboard`, `no_models`, `pulse`, `snippet`. 2) value must be one of: `card`, `collection`, `dashboard`, `no_models`, `pulse`, `snippet`.
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
    
    
    *  **`pinned_state`** value may be nil, or if non-nil, value must be one of: `all`, `is_not_pinned`, `is_pinned`.
    
    *  **`sort_column`** value may be nil, or if non-nil, value must be one of: `last_edited_at`, `last_edited_by`, `model`, `name`.
    
    *  **`sort_direction`** value may be nil, or if non-nil, value must be one of: `asc`, `desc`.
    
    
    ### `GET /api/collection/graph`
    
    
    Fetch a graph of all Collection Permissions.
    
    
    You must be a superuser to do this.
    
    
    ##### PARAMS:
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    ### `GET /api/collection/root`
    
    Return the 'Root' Collection object with standard details added.
    
    ##### PARAMS:
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    ### `GET /api/collection/root/items`
    
    Cam Saul's avatar
    Cam Saul committed
    
    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.
    
    
    Cam Saul's avatar
    Cam Saul committed
    ##### PARAMS:
    
    
    *  **`models`** value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be an array. Each value must be one of: `card`, `collection`, `dashboard`, `no_models`, `pulse`, `snippet`. 2) value must be one of: `card`, `collection`, `dashboard`, `no_models`, `pulse`, `snippet`.
    
    Cam Saul's avatar
    Cam Saul committed
    
    *  **`archived`** value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').
    
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    *  **`pinned_state`** value may be nil, or if non-nil, value must be one of: `all`, `is_not_pinned`, `is_pinned`.
    
    *  **`sort_column`** value may be nil, or if non-nil, value must be one of: `last_edited_at`, `last_edited_by`, `model`, `name`.
    
    *  **`sort_direction`** value may be nil, or if non-nil, value must be one of: `asc`, `desc`.
    
    
    ### `GET /api/collection/tree`
    
    
    Similar to `GET /`, but returns Collections in a tree structure, e.g.
    
        [{:name     "A"
          :children [{:name "B"}
                     {:name     "C"
                      :children [{:name     "D"
                                  :children [{:name "E"}]}
                                 {:name     "F"
                                  :children [{:name "G"}]}]}]}
    
         {:name "H"}].
    
    ##### PARAMS:
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    ### `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.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`parent_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    *  **`authority_level`** value may be nil, or if non-nil, value must be one of: `official`.
    
    
    ### `PUT /api/collection/:id`
    
    Cam Saul's avatar
    Cam Saul committed
    Modify an existing Collection, including archiving or unarchiving it, or moving it.
    
    ##### PARAMS:
    
    
    *  **`authority_level`** value may be nil, or if non-nil, value must be one of: `official`.
    
    
    *  **`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.
    
    
    *  **`collection-updates`** 
    
    *  **`color`** value may be nil, or if non-nil, value must be a string that matches the regex `^#[0-9A-Fa-f]{6}$`.
    
    *  **`name`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`parent_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    *  **`id`** 
    
    *  **`update_collection_tree_authority_level`** value may be nil, or if non-nil, value must be a boolean.
    
    ### `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:
    
    
    *  **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
    
    
    *  **`body`** value must be a map.
    
    
    ## Dashboard
    
    /api/dashboard endpoints.
    
    
      - [DELETE /api/dashboard/:dashboard-id/public_link](#delete-apidashboarddashboard-idpublic_link)
    
      - [DELETE /api/dashboard/:id](#delete-apidashboardid)
      - [DELETE /api/dashboard/:id/cards](#delete-apidashboardidcards)
      - [DELETE /api/dashboard/:id/favorite](#delete-apidashboardidfavorite)
      - [GET /api/dashboard/](#get-apidashboard)
      - [GET /api/dashboard/:id](#get-apidashboardid)
      - [GET /api/dashboard/:id/params/:param-key/search/:query](#get-apidashboardidparamsparam-keysearchquery)
      - [GET /api/dashboard/:id/params/:param-key/values](#get-apidashboardidparamsparam-keyvalues)
      - [GET /api/dashboard/:id/related](#get-apidashboardidrelated)
      - [GET /api/dashboard/:id/revisions](#get-apidashboardidrevisions)
      - [GET /api/dashboard/embeddable](#get-apidashboardembeddable)
      - [GET /api/dashboard/params/valid-filter-fields](#get-apidashboardparamsvalid-filter-fields)
      - [GET /api/dashboard/public](#get-apidashboardpublic)
      - [POST /api/dashboard/](#post-apidashboard)
    
      - [POST /api/dashboard/:dashboard-id/public_link](#post-apidashboarddashboard-idpublic_link)
    
      - [POST /api/dashboard/:from-dashboard-id/copy](#post-apidashboardfrom-dashboard-idcopy)
      - [POST /api/dashboard/:id/cards](#post-apidashboardidcards)
      - [POST /api/dashboard/:id/favorite](#post-apidashboardidfavorite)
      - [POST /api/dashboard/:id/revert](#post-apidashboardidrevert)
      - [POST /api/dashboard/save](#post-apidashboardsave)
      - [POST /api/dashboard/save/collection/:parent-collection-id](#post-apidashboardsavecollectionparent-collection-id)
      - [PUT /api/dashboard/:id](#put-apidashboardid)
      - [PUT /api/dashboard/:id/cards](#put-apidashboardidcards)
    
    ### `DELETE /api/dashboard/:dashboard-id/public_link`
    
    Cam Saul's avatar
    Cam Saul committed
    Delete the publicly-accessible link to this Dashboard.
    
    
    You must be a superuser to do this.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard-id`** 
    
    ### `DELETE /api/dashboard/:id`
    
    Cam Saul's avatar
    Cam Saul committed
    Delete a Dashboard.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `DELETE /api/dashboard/:id/cards`
    
    flamber's avatar
    flamber committed
    Remove a `DashboardCard` from a Dashboard.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    
    *  **`dashcardId`** value must be a valid integer greater than zero.
    
    
    ### `DELETE /api/dashboard/:id/favorite`
    
    
    Unfavorite a Dashboard.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/dashboard/`
    
    
    Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:
    
    
      *  `all`      - Return all Dashboards.
      *  `mine`     - Return Dashboards created by the current user.
    
      *  `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.).
    
    *  **`f`** value may be nil, or if non-nil, value must be one of: `all`, `archived`, `mine`.
    
    ### `GET /api/dashboard/:id`
    
    flamber's avatar
    flamber committed
    Get Dashboard with ID.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/dashboard/:id/params/:param-key/search/:query`
    
    Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict
    
      these values by passing query parameters like `other-parameter=value` e.g.
    
    
        ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set
    
        ;; to 100
         GET /api/dashboard/1/params/abc/search/Cam?def=100
    
    
      Currently limited to first 1000 results.
    
    ##### PARAMS:
    
    *  **`id`** 
    
    *  **`param-key`** 
    
    
    
    *  **`query-params`** 
    
    
    ### `GET /api/dashboard/:id/params/:param-key/values`
    
    
    Fetch possible values of the parameter whose ID is `:param-key`. Optionally restrict these values by passing query
      parameters like `other-parameter=value` e.g.
    
        ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100
    
        GET /api/dashboard/1/params/abc/values?def=100.
    
    
    ##### PARAMS:
    
    *  **`id`** 
    
    *  **`param-key`** 
    
    *  **`query-params`** 
    
    
    ### `GET /api/dashboard/:id/related`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Return related entities.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/dashboard/:id/revisions`
    
    flamber's avatar
    flamber committed
    Fetch `Revisions` for Dashboard with ID.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `GET /api/dashboard/embeddable`
    
    Cam Saul's avatar
    Cam Saul committed
    Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding
      endpoints and a signed JWT.
    
    
    You must be a superuser to do this.
    
    
    ### `GET /api/dashboard/params/valid-filter-fields`
    
    
    Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in
      parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each
      `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query
      with these Fields.
    
      e.g. in a chain filter query like
    
        GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100
    
      Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not
      filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1
      can be found. You can use this endpoint to determine which of those Fields is actually used:
    
        GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3
        ;; ->
        {1 [2 3]}
    
      Results are returned as a map of
    
    
        `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query.
    
    
    ##### PARAMS:
    
    *  **`filtered`** value must satisfy one of the following requirements: 1) value must be a valid integer greater than zero. 2) value must be an array. Each value must be a valid integer greater than zero. The array cannot be empty.
    
    *  **`filtering`** value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be a valid integer greater than zero. 2) value must be an array. Each value must be a valid integer greater than zero. The array cannot be empty.
    
    
    ### `GET /api/dashboard/public`
    
    Cam Saul's avatar
    Cam Saul committed
    Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is
      enabled.
    
    
    You must be a superuser to do this.
    
    
    ### `POST /api/dashboard/`
    
    Cam Saul's avatar
    Cam Saul committed
    Create a new Dashboard.
    
    
    ##### PARAMS:
    
    *  **`name`** value must be a non-blank string.
    
    
    Ryan Senior's avatar
    Ryan Senior committed
    *  **`description`** value may be nil, or if non-nil, value must be a string.
    
    
    *  **`parameters`** value must be an array. Each value must be a map.
    
    
    *  **`cache_ttl`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`collection_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    *  **`collection_position`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard`** 
    
    ### `POST /api/dashboard/:dashboard-id/public_link`
    
    Cam Saul's avatar
    Cam Saul committed
    Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this
      Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public
      sharing must be enabled.
    
    
    You must be a superuser to do this.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard-id`** 
    
    
    ### `POST /api/dashboard/:from-dashboard-id/copy`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Copy a Dashboard.
    
    ##### PARAMS:
    
    *  **`from-dashboard-id`** 
    
    *  **`name`** value may be nil, or if non-nil, value must be a non-blank string.
    
    *  **`description`** value may be nil, or if non-nil, value must be a string.
    
    *  **`collection_id`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    *  **`collection_position`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    *  **`dashboard`** 
    
    ### `POST /api/dashboard/:id/cards`
    
    flamber's avatar
    flamber committed
    Add a `Card` to a Dashboard.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`cardId`** value may be nil, or if non-nil, value must be an integer greater than zero.
    
    
    *  **`parameter_mappings`** value must be an array. Each value must be a map.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`series`** 
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard-card`** 
    
    ### `POST /api/dashboard/:id/favorite`
    
    
    Favorite a Dashboard.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    ### `POST /api/dashboard/:id/revert`
    
    flamber's avatar
    flamber committed
    Revert a Dashboard to a prior `Revision`.
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`id`** 
    
    
    *  **`revision_id`** value must be an integer greater than zero.
    
    
    ### `POST /api/dashboard/save`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Save a denormalized description of dashboard.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard`** 
    
    ### `POST /api/dashboard/save/collection/:parent-collection-id`
    
    Cam Saul's avatar
    Cam Saul committed
    
    Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.
    
    ##### PARAMS:
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`parent-collection-id`** 
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`dashboard`** 
    
    ### `PUT /api/dashboard/:id`
    
    Cam Saul's avatar
    Cam Saul committed
    Update a Dashboard.
    
    Cam Saul's avatar
    Cam Saul committed
      Usually, you just need write permissions for this Dashboard to do this (which means you have appropriate
      permissions for the Cards belonging to this Dashboard), but to change the value of `enable_embedding` you must be a
      superuser.
    
    *  **`parameters`** value may be nil, or if non-nil, value must be an array. Each value must be a map.
    
    *  **`points_of_interest`** value may be nil, or if non-nil, value must be a string.
    
    *  **`description`** value may be nil, or if non-nil, value must be a string.
    
    *  **`archived`** value may be nil, or if non-nil, value must be a boolean.
    
    
    Cam Saul's avatar
    Cam Saul committed
    *  **`collection_position`** value may be nil, or if non-nil, value must be an integer greater than zero.