# DashboardsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createDashboard**](#createdashboard) | **POST** /dashboards | Create a dashboard|
|[**deleteDashboard**](#deletedashboard) | **DELETE** /dashboards/{dashboardId} | Delete a dashboard|
|[**getDashboard**](#getdashboard) | **GET** /dashboards/{dashboardId} | Get a dashboard|
|[**getDashboards**](#getdashboards) | **GET** /dashboards | List dashboards|
|[**updateDashboard**](#updatedashboard) | **PUT** /dashboards/{dashboardId} | Update a dashboard|

# **createDashboard**
> CreateDashboard200Response createDashboard(dashboardCreateInputs)

Creates a new analytics dashboard for the organization, optionally scoped to a specific event, and requires create permission on dashboards.

### Example

```typescript
import {
    DashboardsApi,
    Configuration,
    DashboardCreateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new DashboardsApi(configuration);

let dashboardCreateInputs: DashboardCreateInputs; //

const { status, data } = await apiInstance.createDashboard(
    dashboardCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **dashboardCreateInputs** | **DashboardCreateInputs**|  | |


### Return type

**CreateDashboard200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteDashboard**
> SyncAccounts200Response deleteDashboard()

Permanently deletes an analytics dashboard, including its widgets, and requires delete permission on dashboards.

### Example

```typescript
import {
    DashboardsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new DashboardsApi(configuration);

let dashboardId: string; //The dashboard identifier (default to undefined)

const { status, data } = await apiInstance.deleteDashboard(
    dashboardId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **dashboardId** | [**string**] | The dashboard identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getDashboard**
> CreateDashboard200Response getDashboard()

Returns a single dashboard by ID, including its configuration; requires read permission on dashboards.

### Example

```typescript
import {
    DashboardsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new DashboardsApi(configuration);

let dashboardId: string; //The dashboard identifier (default to undefined)

const { status, data } = await apiInstance.getDashboard(
    dashboardId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **dashboardId** | [**string**] | The dashboard identifier | defaults to undefined|


### Return type

**CreateDashboard200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getDashboards**
> GetDashboards200Response getDashboards()

Returns a paginated list of the organization\'s dashboards, optionally filtered to those belonging to a specific event; requires read permission on dashboards.

### Example

```typescript
import {
    DashboardsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new DashboardsApi(configuration);

let eventId: string; //Filter by eventId (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getDashboards(
    eventId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **eventId** | [**string**] | Filter by eventId | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetDashboards200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateDashboard**
> CreateDashboard200Response updateDashboard(dashboardUpdateInputs)

Updates properties of an existing analytics dashboard, such as its name, and requires update permission on dashboards.

### Example

```typescript
import {
    DashboardsApi,
    Configuration,
    DashboardUpdateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new DashboardsApi(configuration);

let dashboardId: string; //The dashboard identifier (default to undefined)
let dashboardUpdateInputs: DashboardUpdateInputs; //

const { status, data } = await apiInstance.updateDashboard(
    dashboardId,
    dashboardUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **dashboardUpdateInputs** | **DashboardUpdateInputs**|  | |
| **dashboardId** | [**string**] | The dashboard identifier | defaults to undefined|


### Return type

**CreateDashboard200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

