> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.IDashboardAgent

# \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent">\</a> Interface IDashboardAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

Agent lets you configure dashboard tiles and retrieve dashboard data

```csharp theme={null}
[Obsolete("This API is not available from Netserver version 11. If you use this client package to access on-prem Netserver versions before 11 you should disable this warning.", false)]
public interface IDashboardAgent : IDisposable
```

#### Implements

[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_CreateDefaultDashboardAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultDashboardAsync(RequestOptions)

Set default values into a new Dashboard.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<Dashboard> CreateDefaultDashboardAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Dashboard](SuperOffice.WebApi.Data.Dashboard.md)\&gt;

A blank Dashboard

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_CreateDefaultDashboardTileAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultDashboardTileAsync(RequestOptions)

Set default values into a new DashboardTile.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<DashboardTile> CreateDefaultDashboardTileAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\&gt;

A blank DashboardTile

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_CreateNewFromTemplateAsync\_System\_Int32\_System\_String\_System\_String\_System\_Int32\_SuperOffice\_WebApi\_Data\_VisibleFor\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateNewFromTemplateAsync(int, string, string, int, VisibleFor\[], RequestOptions)

Create new tile from another tile used as template

```csharp theme={null}
Task<DashboardTile> CreateNewFromTemplateAsync(int dashboardTileId, string caption, string description, int selectionId, VisibleFor[] visibleFor, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Tile template Id

`caption` [string](https://learn.microsoft.com/dotnet/api/system.string)

Caption of new tile

`description` [string](https://learn.microsoft.com/dotnet/api/system.string)

Description of new tile

`selectionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Selection id of new tile

`visibleFor` [VisibleFor](SuperOffice.WebApi.Data.VisibleFor.md)\[]

Who the tile should be visible for

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\&gt;

The new tile

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_DeleteDashboardAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteDashboardAsync(int, RequestOptions)

Deletes the Dashboard

```csharp theme={null}
Task DeleteDashboardAsync(int dashboardId, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the Dashboard

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_DeleteDashboardTileAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteDashboardTileAsync(int, RequestOptions)

Deletes the DashboardTile

```csharp theme={null}
Task DeleteDashboardTileAsync(int dashboardTileId, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the DashboardTile

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDashboardAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDashboardAsync(int, RequestOptions)

Gets a specific Dashboard object.

```csharp theme={null}
Task<Dashboard> GetDashboardAsync(int dashboardId, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the Dashboard object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Dashboard](SuperOffice.WebApi.Data.Dashboard.md)\&gt;

Dashboard

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDashboardTileAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDashboardTileAsync(int, RequestOptions)

Gets a specific DashboardTile object.

```csharp theme={null}
Task<DashboardTile> GetDashboardTileAsync(int dashboardTileId, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the DashboardTile object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\&gt;

DashboardTile

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDashboardTilesAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDashboardTilesAsync(int\[], RequestOptions)

Gets an array of dashboard tiles for the provided ids

```csharp theme={null}
Task<DashboardTile[]> GetDashboardTilesAsync(int[] dashboardTileIds, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The ids of the tiles to get

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\[]\&gt;

Dashboard tiles

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDashboardsAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDashboardsAsync(int, RequestOptions)

Gets all dashboards for an associate

```csharp theme={null}
Task<Dashboard[]> GetDashboardsAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

`associateId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Associate Id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Dashboard](SuperOffice.WebApi.Data.Dashboard.md)\[]\&gt;

All the users dashboards

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDataAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDataAsync(int, string, RequestOptions)

Get data for this tile

```csharp theme={null}
Task<TileData[]> GetDataAsync(int dashboardTileId, string restrictions, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Tile Id

`restrictions` [string](https://learn.microsoft.com/dotnet/api/system.string)

Replacement restrictions

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TileData](SuperOffice.WebApi.Data.TileData.md)\[]\&gt;

The data

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetDataWithSelectionAsync\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDataWithSelectionAsync(int, int, string, RequestOptions)

Get data for this tile

```csharp theme={null}
Task<TileData[]> GetDataWithSelectionAsync(int dashboardTileId, int selectionId, string restrictions, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Tile Id

`selectionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Selection Id

`restrictions` [string](https://learn.microsoft.com/dotnet/api/system.string)

Replacement restrictions

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TileData](SuperOffice.WebApi.Data.TileData.md)\[]\&gt;

The data

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_GetStandardDashboardTileFromChartIdAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetStandardDashboardTileFromChartIdAsync(string, RequestOptions)

Gets the standard tile (not personal tile) corresponding to the given chart id

```csharp theme={null}
Task<DashboardTile> GetStandardDashboardTileFromChartIdAsync(string chartId, RequestOptions requestOptions = null)
```

#### Parameters

`chartId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The ChartId of the wanted chart/tile

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\&gt;

Standard tile

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_SaveDashboardAsync\_SuperOffice\_WebApi\_Data\_Dashboard\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveDashboardAsync(Dashboard, RequestOptions)

Updates the existing Dashboard or creates a new Dashboard if the id parameter is 0.

```csharp theme={null}
Task<Dashboard> SaveDashboardAsync(Dashboard dashboard, RequestOptions requestOptions = null)
```

#### Parameters

`dashboard` [Dashboard](SuperOffice.WebApi.Data.Dashboard.md)

The Dashboard that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Dashboard](SuperOffice.WebApi.Data.Dashboard.md)\&gt;

New or updated Dashboard

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_SaveDashboardTileAsync\_SuperOffice\_WebApi\_Data\_DashboardTile\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveDashboardTileAsync(DashboardTile, RequestOptions)

Updates the existing DashboardTile or creates a new DashboardTile if the id parameter is 0.

```csharp theme={null}
Task<DashboardTile> SaveDashboardTileAsync(DashboardTile dashboardTile, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardTile` [DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)

The DashboardTile that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DashboardTile](SuperOffice.WebApi.Data.DashboardTile.md)\&gt;

New or updated DashboardTile

### \<a id="SuperOffice\_WebApi\_Agents\_IDashboardAgent\_SetTileAsync\_System\_Int32\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetTileAsync(int, int, int, RequestOptions)

Sets tile in the given dashboard position

```csharp theme={null}
Task<Dashboard> SetTileAsync(int dashboardId, int tileId, int position, RequestOptions requestOptions = null)
```

#### Parameters

`dashboardId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Dashboard Id

`tileId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Tile Id

`position` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Tile position in the dashboard

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Dashboard](SuperOffice.WebApi.Data.Dashboard.md)\&gt;

The new dashboard is returned after the tile change


## Related topics

- [SuperOffice.WebApi.Agents.DashboardAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.DashboardAgent.md)
- [SuperOffice.WebApi.Agents](/en/api/reference/webapi/SuperOffice.WebApi.Agents.md)
- [SuperOffice.WebApi.Data.Dashboard](/en/api/reference/webapi/SuperOffice.WebApi.Data.Dashboard.md)
- [SuperOffice.WebApi.Agents.IDashAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IDashAgent.md)
- [SuperOffice.WebApi.Agents.DashAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.DashAgent.md)
- [SuperOffice.WebApi.Data.DashboardTile](/en/api/reference/webapi/SuperOffice.WebApi.Data.DashboardTile.md)
