LookmlModel : Manage LookML Models
Get All LookML Models
GET/api/3.1/lookml_models
all_lookml_models(fields)
Implementation Notes
Get information about all lookml models.
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 LookML Model
POST/api/3.1/lookml_models
create_lookml_model(body)
Implementation Notes
Create a lookml model using the specified configuration.
Response Class
LookmlModel {
LookmlModelNavExplore {
can (object, read-only): Operations the current user is able to perform on this object,
allowed_db_connection_names (Array[string]): Array of names of connections this model is allowed to use,
explores (Array[LookmlModelNavExplore], read-only): Array of explores (if has_content),
has_content (boolean, read-only): Does this model declaration have have lookml content?,
label (string, read-only): UI-friendly name for this model,
name (string): Name of the model. Also used as the unique identifier,
project_name (string): Name of project containing the model,
unlimited_db_connections (boolean): Is this model allowed to use all current and future connections
}LookmlModelNavExplore {
name (string, read-only): Name of the explore,
description (string, read-only): Description for the explore,
label (string, read-only): Label for the explore,
hidden (boolean, read-only): Is this explore marked as hidden,
group_label (string, read-only): Label used to group explores in the navigation menus,
can (object, read-only): Operations the current user is able to perform on this object
}
Parameters
Parameter | Required? | Description | Parameter Type | Data Type |
---|---|---|---|---|
body | true | LookML Model | body |
LookmlModel {
can (object, read-only): Operations the current user is able to perform on this object, allowed_db_connection_names (Array[string]): Array of names of connections this model is allowed to use, explores (Array[LookmlModelNavExplore], read-only): Array of explores (if has_content), has_content (boolean, read-only): Does this model declaration have have lookml content?, label (string, read-only): UI-friendly name for this model, name (string): Name of the model. Also used as the unique identifier, project_name (string): Name of project containing the model, unlimited_db_connections (boolean): Is this model allowed to use all current and future connections }LookmlModelNavExplore { name (string, read-only): Name of the explore, description (string, read-only): Description for the explore, label (string, read-only): Label for the explore, hidden (boolean, read-only): Is this explore marked as hidden, group_label (string, read-only): Label used to group explores in the navigation menus, 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 }
|
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 }
|
429 | Too Many Requests |
Error {
message (string, read-only, required): Error details, documentation_url (string, read-only, required): Documentation link }
|
Get LookML Model
GET/api/3.1/lookml_models/{lookml_model_name}
lookml_model(lookml_model_name, fields)
Implementation Notes
Get information about a lookml model.
Response Class
LookmlModel {
LookmlModelNavExplore {
can (object, read-only): Operations the current user is able to perform on this object,
allowed_db_connection_names (Array[string]): Array of names of connections this model is allowed to use,
explores (Array[LookmlModelNavExplore], read-only): Array of explores (if has_content),
has_content (boolean, read-only): Does this model declaration have have lookml content?,
label (string, read-only): UI-friendly name for this model,
name (string): Name of the model. Also used as the unique identifier,
project_name (string): Name of project containing the model,
unlimited_db_connections (boolean): Is this model allowed to use all current and future connections
}LookmlModelNavExplore {
name (string, read-only): Name of the explore,
description (string, read-only): Description for the explore,
label (string, read-only): Label for the explore,
hidden (boolean, read-only): Is this explore marked as hidden,
group_label (string, read-only): Label used to group explores in the navigation menus,
can (object, read-only): Operations the current user is able to perform on this object
}
Parameters
Parameter | Required? | Description | Parameter Type | Data Type |
---|---|---|---|---|
lookml_model_name | true | Name of lookml model. | 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 LookML Model
PATCH/api/3.1/lookml_models/{lookml_model_name}
update_lookml_model(lookml_model_name, body)
Implementation Notes
Update a lookml model using the specified configuration.
Response Class
LookmlModel {
LookmlModelNavExplore {
can (object, read-only): Operations the current user is able to perform on this object,
allowed_db_connection_names (Array[string]): Array of names of connections this model is allowed to use,
explores (Array[LookmlModelNavExplore], read-only): Array of explores (if has_content),
has_content (boolean, read-only): Does this model declaration have have lookml content?,
label (string, read-only): UI-friendly name for this model,
name (string): Name of the model. Also used as the unique identifier,
project_name (string): Name of project containing the model,
unlimited_db_connections (boolean): Is this model allowed to use all current and future connections
}LookmlModelNavExplore {
name (string, read-only): Name of the explore,
description (string, read-only): Description for the explore,
label (string, read-only): Label for the explore,
hidden (boolean, read-only): Is this explore marked as hidden,
group_label (string, read-only): Label used to group explores in the navigation menus,
can (object, read-only): Operations the current user is able to perform on this object
}
Parameters
Parameter | Required? | Description | Parameter Type | Data Type |
---|---|---|---|---|
lookml_model_name | true | Name of lookml model. | string | string |
body | true | LookML Model | body |
LookmlModel {
can (object, read-only): Operations the current user is able to perform on this object, allowed_db_connection_names (Array[string]): Array of names of connections this model is allowed to use, explores (Array[LookmlModelNavExplore], read-only): Array of explores (if has_content), has_content (boolean, read-only): Does this model declaration have have lookml content?, label (string, read-only): UI-friendly name for this model, name (string): Name of the model. Also used as the unique identifier, project_name (string): Name of project containing the model, unlimited_db_connections (boolean): Is this model allowed to use all current and future connections }LookmlModelNavExplore { name (string, read-only): Name of the explore, description (string, read-only): Description for the explore, label (string, read-only): Label for the explore, hidden (boolean, read-only): Is this explore marked as hidden, group_label (string, read-only): Label used to group explores in the navigation menus, 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 }
|
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 }
|
429 | Too Many Requests |
Error {
message (string, read-only, required): Error details, documentation_url (string, read-only, required): Documentation link }
|
Delete LookML Model
DELETE/api/3.1/lookml_models/{lookml_model_name}
delete_lookml_model(lookml_model_name)
Implementation Notes
Delete a lookml model.
Response Class
None
Parameters
Parameter | Required? | Description | Parameter Type | Data Type |
---|---|---|---|---|
lookml_model_name | true | Name of lookml model. | 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 }
|
429 | Too Many Requests |
Error {
message (string, read-only, required): Error details, documentation_url (string, read-only, required): Documentation link }
|
204 | Successfully deleted. | string |
Get LookML Model Explore
GET/api/3.1/lookml_models/{lookml_model_name}/explores/{explore_name}
lookml_model_explore(lookml_model_name, explore_name, fields)
Implementation Notes
Get information about a lookml model explore.
Response Class
LookmlModelExplore {
LookmlModelExploreAccessFilter {
LookmlModelExploreAlias {
LookmlModelExploreAlwaysFilter {
LookmlModelExploreConditionallyFilter {
LookmlModelExploreSet {
LookmlModelExploreError {
LookmlModelExploreFieldset {
LookmlModelExploreField {
LookmlModelExploreFieldEnumeration {
LookmlModelExploreFieldTimeInterval {
LookmlModelExploreFieldMapLayer {
LookmlModelExploreFieldSqlCase {
LookmlModelExploreFieldMeasureFilters {
LookmlModelExploreJoins {
LookmlModelExploreSupportedMeasureType {
id (string, read-only): Fully qualified explore name (model name plus explore name),
name (string, read-only): Explore name,
description (string, read-only): Description,
label (string, read-only): Label,
scopes (Array[string], read-only): Scopes,
can_total (boolean, read-only): Can Total,
can_save (boolean, read-only): Can Save,
can_explain (boolean, read-only): Can Explain,
can_pivot_in_db (boolean, read-only): Can pivot in the DB,
can_subtotal (boolean, read-only): Can use subtotals,
has_timezone_support (boolean, read-only): Has timezone support,
supports_cost_estimate (boolean, read-only): Cost estimates supported,
connection_name (string, read-only): Connection name,
null_sort_treatment (string, read-only): How nulls are sorted, possible values are "low", "high", "first" and "last",
files (Array[string], read-only): List of model source files,
source_file (string, read-only): Primary source_file file,
project_name (string, read-only): Name of project,
model_name (string, read-only): Name of model,
view_name (string, read-only): Name of view,
hidden (boolean, read-only): Is hidden,
sql_table_name (string, read-only): A sql_table_name expression that defines what sql table the view/explore maps onto. Example: "prod_orders2 AS orders" in a view named orders.,
access_filter_fields (Array[string], read-only): (DEPRECATED) Array of access filter field names,
access_filters (Array[LookmlModelExploreAccessFilter], read-only): Access filters,
aliases (Array[LookmlModelExploreAlias], read-only): Aliases,
always_filter (Array[LookmlModelExploreAlwaysFilter], read-only): Always filter,
conditionally_filter (Array[LookmlModelExploreConditionallyFilter], read-only): Conditionally filter,
index_fields (Array[string], read-only): Array of index fields,
sets (Array[LookmlModelExploreSet], read-only): Sets,
tags (Array[string], read-only): An array of arbitrary string tags provided in the model for this explore.,
errors (Array[LookmlModelExploreError], read-only): Errors,
fields (LookmlModelExploreFieldset, read-only): Fields,
joins (Array[LookmlModelExploreJoins], read-only): Views joined into this explore,
group_label (string, read-only): Label used to group explores in the navigation menus,
supported_measure_types (Array[LookmlModelExploreSupportedMeasureType], read-only): An array of items describing which custom measure types are supported for creating a custom measure 'based_on' each possible dimension type.
}LookmlModelExploreAccessFilter {
field (string, read-only): Field to be filtered,
user_attribute (string, read-only): User attribute name
}LookmlModelExploreAlias {
name (string, read-only): Name,
value (string, read-only): Value
}LookmlModelExploreAlwaysFilter {
name (string, read-only): Name,
value (string, read-only): Value
}LookmlModelExploreConditionallyFilter {
name (string, read-only): Name,
value (string, read-only): Value
}LookmlModelExploreSet {
name (string, read-only): Name,
value (Array[string], read-only): Value set
}LookmlModelExploreError {
message (string, read-only): Error Message,
details (string, read-only): Details,
error_pos (string, read-only): Error source location,
field_error (boolean, read-only): Is this a field error
}LookmlModelExploreFieldset {
dimensions (Array[LookmlModelExploreField], read-only): Array of dimensions,
measures (Array[LookmlModelExploreField], read-only): Array of measures,
filters (Array[LookmlModelExploreField], read-only): Array of filters,
parameters (Array[LookmlModelExploreField], read-only): Array of parameters
}LookmlModelExploreField {
align (string, read-only): The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: "left", "right".,
can_filter (boolean, read-only): Whether it's possible to filter on this field.,
category (string, read-only): Field category Valid values are: "parameter", "filter", "measure", "dimension".,
default_filter_value (string, read-only): The default value that this field uses when filtering. Null if there is no default value.,
description (string, read-only): Description,
dimension_group (string, read-only): Dimension group if this field is part of a dimension group. If not, this will be null.,
enumerations (Array[LookmlModelExploreFieldEnumeration], read-only): An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain.,
error (string, read-only): An error message indicating a problem with the definition of this field. If there are no errors, this will be null.,
field_group_label (string, read-only): A label creating a grouping of fields. All fields with this label should be presented together when displayed in a UI.,
field_group_variant (string, read-only): When presented in a field group via field_group_label, a shorter name of the field to be displayed in that context.,
fill_style (string, read-only): The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range".,
fiscal_month_offset (long, read-only): An offset (in months) from the calendar start month to the fiscal start month defined in the LookML model this field belongs to.,
has_allowed_values (boolean, read-only): Whether this field has a set of allowed_values specified in LookML.,
hidden (boolean, read-only): Whether this field should be hidden from the user interface.,
is_filter (boolean, read-only): Whether this field is a filter.,
is_fiscal (boolean, read-only): Whether this field represents a fiscal time value.,
is_numeric (boolean, read-only): Whether this field is of a type that represents a numeric value.,
is_timeframe (boolean, read-only): Whether this field is of a type that represents a time value.,
can_time_filter (boolean, read-only): Whether this field can be time filtered.,
time_interval (LookmlModelExploreFieldTimeInterval, read-only): Details on the time interval this field represents, if it is_timeframe.,
label (string, read-only): Fully-qualified human-readable label of the field.,
label_from_parameter (string, read-only): The name of the parameter that will provide a parameterized label for this field, if available in the current context.,
label_short (string, read-only): The human-readable label of the field, without the view label.,
lookml_link (string, read-only): A URL linking to the definition of this field in the LookML IDE.,
map_layer (LookmlModelExploreFieldMapLayer, read-only): If applicable, a map layer this field is associated with.,
measure (boolean, read-only): Whether this field is a measure.,
name (string, read-only): Fully-qualified name of the field.,
strict_value_format (boolean, read-only): If yes, the field will not be localized with the user attribute number_format. Defaults to no,
parameter (boolean, read-only): Whether this field is a parameter.,
permanent (boolean, read-only): Whether this field can be removed from a query.,
primary_key (boolean, read-only): Whether or not the field represents a primary key.,
project_name (string, read-only): The name of the project this field is defined in.,
requires_refresh_on_sort (boolean, read-only): When true, it's not possible to re-sort this field's values without re-running the SQL query, due to database logic that affects the sort.,
scope (string, read-only): The LookML scope this field belongs to. The scope is typically the field's view.,
sortable (boolean, read-only): Whether this field can be sorted.,
source_file (string, read-only): The path portion of source_file_path.,
source_file_path (string, read-only): The fully-qualified path of the project file this field is defined in.,
sql (string, read-only): SQL expression as defined in the LookML model. The SQL syntax shown here is a representation intended for auditability, and is not neccessarily an exact match for what will ultimately be run in the database. It may contain special LookML syntax or annotations that are not valid SQL. This will be null if the current user does not have the see_lookml permission for the field's model.,
sql_case (Array[LookmlModelExploreFieldSqlCase], read-only): An array of conditions and values that make up a SQL Case expression, as defined in the LookML model. The SQL syntax shown here is a representation intended for auditability, and is not neccessarily an exact match for what will ultimately be run in the database. It may contain special LookML syntax or annotations that are not valid SQL. This will be null if the current user does not have the see_lookml permission for the field's model.,
filters (Array[LookmlModelExploreFieldMeasureFilters], read-only): Array of filter conditions defined for the measure in LookML.,
suggest_dimension (string, read-only): The name of the dimension to base suggest queries from.,
suggest_explore (string, read-only): The name of the explore to base suggest queries from.,
suggestable (boolean, read-only): Whether or not suggestions are possible for this field.,
suggestions (Array[string], read-only): If available, a list of suggestions for this field. For most fields, a suggest query is a more appropriate way to get an up-to-date list of suggestions. Or use enumerations to list all the possible values.,
tags (Array[string], read-only): An array of arbitrary string tags provided in the model for this field.,
type (string, read-only): The LookML type of the field.,
user_attribute_filter_types (Array[string], read-only): An array of user attribute types that are allowed to be used in filters on this field. Valid values are: "advanced_filter_string", "advanced_filter_number", "advanced_filter_datetime", "string", "number", "datetime", "relative_url", "yesno", "zipcode".,
value_format (string, read-only): If specified, the LookML value format string for formatting values of this field.,
view (string, read-only): The name of the view this field belongs to.,
view_label (string, read-only): The human-readable label of the view the field belongs to.,
dynamic (boolean, read-only): Whether this field was specified in "dynamic_fields" and is not part of the model.,
week_start_day (string, read-only): The name of the starting day of the week. Valid values are: "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday".
}LookmlModelExploreFieldEnumeration {
label (string, read-only): Label,
value (string, read-only): Value
}LookmlModelExploreFieldTimeInterval {
name (string, read-only): The type of time interval this field represents a grouping of. Valid values are: "day", "hour", "minute", "second", "millisecond", "microsecond", "week", "month", "quarter", "year".,
count (long, read-only): The number of intervals this field represents a grouping of.
}LookmlModelExploreFieldMapLayer {
url (string, read-only): URL to the map layer resource.,
name (string, read-only): Name of the map layer, as defined in LookML.,
feature_key (string, read-only): Specifies the name of the TopoJSON object that the map layer references. If not specified, use the first object..,
property_key (string, read-only): Selects which property from the TopoJSON data to plot against. TopoJSON supports arbitrary metadata for each region. When null, the first matching property should be used.,
property_label_key (string, read-only): Which property from the TopoJSON data to use to label the region. When null, property_key should be used.,
projection (string, read-only): The preferred geographic projection of the map layer when displayed in a visualization that supports multiple geographic projections.,
format (string, read-only): Specifies the data format of the region information. Valid values are: "topojson", "vector_tile_region".,
extents_json_url (string, read-only): Specifies the URL to a JSON file that defines the geographic extents of each region available in the map layer. This data is used to automatically center the map on the available data for visualization purposes. The JSON file must be a JSON object where the keys are the mapping value of the feature (as specified by property_key) and the values are arrays of four numbers representing the west longitude, south latitude, east longitude, and north latitude extents of the region. The object must include a key for every possible value of property_key.,
max_zoom_level (long, read-only): The minimum zoom level that the map layer may be displayed at, for visualizations that support zooming.,
min_zoom_level (long, read-only): The maximum zoom level that the map layer may be displayed at, for visualizations that support zooming.
}LookmlModelExploreFieldSqlCase {
value (string, read-only): SQL Case label value,
condition (string, read-only): SQL Case condition expression
}LookmlModelExploreFieldMeasureFilters {
field (string, read-only): Filter field name,
condition (string, read-only): Filter condition value
}LookmlModelExploreJoins {
name (string, read-only): Name of this join (and name of the view to join),
dependent_fields (Array[string], read-only): Fields referenced by the join,
fields (Array[string], read-only): Fields of the joined view to pull into this explore,
foreign_key (string, read-only): Name of the dimension in this explore whose value is in the primary key of the joined view,
from (string, read-only): Name of view to join,
outer_only (boolean, read-only): Specifies whether all queries must use an outer join,
relationship (string, read-only): many_to_one, one_to_one, one_to_many, many_to_many,
required_joins (Array[string], read-only): Names of joins that must always be included in SQL queries,
sql_foreign_key (string, read-only): SQL expression that produces a foreign key,
sql_on (string, read-only): SQL ON expression describing the join condition,
sql_table_name (string, read-only): SQL table name to join,
type (string, read-only): The join type: left_outer, full_outer, inner, or cross,
view_label (string, read-only): Label to display in UI selectors
}LookmlModelExploreSupportedMeasureType {
dimension_type (string, read-only),
measure_types (Array[string], read-only)
}
Parameters
Parameter | Required? | Description | Parameter Type | Data Type |
---|---|---|---|---|
lookml_model_name | true | Name of lookml model. | string | string |
explore_name | true | Name of explore. | 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 }
|