home User Guide Getting Started Help Center Documentation Community Training Certification
menu
close
settings
Looker keyboard_arrow_down
language keyboard_arrow_down
English
Français
Deutsch
日本語
search
print
application

Usage

application: application_name {
  label: "Application Label"
  url: "application_url"
  file: "application_file_path"
  entitlements: {
    local_storage: yes | no
    navigation: yes | no
    new_window: yes | no
    allow_forms: yes | no
    allow_same_origin: yes | no
    core_api_methods: ["api_method1", "api_method2", "api_method3"]
    external_api_urls: ["api_url1", "api_url2", "api_url3"]
    oauth2_urls: ["oauth2_url1", "oauth2_url2", "oauth2_url3"]
  }
}

Hierarchy

application

Default Value

None

Accepts

A name for the application and subparameters to define it

Special Rules

The application must have a url or a file parameter, but not both

Definition

The application parameter defines an application for Looker’s extension framework. Once an extension is added to a project, Looker users with appropriate permissions can see the extension listed in the Looker Browse menu. When a user selects the extension from the Browse menu, the application will open inside Looker.

The application parameter has the following subparameters:

The application must have either a url parameter or a file parameter, but not both.

label

Specifies the name of the application that is displayed to the user in the Browse menu. The label can be localized, if you are localizing your LookML model.

url

The url parameter is used for development purposes only, and should point to a development server running on the developer’s machine. For example:

url: "http://localhost:8080/bundle.js"

After development, you can drag the file into the Looker IDE and then use the file parameter to point to the file.

file

Specifies the path to a JavaScript file (with a .js extension) that defines the application. The path is relative to the project root. For example, this file parameter points to the bundle.js file in the apps directory of the LookML project:

file: "apps/bundle.js"

entitlements

The entitlements parameter specifies the resources that the extension can access. The extension will not be able to access the resources unless it is listed in entitlements.

An extension application must specify entitlements; the application will not run without them.

The entitlements parameter includes the following subparameters. If a subparameter is not included, then by default the extension is not allowed access to that entitlement.

Parameter Description Example
local_storage Specifies whether the extension is allowed to access local storage. local_storage: yes
navigation Specifies whether the extension is allowed to navigate to a different page in Looker. navigation: yes
new_window Specifies whether the extension is allowed to open a new browser window or tab. new_window: yes
allow_forms Specifies whether the extension is allowed to submit forms. Looker components that use HTML forms will require allow_forms: yes in order to work properly. allow_forms: yes
allow_same_origin Specifies whether the extension is allowed to use the Looker embed SDK. allow_same_origin: yes
core_api_methods A comma-separated list of Looker API methods that the extension uses. core_api_methods: ["run_inline_query", "lookml_model_explore", "all_lookml_models"]
external_api_urls A comma-separated list of URLs for external APIs that the extension uses. As shown in the example, you an include wildcard characters such as `*`. external_api_urls: ["http://example.com:3000", "https://*.googleapis.com"]
oauth2_urls A comma-separated list of URLs for OAUTH2 authentication and code exchange that the extension uses. oauth2_urls: ["https://accounts.google.com/o/oauth2/v2/auth"]

Example

In a manifest file, add extension-app as an extension in Looker. This application is a JavaScript file located in the apps directory of the LookML project.

application: extension-app { label: "Extension Framework App" file: "apps/bundle.js" entitlements: { local_storage: yes navigation: yes new_window: yes core_api_methods: ["run_inline_query", "lookml_model_explore", "all_lookml_models"] } }

Top