Skip to main content

<a id=“SuperOffice_WebApi_Agents_DashAgent”></a> Class DashAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Agent that lets you configure dashboard tiles and retrieve dashboard data

Inheritance

objectAgentBaseDashAgent

Implements

IDashAgent, IAgentBase, IDisposable

Inherited Members

AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T&gt;(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Examples

<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (DashAgent agent = new DashAgent(mySession)) { // call methods on agent here… }</code></pre>

Constructors

<a id=“SuperOffice_WebApi_Agents_DashAgent__ctor_System_Net_Http_HttpClient_”></a> DashAgent(HttpClient)

Constructor: Agent that lets you configure dashboard tiles and retrieve dashboard data

Parameters

httpClient HttpClient Use this HTTP client instead of making own HttpClient instance.

<a id=“SuperOffice_WebApi_Agents_DashAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> DashAgent(WebApiOptions, HttpClient)

Constructor: Agent that lets you configure dashboard tiles and retrieve dashboard data

Parameters

options WebApiOptions Base URL and authentication values. httpClient HttpClient Optional: Use this HTTP client instead of making a new one.

Methods

<a id=“SuperOffice_WebApi_Agents_DashAgent_AddNewTileToDashboardAsync_System_Int32_SuperOffice_WebApi_Data_DashTileDefinition_SuperOffice_WebApi_RequestOptions_”></a> AddNewTileToDashboardAsync(int, DashTileDefinition, RequestOptions)

Add a new tile to a dashboard with next rank

Parameters

dashboardId int The id of the dashboard to add the tile to dashTileDefinition DashTileDefinition The tile definition data to add to the dashboard requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; The newly added tile

<a id=“SuperOffice_WebApi_Agents_DashAgent_AddTileToDashboardAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> AddTileToDashboardAsync(int, int, RequestOptions)

Add a tile to a dashboard with next rank

Parameters

dashboardId int The id of the dashboard to add the tile to dashTileDefinitionId int The id of the dashboard tile definition requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; The newly added tile

<a id=“SuperOffice_WebApi_Agents_DashAgent_CopyTileSelectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CopyTileSelectionAsync(int, RequestOptions)

Copy Tile Selection for the dashboard

Parameters

selectionId int The id of the selection to copy from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Selection Id

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDashTileSelectionFromEntityAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateDashTileSelectionFromEntityAsync(string, RequestOptions)

Returns the id to a dashboard tile selection

Parameters

entityName string The name of the entity to create a default selection for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Selection Id

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultDashAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDashAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Dash&gt; A blank Dash

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultDashCollectionAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDashCollectionAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashCollection&gt; A blank DashCollection

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultDashThemeAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDashThemeAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTheme&gt; A blank DashTheme

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultDashTileAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDashTileAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; A blank DashTile

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultDashTileDefinitionAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDashTileDefinitionAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileDefinition&gt; A blank DashTileDefinition

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultPreviewDashAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultPreviewDashAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PreviewDash&gt; A blank PreviewDash

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultPreviewDashTileAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultPreviewDashTileAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PreviewDashTile&gt; A blank PreviewDashTile

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultTileDefinitionForEntityAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultTileDefinitionForEntityAsync(string, RequestOptions)

Set Measure to CountAll and MeasureField to primary key field

Parameters

entityName string Name of entity to use for primary key requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileDefinition&gt; Default

<a id=“SuperOffice_WebApi_Agents_DashAgent_CreateDefaultTileForEntityAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultTileForEntityAsync(string, RequestOptions)

Set Measure to CountAll and MeasureField to primary key field

Parameters

entityName string Name of entity to use for primary key requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; Default

<a id=“SuperOffice_WebApi_Agents_DashAgent_DeleteDashAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteDashAsync(int, RequestOptions)

Deletes the Dash

Parameters

dashId int The identity of the Dash requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_DashAgent_DeleteDashThemeAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteDashThemeAsync(int, RequestOptions)

Deletes the DashTheme

Parameters

dashThemeId int The identity of the DashTheme requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_DashAgent_DeleteDashTileAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteDashTileAsync(int, RequestOptions)

Deletes the DashTile

Parameters

dashTileId int The identity of the DashTile requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_DashAgent_DeleteDashTileDefinitionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteDashTileDefinitionAsync(int, RequestOptions)

Deletes the DashTileDefinition

Parameters

dashTileDefinitionId int The identity of the DashTileDefinition requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_DashAgent_DuplicateDashboardAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> DuplicateDashboardAsync(int, string, RequestOptions)

Duplicate for the dashboard and all the sub elements

Parameters

dashboardId int The id of the dashboard to add the tile to name string The name of the new dashboard requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Dash&gt; New dashboard

<a id=“SuperOffice_WebApi_Agents_DashAgent_DuplicateTileAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> DuplicateTileAsync(int, string, RequestOptions)

Duplicate for the tile and all the sub elements

Parameters

dashTileId int The id of the tile to copy name string The name of the new tile requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; New tile

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashAsync(int, RequestOptions)

Gets a specific Dash object.

Parameters

dashId int The identifier of the Dash object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Dash&gt; Dash

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashCollectionAsync_SuperOffice_WebApi_RequestOptions_”></a> GetDashCollectionAsync(RequestOptions)

Gets a collection of dashboards for the current associate

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashCollection&gt; Dashboard collection

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashListAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> GetDashListAsync(int[], RequestOptions)

Gets the ordered list of dashboards

Parameters

dashboards int[] List of dashboardIds requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Dash[]&gt; List of dashboards

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashQuickFiltersAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashQuickFiltersAsync(int, RequestOptions)

Gets the quick filters for this dashboard

Parameters

dashboardId int The id of the dashboard to get the quick filters for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuickFilterInfo[]&gt; List of quick filters for the given dashboard

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashThemeAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashThemeAsync(int, RequestOptions)

Gets a specific DashTheme object.

Parameters

dashThemeId int The identifier of the DashTheme object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTheme&gt; DashTheme

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashTileAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashTileAsync(int, RequestOptions)

Gets a specific DashTile object.

Parameters

dashTileId int The identifier of the DashTile object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; DashTile

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashTileDefinitionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashTileDefinitionAsync(int, RequestOptions)

Gets a specific DashTileDefinition object.

Parameters

dashTileDefinitionId int The identifier of the DashTileDefinition object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileDefinition&gt; DashTileDefinition

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashTileHtmlAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetDashTileHtmlAsync(int, string, RequestOptions)

Get HTML for a dashboard tile definition with TileType = HTML

Parameters

dashboardTileDefinitionId int The id of the dashboard tile definition languageCode string Preferred language code. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileHtml&gt; HTML data

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashTileHtmlListAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashTileHtmlListAsync(int, RequestOptions)

Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.

Parameters

dashboardTileDefinitionId int The id of the dashboard tile definition requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileHtml[]&gt;

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashTilesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDashTilesAsync(int, RequestOptions)

Gets the ordered list of tiles for a dashboard

Parameters

dashboardId int The id of the dashboard requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile[]&gt; Ordered list of dashboard tiles

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetDashboardFencingInfoAsync_SuperOffice_WebApi_RequestOptions_”></a> GetDashboardFencingInfoAsync(RequestOptions)

Get the current dashboard fencing status for the tenant

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FencingInfo&gt; Current fencing status including count, maximum, and warning state

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetPossibleDashQuickFiltersAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetPossibleDashQuickFiltersAsync(int, RequestOptions)

Gets the possible (not stored/selected) quick filters for this dashboard

Parameters

dashboardId int The id of the dashboard to get the possible quick filters for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuickFilterInfo[]&gt; List of possible quick filters for the given dashboard

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetPreviewDashAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetPreviewDashAsync(int, RequestOptions)

Get a dashboard from its id

Parameters

dashboardId int Dashboard ID requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PreviewDash&gt; Dashboard suitable for preview

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetSecondaryTempTileSelectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetSecondaryTempTileSelectionAsync(int, RequestOptions)

Copy selection to secondary temporary personal tile selection

Parameters

selectionId int The id of the selection to copy from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Selection Id

<a id=“SuperOffice_WebApi_Agents_DashAgent_GetTempTileSelectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetTempTileSelectionAsync(int, RequestOptions)

Copy selection to temporary personal tile selection

Parameters

selectionId int The id of the selection to copy from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Selection Id

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashAsync_SuperOffice_WebApi_Data_Dash_SuperOffice_WebApi_RequestOptions_”></a> SaveDashAsync(Dash, RequestOptions)

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

Parameters

dash Dash The Dash that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Dash&gt; New or updated Dash

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashQuickFiltersAsync_System_Int32_SuperOffice_WebApi_Data_QuickFilterInfo___SuperOffice_WebApi_RequestOptions_”></a> SaveDashQuickFiltersAsync(int, QuickFilterInfo[], RequestOptions)

Saves the quick filters for this dashboard

Parameters

dashboardId int The id of the dashboard these quick filters are associated with quickFilters QuickFilterInfo[] Complete list of quick filters for the given dashboard, overwriting the existing list requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuickFilterInfo[]&gt; List of saved quick filters for the given dashboard

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashThemeAsync_SuperOffice_WebApi_Data_DashTheme_SuperOffice_WebApi_RequestOptions_”></a> SaveDashThemeAsync(DashTheme, RequestOptions)

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

Parameters

dashTheme DashTheme The DashTheme that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTheme&gt; New or updated DashTheme

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashTileAsync_SuperOffice_WebApi_Data_DashTile_SuperOffice_WebApi_RequestOptions_”></a> SaveDashTileAsync(DashTile, RequestOptions)

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

Parameters

dashTile DashTile The DashTile that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTile&gt; New or updated DashTile

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashTileDefinitionAsync_SuperOffice_WebApi_Data_DashTileDefinition_SuperOffice_WebApi_RequestOptions_”></a> SaveDashTileDefinitionAsync(DashTileDefinition, RequestOptions)

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

Parameters

dashTileDefinition DashTileDefinition The DashTileDefinition that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileDefinition&gt; New or updated DashTileDefinition

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashTileHtmlListAsync_System_Int32_SuperOffice_WebApi_Data_DashTileHtml___SuperOffice_WebApi_RequestOptions_”></a> SaveDashTileHtmlListAsync(int, DashTileHtml[], RequestOptions)

Set the HTML data for a tile with TileType = HTML.

Parameters

dashboardTileDefinitionId int The id of the dashboard tile definition languages DashTileHtml[] List of HTML content per language requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DashTileHtml[]&gt;

<a id=“SuperOffice_WebApi_Agents_DashAgent_SaveDashTilesAsync_System_Int32_SuperOffice_WebApi_Data_DashTile___SuperOffice_WebApi_RequestOptions_”></a> SaveDashTilesAsync(int, DashTile[], RequestOptions)

Saves the ordered list of tiles for a dashboard

Parameters

dashboardId int The id of the dashboard dashTiles DashTile[] The tiles in order requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task