> ## 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.ViewStateAgent

# \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent">\</a> Class ViewStateAgent

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

User interface view state, history, currentXXX values

```csharp theme={null}
public class ViewStateAgent : AgentBase, IViewStateAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](SuperOffice.WebApi.Agents.AgentBase.md) ←
[ViewStateAgent](SuperOffice.WebApi.Agents.ViewStateAgent.md)

#### Implements

[IViewStateAgent](SuperOffice.WebApi.Agents.IViewStateAgent.md),
[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

#### Inherited Members

[AgentBase.\_json](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (ViewStateAgent agent = new ViewStateAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_\_ctor\_System\_Net\_Http\_HttpClient\_">\</a> ViewStateAgent(HttpClient)

Constructor: User interface view state, history, currentXXX values

```csharp theme={null}
public ViewStateAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> ViewStateAgent(WebApiOptions, HttpClient)

Constructor: User interface view state, history, currentXXX values

```csharp theme={null}
public ViewStateAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

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

Deletes the history element

```csharp theme={null}
public Task DeleteHistoryAsync(string historyName, int id, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the history list, e.g. contact, project

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

Id of the history element, e.g. Contact 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)

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetCurrentAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetCurrentAsync(string, RequestOptions)

Get the current (most recent) value of the history list. This is the item with rank = 1. If no item exists a default value is returned. This is usually the first item in the table representing the history list.

```csharp theme={null}
public Task<History> GetCurrentAsync(string historyName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the history list, e.g. contact, project

`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)\<[History](SuperOffice.WebApi.Data.History.md)\&gt;

The current (most recent) history item

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoriesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoriesAsync(RequestOptions)

Returns all history items that belong to the currently logged in user

```csharp theme={null}
public Task<History[]> GetHistoriesAsync(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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

Array of History items

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoriesByNameAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoriesByNameAsync(string, RequestOptions)

Returns the named history list that belong to the currently logged in user

```csharp theme={null}
public Task<History[]> GetHistoriesByNameAsync(string historyName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the history list

`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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

Array of History items

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoriesByNamesAndIdsAsync\_SuperOffice\_WebApi\_Data\_HistoryRequest\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoriesByNamesAndIdsAsync(HistoryRequest\[], RequestOptions)

Returns history data for the named entities and the given ids - which may not directly correspond to the current history records in the database.\<para/>Use this method if you know exactly which items you need, regardless of whether they are in the current history or not.\<para/>The history in the database is not changed or even looked at by this method.

```csharp theme={null}
public Task<History[]> GetHistoriesByNamesAndIdsAsync(HistoryRequest[] requests, RequestOptions requestOptions = null)
```

#### Parameters

`requests` [HistoryRequest](SuperOffice.WebApi.Data.HistoryRequest.md)\[]

Array of request objects that define what entities we are requesting history information 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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

On history item for each history name/id pair specified, in exactly the same order as specified.\<para/>If a specified item cannot be found in the database, its Id will be 0 and its name will be blank in the return array.

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoriesByNamesAsync\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoriesByNamesAsync(string\[], RequestOptions)

Returns the named history lists that belong to the currently logged in user

```csharp theme={null}
public Task<History[]> GetHistoriesByNamesAsync(string[] historyNames, RequestOptions requestOptions = null)
```

#### Parameters

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

String array of list names

`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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

Array of History items

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoryAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoryAsync(int, RequestOptions)

Gets a specific History object.

```csharp theme={null}
public Task<History> GetHistoryAsync(int historyId, RequestOptions requestOptions = null)
```

#### Parameters

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

The identifier of the History 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)\<[History](SuperOffice.WebApi.Data.History.md)\&gt;

History

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetHistoryLengthPrefValueAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetHistoryLengthPrefValueAsync(RequestOptions)

Get the logged on user's preferred history list length. Will return the system preference if no user preferences are available.

```csharp theme={null}
public Task<int> GetHistoryLengthPrefValueAsync(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)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

The history list lenght

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_GetLiveUiConfigAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLiveUiConfigAsync(RequestOptions)

Gets live UI configuration

```csharp theme={null}
public Task<LiveUiConfig> GetLiveUiConfigAsync(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)\<[LiveUiConfig](SuperOffice.WebApi.Data.LiveUiConfig.md)\&gt;

Live UI configuration containing the parameters needed for live UI functionality

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

Returns the next current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.

```csharp theme={null}
public Task<History> GetNextCurrentAsync(string historyName, int id, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the history list, e.g. contact, project

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

Id of the history element, e.g. Contact 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)\<[History](SuperOffice.WebApi.Data.History.md)\&gt;

The current value.

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

Returns the previous current item. If no item exists a default value is returned. This is usually the first item in the table representing the history list.

```csharp theme={null}
public Task<History> GetPreviousCurrentAsync(string historyName, int id, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the history list, e.g. contact, project

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

Id of the history element, e.g. Contact 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)\<[History](SuperOffice.WebApi.Data.History.md)\&gt;

