Liking cljdoc? Tell your friends :D

metabase.api.field


DELETE_:id_dimensionclj

DELETE /api/field/:id/dimension

Remove the dimension associated to field at ID

PARAMS:
  • id
## `DELETE /api/field/:id/dimension`

Remove the dimension associated to field at ID

##### PARAMS:

*  **`id`** 
sourceraw docstring

field->valuesclj

(field->values field)

Fetch FieldValues, if they exist, for a field and return them in an appropriate format for public/embedded use-cases.

Fetch FieldValues, if they exist, for a `field` and return them in an appropriate format for public/embedded
use-cases.
sourceraw docstring

GET_:idclj

GET /api/field/:id

Get Field with ID.

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

Get `Field` with ID.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET /api/field/:id/related

Return related entities.

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

Return related entities.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_:id_remapping_:remapped-idclj

GET /api/field/:id/remapping/:remapped-id

Fetch remapped Field values.

PARAMS:
  • id

  • remapped-id

  • value

## `GET /api/field/:id/remapping/:remapped-id`

Fetch remapped Field values.

##### PARAMS:

*  **`id`** 

*  **`remapped-id`** 

*  **`value`** 
sourceraw docstring

GET_:id_search_:search-idclj

GET /api/field/:id/search/:search-id

Search for values of a Field with search-id that start with value. See docstring for metabase.api.field/search-values for a more detailed explanation.

PARAMS:
  • id

  • search-id

  • value value must be a non-blank string.

  • limit value may be nil, or if non-nil, value must be a valid integer greater than zero.

## `GET /api/field/:id/search/:search-id`

Search for values of a Field with `search-id` that start with `value`. See docstring for
  `metabase.api.field/search-values` for a more detailed explanation.

##### PARAMS:

*  **`id`** 

*  **`search-id`** 

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

*  **`limit`** value may be nil, or if non-nil, value must be a valid integer greater than zero.
sourceraw docstring

GET_:id_summaryclj

GET /api/field/:id/summary

Get the count and distinct count of Field with ID.

PARAMS:
  • id
## `GET /api/field/:id/summary`

Get the count and distinct count of `Field` with ID.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_:id_valuesclj

GET /api/field/:id/values

If a Field's value of has_field_values is list, return a list of all the distinct values of the Field, and (if defined by a User) a map of human-readable remapped values.

PARAMS:
  • id
## `GET /api/field/:id/values`

If a Field's value of `has_field_values` is `list`, return a list of all the distinct values of the Field, and (if
  defined by a User) a map of human-readable remapped values.

##### PARAMS:

*  **`id`** 
sourceraw docstring

GET_field-literal%2C:field-name%2Ctype%2F:field-type_valuesclj

GET /api/field/field-literal%2C:field-name%2Ctype%2F:field-type/values

Implementation of the field values endpoint for fields in the Saved Questions 'virtual' DB. This endpoint is just a convenience to simplify the frontend code. It just returns the standard 'empty' field values response.

PARAMS:
  • _
## `GET /api/field/field-literal%2C:field-name%2Ctype%2F:field-type/values`

Implementation of the field values endpoint for fields in the Saved Questions 'virtual' DB. This endpoint is just a
  convenience to simplify the frontend code. It just returns the standard 'empty' field values response.

##### PARAMS:

*  **`_`** 
sourceraw docstring

parse-query-param-value-for-fieldclj

(parse-query-param-value-for-field field value)

Parse a value passed as a URL query param in a way appropriate for the field it belongs to. E.g. for text Fields the value doesn't need to be parsed; for numeric Fields we should parse it as a number.

Parse a `value` passed as a URL query param in a way appropriate for the `field` it belongs to. E.g. for text Fields
the value doesn't need to be parsed; for numeric Fields we should parse it as a number.
sourceraw docstring

POST_:id_dimensionclj

POST /api/field/:id/dimension

Sets the dimension for the given field at ID

PARAMS:
  • id

  • type value must be one of: external, internal.

  • name value must be a non-blank string.

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

## `POST /api/field/:id/dimension`

Sets the dimension for the given field at ID

##### PARAMS:

*  **`id`** 

*  **`type`** value must be one of: `external`, `internal`.

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

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

POST_:id_discard_valuesclj

POST /api/field/:id/discard_values

Discard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.

You must be a superuser to do this.

PARAMS:
  • id
## `POST /api/field/:id/discard_values`

Discard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's
   Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.

You must be a superuser to do this.

##### PARAMS:

*  **`id`** 
sourceraw docstring

POST_:id_rescan_valuesclj

POST /api/field/:id/rescan_values

Manually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for FieldValues.

You must be a superuser to do this.

