User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
DataAction : Run Data Actions

Send a Data Action beta

POST/api/3.0/data_actions
perform_data_action(body)

Implementation Notes

Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action.

Response Class

DataActionResponse {
webhook_id (string, read-only): ID of the webhook event that sent this data action. In some error conditions, this may be null.,
success (boolean, read-only): Whether the data action was successful.,
refresh_query (boolean, read-only): When true, indicates that the client should refresh (rerun) the source query because the data may have been changed by the action.,
validation_errors (ValidationError, read-only): Validation errors returned by the data action server.,
message (string, read-only): Optional message returned by the data action server describing the state of the action that took place. This can be used to implement custom failure messages. If a failure is related to a particular form field, the server should send back a validation error instead. The Looker web UI does not currently display any message if the action indicates 'success', but may do so in the future.
}
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Parameters

Parameter Required? Description Parameter Type Data Type
body true Data Action Request body
DataActionRequest {
action (object): The JSON describing the data action. This JSON should be considered opaque and should be passed through unmodified from the query result it came from.,
form_values (object): User input for any form values the data action might use.,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Fetch Remote Data Action Form beta

POST/api/3.0/data_actions/form
fetch_remote_data_action_form(body)

Implementation Notes

For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user.

Response Class

DataActionForm {
state (DataActionUserState, read-only): User state,
fields (Array[DataActionFormField], read-only): Array of form fields.
}
DataActionUserState {
data (string, read-only): User state data,
refresh_time (long, read-only): Time in seconds until the state needs to be refreshed
}
DataActionFormField {
name (string, read-only): Name,
label (string, read-only): Human-readable label,
description (string, read-only): Description of field,
type (string, read-only): Type of field.,
default (string, read-only): Default value of the field.,
oauth_url (string, read-only): The URL for an oauth link, if type is 'oauth_link'.,
required (boolean, read-only): Whether or not the field is required. This is a user-interface hint. A user interface displaying this form should not submit it without a value for this field. The action server must also perform this validation.,
options (Array[DataActionFormSelectOption], read-only): If the form type is 'select', a list of options to be selected from.
}
DataActionFormSelectOption {
name (string, read-only): Name,
label (string, read-only): Human-readable label
}

Parameters

Parameter Required? Description Parameter Type Data Type
body true Data Action Request body object

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}
Top