The current value.

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_PublishAndRetrieveUiEventsAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_UiEvent\_\_\_SuperOffice\_WebApi\_Data\_MetricPair\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> PublishAndRetrieveUiEventsAsync(int, UiEvent\[], MetricPair\[], RequestOptions)

Publish zero or more events, and return any new events since the given event id. The initial implementation is in-memory only; applies solely to the front-end web server; and anything older than 20 minutes is discarded

```csharp theme={null}
public Task<UiEvent[]> PublishAndRetrieveUiEventsAsync(int latestKnownEventId, UiEvent[] publishEvents, MetricPair[] metrics, RequestOptions requestOptions = null)
```

#### Parameters

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

The last event ID that this client knows about. The return value will be any events occurring /after/ that point, numbered by the server. Clients need to keep track themselves of this number between calls

`publishEvents` [UiEvent](SuperOffice.WebApi.Data.UiEvent.md)\[]

Array of events to publish. This can be empty if the client only wants to retrieve information

`metrics` [MetricPair](SuperOffice.WebApi.Data.MetricPair.md)\[]

Optional statistical and performance metrics collected by the frontend. Can be null or empty. Metrics are sum-accumulated and reported once a minute; please do not report the same logical event twice

`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)\<[UiEvent](SuperOffice.WebApi.Data.UiEvent.md)\[]\&gt;

Array of events since the given event ID; within the time span kept by the event mechanism. Event/primarykey combinations are not guaranteed to be unique, and events in the PublishEvents parameter are echoed back to the client

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_SaveCurrentAsync\_SuperOffice\_WebApi\_Data\_History\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveCurrentAsync(History, RequestOptions)

Saving the current history item. This history item is saved with Rank = 1, and all the remaining elements rank values are shifted one down. The list is maintained with the max lenght of the History list length preference.

```csharp theme={null}
public Task<History> SaveCurrentAsync(History current, RequestOptions requestOptions = null)
```

#### Parameters

`current` [History](SuperOffice.WebApi.Data.History.md)

The new current history element.

`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)\<[History](SuperOffice.WebApi.Data.History.md)\&gt;

The current (most recent) history item

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_SaveCurrentsAsync\_SuperOffice\_WebApi\_Data\_History\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveCurrentsAsync(History\[], RequestOptions)

Saves the history elements as the current value for their respective lists. If more than one item is submitted for the same list, they are added sequently, meaning that the last one is the most current.

```csharp theme={null}
public Task<History[]> SaveCurrentsAsync(History[] currents, RequestOptions requestOptions = null)
```

#### Parameters

`currents` [History](SuperOffice.WebApi.Data.History.md)\[]

Array of new history items to save.

`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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

Array of the saved History items

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_SaveHistoriesAsync\_System\_String\_SuperOffice\_WebApi\_Data\_History\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveHistoriesAsync(string, History\[], RequestOptions)

Replaces the existing history-list for the currently logged in user. All elements must belong to the same history list. If not they are ignored.

```csharp theme={null}
public Task<History[]> SaveHistoriesAsync(string historyName, History[] history, RequestOptions requestOptions = null)
```

#### Parameters

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

`history` [History](SuperOffice.WebApi.Data.History.md)\[]

Array of new history items to save.

`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)\<[History](SuperOffice.WebApi.Data.History.md)\[]\&gt;

Array of the saved History items

### \<a id="SuperOffice\_WebApi\_Agents\_ViewStateAgent\_SetHistoryLengthPrefValueAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetHistoryLengthPrefValueAsync(int, RequestOptions)

Set the logged on user's preferred history list length.

```csharp theme={null}
public Task SetHistoryLengthPrefValueAsync(int length, RequestOptions requestOptions = null)
```

#### Parameters

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

The new history list lenght

`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)


## Related topics

- [SuperOffice.WebApi.Data.History](/en/api/reference/webapi/SuperOffice.WebApi.Data.History.md)
- [SuperOffice.WebApi.Data.UiEvent](/en/api/reference/webapi/SuperOffice.WebApi.Data.UiEvent.md)
- [SuperOffice.WebApi.Data.HistoryRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.HistoryRequest.md)
- [SuperOffice.WebApi.Data.LiveUiConfig](/en/api/reference/webapi/SuperOffice.WebApi.Data.LiveUiConfig.md)
- [SuperOffice.WebApi.Agents.IViewStateAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IViewStateAgent.md)
- [SuperOffice.WebApi.Agents.AgentBase](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase.md)
