# LookerApi30Reference.DashboardApi

All URIs are relative to *https://newwave.looker.com:19999/api/3.0*

Method | HTTP request | Description
------------- | ------------- | -------------
[**allDashboards**](DashboardApi.md#allDashboards) | **GET** /dashboards | Get All Dashboards
[**createDashboard**](DashboardApi.md#createDashboard) | **POST** /dashboards | Create Dashboard
[**createDashboardPrefetch**](DashboardApi.md#createDashboardPrefetch) | **POST** /dashboards/{dashboard_id}/prefetch | Create Dashboard Prefetch
[**dashboard**](DashboardApi.md#dashboard) | **GET** /dashboards/{dashboard_id} | Get Dashboard
[**dashboardPrefetch**](DashboardApi.md#dashboardPrefetch) | **GET** /dashboards/{dashboard_id}/prefetch | Get Dashboard Prefetch
[**deleteDashboard**](DashboardApi.md#deleteDashboard) | **DELETE** /dashboards/{dashboard_id} | Delete Dashboard
[**importLookmlDashboard**](DashboardApi.md#importLookmlDashboard) | **POST** /dashboards/{lookml_dashboard_id}/import/{space_id} | Import LookML Dashboard
[**searchDashboards**](DashboardApi.md#searchDashboards) | **GET** /dashboards/search | Search Dashboards
[**syncLookmlDashboard**](DashboardApi.md#syncLookmlDashboard) | **PATCH** /dashboards/{lookml_dashboard_id}/sync | Sync LookML Dashboard
[**updateDashboard**](DashboardApi.md#updateDashboard) | **PATCH** /dashboards/{dashboard_id} | Update Dashboard


<a name="allDashboards"></a>
# **allDashboards**
> [DashboardBase] allDashboards(opts)

Get All Dashboards

### Get information about all active dashboards.  Returns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list.  Get the **full details** of a specific dashboard by id with [Dashboard](#!/Dashboard/dashboard)  Find **deleted dashboards** with [Search Dashboards](#!/Dashboard/search_dashboards) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

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.allDashboards(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | **String**| Requested fields. | [optional] 

### Return type

[**[DashboardBase]**](DashboardBase.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="createDashboard"></a>
# **createDashboard**
> Dashboard createDashboard(opts)

Create Dashboard

### Create a dashboard with the specified information  Creates a new dashboard object, returning the dashboard details, including the created id.  **Update** an existing dashboard with [Update Dashboard](#!/Dashboard/update_dashboard)  **Permanently delete** an existing dashboard with [Delete Dashboard](#!/Dashboard/delete_dashboard) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var opts = { 
  'body': new LookerApi30Reference.Dashboard() // Dashboard | Dashboard
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createDashboard(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Dashboard**](Dashboard.md)| Dashboard | [optional] 

### Return type

[**Dashboard**](Dashboard.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="createDashboardPrefetch"></a>
# **createDashboardPrefetch**
> PrefetchDashboardRequest createDashboardPrefetch(dashboardId, opts)

Create Dashboard Prefetch

### Create a prefetch for a dashboard with the specified information.  **Deprecated** Use [DataGroups](#!/3.1/Datagroup) to manage cache invalidation of groups of queries. 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var dashboardId = "dashboardId_example"; // String | Id of dashboard

var opts = { 
  'body': new LookerApi30Reference.PrefetchDashboardRequest() // PrefetchDashboardRequest | Parameters for prefetch request
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createDashboardPrefetch(dashboardId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dashboardId** | **String**| Id of dashboard | 
 **body** | [**PrefetchDashboardRequest**](PrefetchDashboardRequest.md)| Parameters for prefetch request | [optional] 

### Return type

[**PrefetchDashboardRequest**](PrefetchDashboardRequest.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="dashboard"></a>
# **dashboard**
> Dashboard dashboard(dashboardId, opts)

Get Dashboard

### Get information about the dashboard with the specified id  Returns the full details of the identified dashboard object  Get a **summary list** of all active dashboards with [All Dashboards](#!/Dashboard/all_dashboards)  **Search** for dashboards with [Search Dashboards](#!/Dashboard/search_dashboards) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var dashboardId = "dashboardId_example"; // String | Id of dashboard

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.dashboard(dashboardId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dashboardId** | **String**| Id of dashboard | 
 **fields** | **String**| Requested fields. | [optional] 

### Return type

[**Dashboard**](Dashboard.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="dashboardPrefetch"></a>
# **dashboardPrefetch**
> Prefetch dashboardPrefetch(dashboardId, opts)

Get Dashboard Prefetch

### Get a prefetch for a dashboard with the specified information.  **Deprecated** Use [DataGroups](#!/3.1/Datagroup) to manage cache invalidation of groups of queries. 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var dashboardId = "dashboardId_example"; // String | Id of dashboard

var opts = { 
  'dashboardFilters': [new LookerApi30Reference.PrefetchDashboardFilterValue()] // [PrefetchDashboardFilterValue] | JSON encoded string of Dashboard filters that were applied to prefetch
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.dashboardPrefetch(dashboardId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dashboardId** | **String**| Id of dashboard | 
 **dashboardFilters** | [**[PrefetchDashboardFilterValue]**](PrefetchDashboardFilterValue.md)| JSON encoded string of Dashboard filters that were applied to prefetch | [optional] 

### Return type

[**Prefetch**](Prefetch.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="deleteDashboard"></a>
# **deleteDashboard**
> &#39;String&#39; deleteDashboard(dashboardId)

Delete Dashboard

### Delete the dashboard with the specified id  Permanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.)  \&quot;Soft\&quot; delete or hide a dashboard by setting its &#x60;deleted&#x60; status to &#x60;True&#x60; with [Update Dashboard](#!/Dashboard/update_dashboard).  Note: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired. 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var dashboardId = "dashboardId_example"; // String | Id of dashboard


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteDashboard(dashboardId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dashboardId** | **String**| Id of dashboard | 

### Return type

**&#39;String&#39;**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="importLookmlDashboard"></a>
# **importLookmlDashboard**
> Dashboard importLookmlDashboard(lookmlDashboardId, spaceId, opts)

Import LookML Dashboard

### Import a LookML dashboard to a space as a UDD Creates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard and puts it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard.  To give the imported dashboard specify a (e.g. title: \&quot;my title\&quot;) in the body of your request, otherwise the imported dashboard will have the same title as the original LookML dashboard.  For this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to create content in the space the dashboard is being imported to.  **Sync** a linked UDD with [Sync LookML Dashboard] (#!/Dashboard/sync_lookml_dashboard) **Unlink** a linked UDD by setting lookml_link_id to null with [Update Dashboard](#!/Dashboard/update_dashboard) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var lookmlDashboardId = "lookmlDashboardId_example"; // String | Id of LookML dashboard

var spaceId = "spaceId_example"; // String | Id of space to import the dashboard to

var opts = { 
  'body': new LookerApi30Reference.Dashboard(), // Dashboard | Dashboard
  'rawLocale': true // Boolean | If true, and this dashboard is localized, export it with the raw keys, not localized.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.importLookmlDashboard(lookmlDashboardId, spaceId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lookmlDashboardId** | **String**| Id of LookML dashboard | 
 **spaceId** | **String**| Id of space to import the dashboard to | 
 **body** | [**Dashboard**](Dashboard.md)| Dashboard | [optional] 
 **rawLocale** | **Boolean**| If true, and this dashboard is localized, export it with the raw keys, not localized. | [optional] 

### Return type

[**Dashboard**](Dashboard.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="searchDashboards"></a>
# **searchDashboards**
> [Dashboard] searchDashboards(opts)

Search Dashboards

### Search all dashboards for matching criteria.  Returns an **array of dashboard objects** that match the specified search criteria.  The parameters &#x60;limit&#x60;, and &#x60;offset&#x60; are recommended for \&quot;paging\&quot; the returned results.  Get a **single dashboard** by id with [Dashboard](#!/Dashboard/dashboard) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var opts = { 
  'fields': "fields_example", // String | Requested fields.
  'id': 789, // Number | Match dashboard id.
  'slug': "slug_example", // String | Match dashboard slug.
  'page': 789, // Number | Requested page.
  'perPage': 789, // Number | Results per page.
  'limit': 789, // Number | Number of results to return. (used with offset and takes priority over page and per_page)
  'offset': 789, // Number | Number of results to skip before returning any. (used with limit and takes priority over page and per_page)
  'sorts': "sorts_example", // String | Fields to sort by.
  'title': "title_example", // String | Match Dashboard title.
  'description': "description_example", // String | Match Dashboard description.
  'contentFavoriteId': 789, // Number | Filter on a content favorite id.
  'spaceId': "spaceId_example", // String | Filter on a particular space.
  'deleted': "deleted_example", // String | Filter on dashboards deleted status.
  'userId': "userId_example", // String | Filter on dashboards created by a particular user.
  'viewCount': "viewCount_example" // String | Filter on a particular value of view_count
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.searchDashboards(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fields** | **String**| Requested fields. | [optional] 
 **id** | **Number**| Match dashboard id. | [optional] 
 **slug** | **String**| Match dashboard slug. | [optional] 
 **page** | **Number**| Requested page. | [optional] 
 **perPage** | **Number**| Results per page. | [optional] 
 **limit** | **Number**| Number of results to return. (used with offset and takes priority over page and per_page) | [optional] 
 **offset** | **Number**| Number of results to skip before returning any. (used with limit and takes priority over page and per_page) | [optional] 
 **sorts** | **String**| Fields to sort by. | [optional] 
 **title** | **String**| Match Dashboard title. | [optional] 
 **description** | **String**| Match Dashboard description. | [optional] 
 **contentFavoriteId** | **Number**| Filter on a content favorite id. | [optional] 
 **spaceId** | **String**| Filter on a particular space. | [optional] 
 **deleted** | **String**| Filter on dashboards deleted status. | [optional] 
 **userId** | **String**| Filter on dashboards created by a particular user. | [optional] 
 **viewCount** | **String**| Filter on a particular value of view_count | [optional] 

### Return type

[**[Dashboard]**](Dashboard.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="syncLookmlDashboard"></a>
# **syncLookmlDashboard**
> [&#39;Number&#39;] syncLookmlDashboard(lookmlDashboardId, body, opts)

Sync LookML Dashboard

### Update all linked dashboards to match the specified LookML dashboard.  Any UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a lookml_link_id which specifies the LookML dashboard&#39;s id will be updated so that it matches the current state of the LookML dashboard.  For this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards that the user has permission to update will be synced.  To **link** or **unlink** a UDD set the lookml_link_id with [Update Dashboard](#!/Dashboard/update_dashboard) 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var lookmlDashboardId = "lookmlDashboardId_example"; // String | Id of LookML dashboard

var body = new LookerApi30Reference.Dashboard(); // Dashboard | Dashboard

var opts = { 
  'rawLocale': true // Boolean | If true, and this dashboard is localized, export it with the raw keys, not localized.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.syncLookmlDashboard(lookmlDashboardId, body, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **lookmlDashboardId** | **String**| Id of LookML dashboard | 
 **body** | [**Dashboard**](Dashboard.md)| Dashboard | 
 **rawLocale** | **Boolean**| If true, and this dashboard is localized, export it with the raw keys, not localized. | [optional] 

### Return type

**[&#39;Number&#39;]**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="updateDashboard"></a>
# **updateDashboard**
> Dashboard updateDashboard(dashboardId, body)

Update Dashboard

### Update the dashboard with the specified id  Changes simple (scalar) properties of the dashboard. 

### Example
```javascript
var LookerApi30Reference = require('looker_api_30_reference');

var apiInstance = new LookerApi30Reference.DashboardApi();

var dashboardId = "dashboardId_example"; // String | Id of dashboard

var body = new LookerApi30Reference.Dashboard(); // Dashboard | Dashboard


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateDashboard(dashboardId, body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dashboardId** | **String**| Id of dashboard | 
 **body** | [**Dashboard**](Dashboard.md)| Dashboard | 

### Return type

[**Dashboard**](Dashboard.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

