Liking cljdoc? Tell your friends :D

metabase.api.metric

/api/metric endpoints.

/api/metric endpoints.
raw docstring

DELETE_:idclj

DELETE /api/metric/:id

Archive a Metric. (DEPRECATED -- Just pass updated value of :archived to the PUT endpoint instead.)

PARAMS:
  • id

  • revision_message value must be a non-blank string.

## `DELETE /api/metric/:id`

Archive a Metric. (DEPRECATED -- Just pass updated value of `:archived` to the `PUT` endpoint instead.)

##### PARAMS:

*  **`id`** 

*  **`revision_message`** value must be a non-blank string.
sourceraw docstring

GET_clj

GET /api/metric/

Fetch all Metrics.

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

Fetch *all* `Metrics`.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_:idclj

GET /api/metric/:id

Fetch Metric with ID.

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

Fetch `Metric` with ID.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET /api/metric/:id/related

Return related entities.

PARAMS:
  • id
## `GET /api/metric/:id/related`

Return related entities.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_:id_revisionsclj

GET /api/metric/:id/revisions

Fetch Revisions for Metric with ID.

PARAMS:
  • id
## `GET /api/metric/:id/revisions`

Fetch `Revisions` for `Metric` with ID.

##### PARAMS:

*  **`id`** 
sourceraw docstring

POST_clj

POST /api/metric/

Create a new Metric.

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

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

  • table_id value must be an integer greater than zero.

  • definition value must be a map.

## `POST /api/metric/`

Create a new `Metric`.

##### PARAMS:

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

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

*  **`table_id`** value must be an integer greater than zero.

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

POST_:id_revertclj

POST /api/metric/:id/revert

Revert a Metric to a prior Revision.

PARAMS:
  • id

  • revision_id value must be an integer greater than zero.

## `POST /api/metric/:id/revert`

Revert a `Metric` to a prior `Revision`.

##### PARAMS:

*  **`id`** 

*  **`revision_id`** value must be an integer greater than zero.
sourceraw docstring

PUT_:idclj

PUT /api/metric/:id

Update a Metric with ID.

PARAMS:
  • 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.

  • definition value may be nil, or if non-nil, value must be a map.

  • revision_message value must be a non-blank string.

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

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

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

  • id

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

## `PUT /api/metric/:id`

Update a `Metric` with ID.

##### PARAMS:

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

*  **`definition`** value may be nil, or if non-nil, value must be a map.

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

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

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

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

*  **`id`** 

*  **`how_is_this_calculated`** value may be nil, or if non-nil, value must be a string.
sourceraw docstring

PUT_:id_important_fieldsclj

PUT /api/metric/:id/important_fields

Update the important Fields for a Metric with ID. (This is used for the Getting Started guide).

You must be a superuser to do this.

PARAMS:
  • id

  • important_field_ids value must be an array. Each value must be an integer greater than zero.

## `PUT /api/metric/:id/important_fields`

Update the important `Fields` for a `Metric` with ID.
   (This is used for the Getting Started guide).

You must be a superuser to do this.

##### PARAMS:

*  **`id`** 

*  **`important_field_ids`** value must be an array. Each value must be an integer greater than zero.
sourceraw docstring

routesclj

Ring routes for api/metric: (POST_ PUT_:id PUT_:id_important_fields GET_:id_revisions POST_:id_revert GET_ GET_:id_related DELETE_:id GET_:id)

Ring routes for api/metric:
(POST_ PUT_:id PUT_:id_important_fields GET_:id_revisions POST_:id_revert GET_ GET_:id_related DELETE_:id GET_:id)
sourceraw docstring

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

× close