User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Theme : Manage Themes

Get All Themes beta

GET/api/3.1/themes
all_themes(fields)

Implementation Notes

Get an array of all existing themes.

Get a single theme by id with Theme)

This method returns an array of all existing themes. The active time for the theme is not considered.

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields. string string

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
}

Create Theme beta

POST/api/3.1/themes
create_theme(body)

Implementation Notes

Create a theme with the specified information.

Creates a new theme object, returning the theme details, including the created id.

If settings are not specified, the default theme settings will be copied into the new theme.

The theme name can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.

Update an existing theme with Update Theme)

Permanently delete an existing theme with Delete Theme)

For more information, see Creating and Applying Themes

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
body false Theme body
Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

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
}
409 Resource Already Exists
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
}

Search Themes beta

GET/api/3.1/themes/search
search_themes(id, name, begin_at, end_at, limit, offset, sorts, fields, filter_or)

Implementation Notes

Search all themes for matching criteria.

Returns an array of theme objects that match the specified search criteria.

Search Parameters Description
begin_at only Find themes active at or after begin_at
end_at only Find themes active at or before end_at
both set Find themes with an active inclusive period between begin_at and end_at

Note: Range matching requires boolean AND logic. When using begin_at and end_at together, do not use filter_or=TRUE

If multiple search params are given and filter_or is FALSE or not specified, search params are combined in a logical AND operation. Only rows that match all search param criteria will be returned.

If filter_or is TRUE, multiple search params are combined in a logical OR operation. Results will include rows that match any of the search criteria.

String search params use case-insensitive matching. String search params can contain % and ‘_’ as SQL LIKE pattern match wildcard expressions. example=”dan%” will match “danger” and “Danzig” but not “David” example=”D_m%” will match “Damage” and “dump”

Integer search params can accept a single value or a comma separated list of values. The multiple values will be combined under a logical OR operation - results will match at least one of the given values.

Most search params can accept “IS NULL” and “NOT NULL” as special expressions to match or exclude (respectively) rows where the column is null.

Boolean search params accept only “true” and “false” as values.

Get a single theme by id with Theme)

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
id false Match theme id. integer int64
name false Match theme name. string string
begin_at false Timestamp for activation. string date-time
end_at false Timestamp for expiration. string date-time
limit false Number of results to return (used with `offset`). integer int64
offset false Number of results to skip before returning any (used with `limit`). integer int64
sorts false Fields to sort by. string string
fields false Requested fields. string string
filter_or false Combine given search criteria in a boolean OR expression boolean boolean

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
}

Get Default Theme beta

GET/api/3.1/themes/default
default_theme(ts)

Implementation Notes

Get the default theme.

Returns the active theme object set as the default.

The default theme name can be set in the UI on the Admin|Theme UI page

The optional ts parameter can specify a different timestamp than “now.” If specified, it returns the default theme at the time indicated.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
ts false Timestamp representing the target datetime for the active period. Defaults to ‘now’ string date-time

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
}

Set Default Theme beta

PUT/api/3.1/themes/default
set_default_theme(name)

Implementation Notes

Set the global default theme by theme name.

Only Admin users can call this function.

Only an active theme with no expiration (end_at not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default.

Create Theme) has detailed information on rules for default and active themes

Returns the new specified default theme object.

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
name true Name of theme to set as default string string

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
}

Get Active Themes beta

GET/api/3.1/themes/active
active_themes(name, ts, fields)

Implementation Notes

Get active themes.

Returns an array of active themes.

If the name parameter is specified, it will return an array with one theme if it’s active and found.

The optional ts parameter can specify a different timestamp than “now.”

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
name false Name of theme string string
ts false Timestamp representing the target datetime for the active period. Defaults to ‘now’ string date-time
fields false Requested fields. string string

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
}

Get Theme or Default beta

GET/api/3.1/themes/theme_or_default
theme_or_default(name, ts)

Implementation Notes

Get the named theme if it’s active. Otherwise, return the default theme.

The optional ts parameter can specify a different timestamp than “now.” Note: API users with show ability can call this function

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
name true Name of theme string string
ts false Timestamp representing the target datetime for the active period. Defaults to ‘now’ string date-time

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
}

Validate Theme beta

POST/api/3.1/themes/validate
validate_theme(body)

Implementation Notes

Validate a theme with the specified information.

Validates all values set for the theme, returning any errors encountered, or 200 OK if valid

See Create Theme) for constraints

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

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 false Theme body
Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

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
}
409 Resource Already Exists
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
}

Get Theme beta

GET/api/3.1/themes/{theme_id}
theme(theme_id, fields)

Implementation Notes

Get a theme by ID.

Use this to retrieve a specific theme, whether or not it’s currently active.

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
theme_id true Id of theme string string
fields false Requested fields. string string

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
}

Update Theme beta

PATCH/api/3.1/themes/{theme_id}
update_theme(theme_id, body)

Implementation Notes

Update the theme by id.

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

Parameters

Parameter Required? Description Parameter Type Data Type
theme_id true Id of theme string string
body true Theme body
Theme {
begin_at (date-time): Timestamp for when this theme becomes active. Null=always,
end_at (date-time): Timestamp for when this theme expires. Null=never,
id (long, read-only): Unique Id,
name (string): Name of theme. Can only be alphanumeric and underscores.,
settings (ThemeSettings): Hash of name/value pairs for theme settings. These names get validated.,
can (object, read-only): Operations the current user is able to perform on this object
}
ThemeSettings {
background_color (string): Default background color,
base_font_size (string): Base font size for scaling fonts,
color_collection_id (string): Optional. ID of color collection to use with the theme. Use an empty string for none.,
font_color (string): Default font color,
font_family (string): Primary font family,
font_source (string): Source specification for font,
info_button_color (string): Info button color,
primary_button_color (string): Primary button color,
show_filters_bar (boolean): Toggle to show filters. Defaults to true.,
show_title (boolean): Toggle to show the title. Defaults to true.,
text_tile_text_color (string): Text color for text tiles,
tile_background_color (string): Background color for tiles,
tile_text_color (string): Text color for tiles,
title_color (string): Color for titles,
warn_button_color (string): Warning button color
}

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
}

Delete Theme beta

DELETE/api/3.1/themes/{theme_id}
delete_theme(theme_id)

Implementation Notes

Delete a specific theme by id.

This operation permanently deletes the identified theme from the database.

Because multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID.

All IDs associated with a theme name can be retrieved by searching for the theme name with Theme Search).

Note: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or support@looker.com to update your license for this feature.

Response Class

  None

Parameters

Parameter Required? Description Parameter Type Data Type
theme_id true Id of theme string string

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
}
204 Successfully deleted. string
Top