All URIs are relative to /api/3.1
Method | HTTP request | Description |
---|---|---|
activeThemes | GET /themes/active | Get Active Themes |
allThemes | GET /themes | Get All Themes |
createTheme | POST /themes | Create Theme |
defaultTheme | GET /themes/default | Get Default Theme |
deleteTheme | DELETE /themes/{theme_id} | Delete Theme |
searchThemes | GET /themes/search | Search Themes |
setDefaultTheme | PUT /themes/default | Set Default Theme |
theme | GET /themes/{theme_id} | Get Theme |
themeOrDefault | GET /themes/theme_or_default | Get Theme or Default |
updateTheme | PATCH /themes/{theme_id} | Update Theme |
validateTheme | POST /themes/validate | Validate Theme |
[Theme] activeThemes(opts)
Get Active Themes
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'name': "name_example", // String | Name of theme
'ts': new Date("2013-10-20T19:20:30+01:00"), // Date | Timestamp representing the target datetime for the active period. Defaults to 'now'
'fields': "fields_example" // String | Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.activeThemes(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of theme | [optional] |
ts | Date | Timestamp representing the target datetime for the active period. Defaults to 'now' | [optional] |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Theme] allThemes(opts)
Get All Themes
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'fields': "fields_example" // String | Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.allThemes(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme createTheme(opts)
Create Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'body': new LookerApi31Reference.Theme() // Theme | Theme
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createTheme(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Theme | Theme | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme defaultTheme(opts)
Get Default Theme
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.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'ts': new Date("2013-10-20T19:20:30+01:00") // Date | Timestamp representing the target datetime for the active period. Defaults to 'now'
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.defaultTheme(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
ts | Date | Timestamp representing the target datetime for the active period. Defaults to 'now' | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
'String' deleteTheme(themeId)
Delete Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var themeId = "themeId_example"; // String | Id of theme
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.deleteTheme(themeId, callback);
Name | Type | Description | Notes |
---|---|---|---|
themeId | String | Id of theme |
'String'
No authorization required
- Content-Type: application/json
- Accept: application/json
[Theme] searchThemes(opts)
Search Themes
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'id': 789, // Number | Match theme id.
'name': "name_example", // String | Match theme name.
'beginAt': new Date("2013-10-20T19:20:30+01:00"), // Date | Timestamp for activation.
'endAt': new Date("2013-10-20T19:20:30+01:00"), // Date | Timestamp for expiration.
'limit': 789, // Number | Number of results to return (used with `offset`).
'offset': 789, // Number | Number of results to skip before returning any (used with `limit`).
'sorts': "sorts_example", // String | Fields to sort by.
'fields': "fields_example", // String | Requested fields.
'filterOr': true // Boolean | Combine given search criteria in a boolean OR expression
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.searchThemes(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | Match theme id. | [optional] |
name | String | Match theme name. | [optional] |
beginAt | Date | Timestamp for activation. | [optional] |
endAt | Date | Timestamp for expiration. | [optional] |
limit | Number | Number of results to return (used with `offset`). | [optional] |
offset | Number | Number of results to skip before returning any (used with `limit`). | [optional] |
sorts | String | Fields to sort by. | [optional] |
fields | String | Requested fields. | [optional] |
filterOr | Boolean | Combine given search criteria in a boolean OR expression | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme setDefaultTheme(name)
Set Default Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var name = "name_example"; // String | Name of theme to set as default
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.setDefaultTheme(name, callback);
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of theme to set as default |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme theme(themeId, opts)
Get Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var themeId = "themeId_example"; // String | Id of theme
var opts = {
'fields': "fields_example" // String | Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.theme(themeId, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
themeId | String | Id of theme | |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme themeOrDefault(name, opts)
Get Theme or Default
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var name = "name_example"; // String | Name of theme
var opts = {
'ts': new Date("2013-10-20T19:20:30+01:00") // Date | Timestamp representing the target datetime for the active period. Defaults to 'now'
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.themeOrDefault(name, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
name | String | Name of theme | |
ts | Date | Timestamp representing the target datetime for the active period. Defaults to 'now' | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Theme updateTheme(themeId, body)
Update Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var themeId = "themeId_example"; // String | Id of theme
var body = new LookerApi31Reference.Theme(); // Theme | Theme
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.updateTheme(themeId, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
themeId | String | Id of theme | |
body | Theme | Theme |
No authorization required
- Content-Type: application/json
- Accept: application/json
ValidationError validateTheme(opts)
Validate Theme
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 [email protected] to update your license for this feature.
var LookerApi31Reference = require('looker-node-api');
var apiInstance = new LookerApi31Reference.ThemeApi();
var opts = {
'body': new LookerApi31Reference.Theme() // Theme | Theme
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.validateTheme(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Theme | Theme | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json