Version v0.49 of Metabase is no longer supported. Check out the docs for the current stable version, Metabase v0.63.
Action
/api/action/ endpoints.
DELETE /api/action/:action-id
PARAMS:
action-idvalue must be an integer greater than zero.
DELETE /api/action/:id/public_link
Delete the publicly-accessible link to this Dashboard.
PARAMS:
idvalue must be an integer greater than zero.
GET /api/action/
Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional
?model-id=<model-id> to limit to actions on a particular model.
PARAMS:
model-idnullable value must be an integer greater than zero.
GET /api/action/:action-id
PARAMS:
action-idvalue must be an integer greater than zero.
GET /api/action/:action-id/execute
Fetches the values for filling in execution parameters. Pass PK parameters and values to select.
PARAMS:
-
action-idvalue must be an integer greater than zero. -
parametersvalue must be a valid JSON string.
GET /api/action/public
Fetch a list of Actions with public UUIDs. These actions are publicly-accessible if public sharing is enabled.
POST /api/action/
Create a new action.
PARAMS:
-
visualization_settingsnullable map. -
parametersnullable sequence of map. -
descriptionnullable string. -
error_handlenullable string, and must be a valid json-query, something like ‘.item.title’. -
database_idnullable value must be an integer greater than zero. -
namestring. -
response_handlenullable string, and must be a valid json-query, something like ‘.item.title’. -
templatenullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url ->= 1>, :body (optional) -> , :headers (optional) -> , :parameters (optional) -> , :parameter_mappings (optional) -> } with no other keys. -
typenullable Unsupported action type. -
dataset_querynullable map. -
model_idvalue must be an integer greater than zero. -
kindnullable Unsupported implicit action kind. -
parameter_mappingsnullable map. -
action
POST /api/action/:id/execute
Execute the Action.
parameters should be the mapped dashboard parameters with values.
PARAMS:
-
idvalue must be an integer greater than zero. -
parametersnullable map fromto . -
_body
POST /api/action/:id/public_link
Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this Action 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:
idvalue must be an integer greater than zero.
PUT /api/action/:id
PARAMS:
-
idvalue must be an integer greater than zero. -
actionmap where {:archived (optional) ->, :database_id (optional) -> , :dataset_query (optional) -> , :description (optional) -> , :error_handle (optional) -> <nullable string, and must be a valid json-query, something like ‘.item.title’>, :kind (optional) -> , :model_id (optional) -> , :name (optional) -> , :parameter_mappings (optional) -> , :parameters (optional) -> , :response_handle (optional) -> <nullable string, and must be a valid json-query, something like ‘.item.title’>, :template (optional) -> <nullable map where {:method -> <enum of GET, POST, PUT, DELETE, PATCH>, :url -> = 1>, :body (optional) -> , :headers (optional) -> , :parameters (optional) -> , :parameter_mappings (optional) -> } with no other keys>, :type (optional) -> , :visualization_settings (optional) -> }.
Read docs for other versions of Metabase.