PARAMS:
  • id
## `POST /api/field/:id/rescan_values`

Manually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for
   FieldValues.

You must be a superuser to do this.

##### PARAMS:

*  **`id`** 
sourceraw docstring

POST_:id_valuesclj

POST /api/field/:id/values

Update the fields values and human-readable values for a Field whose special type is category/city/state/country or whose base type is type/Boolean. The human-readable values are optional.

PARAMS:
  • id

  • value-pairs value must be an array. Each value must be an array.

## `POST /api/field/:id/values`

Update the fields values and human-readable values for a `Field` whose special type is
  `category`/`city`/`state`/`country` or whose base type is `type/Boolean`. The human-readable values are optional.

##### PARAMS:

*  **`id`** 

*  **`value-pairs`** value must be an array. Each value must be an array.
sourceraw docstring

PUT_:idclj

PUT /api/field/:id

Update Field with ID.

PARAMS:
  • visibility_type value may be nil, or if non-nil, value must be one of: details-only, hidden, normal, retired, sensitive.

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

  • points_of_interest 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 non-blank string.

  • special_type value may be nil, or if non-nil, value must be a valid field type.

  • has_field_values value may be nil, or if non-nil, value must be one of: auto-list, list, none, search.

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

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

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

  • id

## `PUT /api/field/:id`

Update `Field` with ID.

##### PARAMS:

*  **`visibility_type`** value may be nil, or if non-nil, value must be one of: `details-only`, `hidden`, `normal`, `retired`, `sensitive`.

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

*  **`points_of_interest`** 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 non-blank string.

*  **`special_type`** value may be nil, or if non-nil, value must be a valid field type.

*  **`has_field_values`** value may be nil, or if non-nil, value must be one of: `auto-list`, `list`, `none`, `search`.

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

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

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

*  **`id`** 
sourceraw docstring

remapped-valueclj

(remapped-value field remapped-field value)

Search for one specific remapping where the value of field exactly matches value. Returns a pair like

[<value-of-field> <value-of-remapped-field>]

if a match is found.

For example, with the Sample Dataset, you could find the name of the Person with ID 20 as follows:

(remapped-value <PEOPLE.ID Field> <PEOPLE.NAME Field> 20) ;; -> [20 "Peter Watsica"]

Search for one specific remapping where the value of `field` exactly matches `value`. Returns a pair like

   [<value-of-field> <value-of-remapped-field>]

if a match is found.

For example, with the Sample Dataset, you could find the name of the Person with ID 20 as follows:

   (remapped-value <PEOPLE.ID Field> <PEOPLE.NAME Field> 20)
   ;; -> [20 "Peter Watsica"]
sourceraw docstring

routesclj

Ring routes for api/field: (PUT_:id POST_:id_discard_values GET_field-literal%2C:field-name%2Ctype%2F:field-type_values POST_:id_rescan_values DELETE_:id_dimension GET_:id_search_:search-id GET_:id_values POST_:id_values GET_:id_related GET_:id_summary POST_:id_dimension GET_:id GET_:id_remapping_:remapped-id)

Ring routes for api/field:
(PUT_:id
 POST_:id_discard_values
 GET_field-literal%2C:field-name%2Ctype%2F:field-type_values
 POST_:id_rescan_values
 DELETE_:id_dimension
 GET_:id_search_:search-id
 GET_:id_values
 POST_:id_values
 GET_:id_related
 GET_:id_summary
 POST_:id_dimension
 GET_:id
 GET_:id_remapping_:remapped-id)
sourceraw docstring

search-valuesclj

(search-values field search-field value & [limit])

Inputs: [field search-field value & [limit]]

Search for values of search-field that start with value (up to limit, if specified), and return like

[<value-of-field> <matching-value-of-search-field>].

For example, with the Sample Dataset, you could search for the first three IDs & names of People whose name starts with Ma as follows:

(search-values <PEOPLE.ID Field> <PEOPLE.NAME Field> "Ma" 3)
;; -> ((14 "Marilyne Mohr")
       (36 "Margot Farrell")
       (48 "Maryam Douglas"))
Inputs: [field search-field value & [limit]]

Search for values of `search-field` that start with `value` (up to `limit`, if specified), and return like

    [<value-of-field> <matching-value-of-search-field>].

 For example, with the Sample Dataset, you could search for the first three IDs & names of People whose name starts
 with `Ma` as follows:

    (search-values <PEOPLE.ID Field> <PEOPLE.NAME Field> "Ma" 3)
    ;; -> ((14 "Marilyne Mohr")
           (36 "Margot Farrell")
           (48 "Maryam Douglas"))
sourceraw docstring

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

× close