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

# \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent">\</a> Class ArchiveAgent

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

ArchiveList functions of all kinds

```csharp theme={null}
public class ArchiveAgent : AgentBase, IArchiveAgent, IAgentBase, IDisposable
```

#### Inheritance

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

#### Implements

[IArchiveAgent](SuperOffice.WebApi.Agents.IArchiveAgent.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 (ArchiveAgent agent = new ArchiveAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

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

Constructor: ArchiveList functions of all kinds

```csharp theme={null}
public ArchiveAgent(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\_ArchiveAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> ArchiveAgent(WebApiOptions, HttpClient)

Constructor: ArchiveList functions of all kinds

```csharp theme={null}
public ArchiveAgent(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\_ArchiveAgent\_CreateDefaultArchiveListResultAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultArchiveListResultAsync(RequestOptions)

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

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

A blank ArchiveListResult

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_ExportArchiveAsync\_System\_String\_System\_String\_System\_String\_\_\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_System\_String\_\_\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ExportArchiveAsync(string, string, string\[], string\[], ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string, string\[], int, RequestOptions)

Exports the target archive to a downloadable format.

```csharp theme={null}
public Task<ExportArchiveResult> ExportArchiveAsync(string providerName, string context, string[] desiredEntities, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restrictions, string exportType, string[] selectedRowIds, int estimatedRowCount, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Comma separated list of the names of the desired entities.

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

Comma separated list of the names of the columns wanted; supports display names

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

`restrictions` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

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

To what format the archive should be exported; Excel, etc.

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

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

The estimated amount of rows to be exported. Used to determine if the operation should be run as a batch task or immediately.

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

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetActivityFilterAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetActivityFilterAsync(RequestOptions)

Get activity filter for the specified list.

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

The activity filter for the specified list

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveConfigurationAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveConfigurationAsync(string, string, RequestOptions)

Get the configuration for one archive. The configuration is keyed by a combination of archive provider name and gui name. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.

```csharp theme={null}
public Task<ArchiveConfiguration> GetArchiveConfigurationAsync(string guiName, string providerName, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Archive configuration consisting of column information, orderby information and entities

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveConfigurationV2Async\_System\_String\_System\_String\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveConfigurationV2Async(string, string, string, string, RequestOptions)

Get the configuration for one archive. The configuration is keyed by a combination of archive provider name (plus optional context), gui name, and optional table binding. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.

```csharp theme={null}
public Task<ArchiveConfiguration> GetArchiveConfigurationV2Async(string guiName, string providerName, string context, string ownerKeys, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful

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

Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys

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

Archive configuration consisting of column information, orderby information and entities

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveConfigurationWithContextAsync\_System\_String\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveConfigurationWithContextAsync(string, string, string, RequestOptions)

Get the configuration for one archive, with context parameter. The configuration is keyed by a combination of archive provider name and gui name. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.

```csharp theme={null}
public Task<ArchiveConfiguration> GetArchiveConfigurationWithContextAsync(string guiName, string providerName, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Archive configuration consisting of column information, orderby information and entities

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

Get a page of data for an archive using a restriction string. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveList2Async(string guiName, string providerName, string sortOrder, string restriction, string entities, int page, int pageSize, RequestOptions requestOptions = null)
```

#### Parameters

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

The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service)

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Sort order for the archive. Can be null, which indicates 'no particular order'

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

Archive restrictions as string. e.g. "name = 'baz' or category oneOf (1,2,3)". Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListAsync(string, string, ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, RequestOptions)

Get a page of data for an archive. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListAsync(string guiName, string providerName, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, RequestOptions requestOptions = null)
```

#### Parameters

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

The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service)

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

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

Get a page of results for an archive list, explicitly specifying the restrictions as a string, orderby and chosen columns.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListByColumns2Async(string providerName, string columns, string sortOrder, string restrictions, string entities, int page, int pageSize, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

An array of the names of the columns wanted.

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

Sort order for the archive as string ('name asc, dept desc'). Can be null, which indicates 'no particular order'

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

Archive restrictions as string ('category = 1 and business oneOf (1,2,3)'). Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListByColumnsAsync\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListByColumnsAsync(string, string\[], ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, RequestOptions)

Get a page of results for an archive list, explicitly specifying the restrictions, orderby and chosen columns.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListByColumnsAsync(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

An array of the names of the columns wanted.

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

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

Get a page of results for an archive list with context parameter, explicitly specifying the restrictions as a string, orderby and chosen columns.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListByColumnsWithContext2Async(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Comma separated names of the columns wanted.

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

Comma separated list of columns to sort order for the archive. e.g.: "name asc, dept desc, registeredBy" Can be null, which indicates 'no particular order'

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

Archive restrictions as string. e.g. "name startsWith 'foo' and (dept = 'bar' or dept = 'baz')" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListByColumnsWithContextAsync\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListByColumnsWithContextAsync(string, string\[], ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, string, RequestOptions)

Get a page of results for an archive list with context parameter, explicitly specifying the restrictions, orderby and chosen columns.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListByColumnsWithContextAsync(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

An array of the names of the columns wanted.

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

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

Get a page of results for an archive list, explicitly specifying the restrictions as strings, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.

```csharp theme={null}
public Task<ArchiveListResult> GetArchiveListByColumnsWithHeader2Async(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string options, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Comma separated string of the names of the columns wanted.

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

Comma separated string of sort order for the archive. e.g. "name asc, dept desc" Can be null, which indicates 'no particular order'

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

Archive restrictions. e.g. "category = 2 or business oneOf (2,3,4)" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

name=value\&amp;... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated.

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

Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListByColumnsWithHeaderAsync\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListByColumnsWithHeaderAsync(string, string\[], ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, string, RequestOptions)

Get a page of results for an archive list, explicitly specifying the restrictions, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.

```csharp theme={null}
public Task<ArchiveListResult> GetArchiveListByColumnsWithHeaderAsync(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string options, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

An array of the names of the columns wanted.

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

name=value\&amp;... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated.

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

Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns)

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

Get a page of results for an archive list, with context parameter, explicitly specifying the restrictions as strings, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.

```csharp theme={null}
public Task<ArchiveListResult> GetArchiveListByColumnsWithHeaderWithContext2Async(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string options, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Comma separated list of the names of the columns wanted.

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

Sort order for the archive. "name asc, dept desc" Can be null, which indicates 'no particular order'

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

Archive restrictions as string. "updated > '2009.1.1' and registeredBy = 2" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

name=value\&amp;... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListByColumnsWithHeaderWithContextAsync\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListByColumnsWithHeaderWithContextAsync(string, string\[], ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, string, string, RequestOptions)

Get a page of results for an archive list, with context parameter, explicitly specifying the restrictions, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.

```csharp theme={null}
public Task<ArchiveListResult> GetArchiveListByColumnsWithHeaderWithContextAsync(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string options, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

An array of the names of the columns wanted.

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

name=value\&amp;... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns)

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

Get a page of data for an archive using restrictions as strings, with context parameter. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListWithContext2Async(string guiName, string providerName, string sortOrder, string restriction, string entities, int page, int pageSize, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service)

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Sort order for the archive. e.g. "name asc, dept desc" Can be null, which indicates 'no particular order'

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

Archive restrictions as string. e.g. "name gt 'B' or dept = 'baz'" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Comma separated list of entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetArchiveListWithContextAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_Data\_ArchiveOrderByInfo\_\_\_SuperOffice\_WebApi\_Data\_ArchiveRestrictionInfo\_\_\_System\_String\_\_\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetArchiveListWithContextAsync(string, string, ArchiveOrderByInfo\[], ArchiveRestrictionInfo\[], string\[], int, int, string, RequestOptions)

Get a page of data for an archive, with context parameter. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.

```csharp theme={null}
public Task<ArchiveListItem[]> GetArchiveListWithContextAsync(string guiName, string providerName, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service)

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

`sortOrder` [ArchiveOrderByInfo](SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)\[]

Sort order for the archive. Can be null, which indicates 'no particular order'

`restriction` [ArchiveRestrictionInfo](SuperOffice.WebApi.Data.ArchiveRestrictionInfo.md)\[]

Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows.

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

Which entities to include. Can be null, which indicates 'include all entities'

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

Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip.

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

Page size, which should be kept reasonable (say, no more than 1000 rows at a time)

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of archive list items, where each item represents one row of data (row level data + the requested columns)

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetAvailableColumnsAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAvailableColumnsAsync(string, string, RequestOptions)

Return list of all columns supported by an archive provider. See also GetArchiveConfiguration.

```csharp theme={null}
public Task<ArchiveColumnInfo[]> GetAvailableColumnsAsync(string providerName, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Optional context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of all columns supported by the archive provider.

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetAvailableEntitiesAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAvailableEntitiesAsync(string, string, RequestOptions)

Return list of all entities supported by an archive provider. See also GetArchiveConfiguration.

```csharp theme={null}
public Task<MDOListItem[]> GetAvailableEntitiesAsync(string providerName, string context, RequestOptions requestOptions = null)
```

#### Parameters

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

The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin

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

Optional context parameter, url-encoded string context parameter for ArchiveProvider constructor

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

Array of all entity types supported by the archive provider. MDOListItem.Name = DisplayName, Tooltip = DisplayTooltip, Type = code name, StyleHint = optional/mandatory, IconHint=DefaultShow

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

Returns the  associate ids that belongs to the given groups

```csharp theme={null}
public Task<int[]> GetGroupAssociateIdsAsync(int[] groupIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Array of group ids

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

Array of associate ids

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetProviderNamesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProviderNamesAsync(RequestOptions)

Return list of all archive provider names

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

Array of all archive provider names.

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

Get data for fields related to a table record. While this method /can/ be used to fetch plain fields, that is not the intended usage and it does not replace the Entity.Get methods available for that purpose. Nor does it replace the generic DotSyntax/Dynamic archive provider.

```csharp theme={null}
public Task<RelatedData[]> GetRelatedData2Async(string table, int recordId, string fields, RequestOptions requestOptions = null)
```

#### Parameters

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

The root table to get related data for, such as 'ticket' or 'y\_car'

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

The primary key of the root table to get related data for

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

Names of fields as a comma-separated list - these need to be valid in the DotSyntax for this table, and can be arbitrarily deep. Example: 'title,created\_by.associate\_id.person.fullName, x\_comment'. Do not start with the root table name.

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

Array of field => ArchiveColumnData objects

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_GetRelatedDataAsync\_System\_String\_System\_Int32\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetRelatedDataAsync(string, int, string\[], RequestOptions)

Get data for fields related to a table record. While this method /can/ be used to fetch plain fields, that is not the intended usage and it does not replace the Entity.Get methods available for that purpose. Nor does it replace the generic DotSyntax/Dynamic archive provider.

```csharp theme={null}
public Task<RelatedData[]> GetRelatedDataAsync(string table, int recordId, string[] fields, RequestOptions requestOptions = null)
```

#### Parameters

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

The root table to get related data for, such as 'ticket' or 'y\_car'

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

The primary key of the root table to get related data for

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

Names of fields - these need to be valid in the DotSyntax for this table, and can be arbitrarily deep. Examples: 'title', 'created\_by.associate\_id.person.fullName', 'x\_comment'. Do not start with the root table name.

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

Array of field => ArchiveColumnData objects

### \<a id="SuperOffice\_WebApi\_Agents\_ArchiveAgent\_SetActivityFilterAsync\_SuperOffice\_WebApi\_Data\_ActivityFilter\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetActivityFilterAsync(ActivityFilter, RequestOptions)

Set activity filter for the specified list.

```csharp theme={null}
public Task SetActivityFilterAsync(ActivityFilter activityFilter, RequestOptions requestOptions = null)
```

#### Parameters

`activityFilter` [ActivityFilter](SuperOffice.WebApi.Data.ActivityFilter.md)

New activity filter

`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\_ArchiveAgent\_SetChosenColumnsAsync\_System\_String\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetChosenColumnsAsync(string, string, string\[], RequestOptions)

Set the currently chosen columns for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveColumns: plus the archive provider name and gui name as its additionalInfo.

```csharp theme={null}
public Task SetChosenColumnsAsync(string guiName, string providerName, string[] chosenColumns, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Array of column names, where array order indicates left to right order in the archive.

`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\_ArchiveAgent\_SetChosenColumnsV2Async\_System\_String\_System\_String\_System\_String\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetChosenColumnsV2Async(string, string, string, string, string\[], RequestOptions)

Set the currently chosen columns for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveColumns: plus the archive provider name and gui name as its additionalInfo.

```csharp theme={null}
public Task SetChosenColumnsV2Async(string guiName, string providerName, string context, string ownerKeys, string[] chosenColumns, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful

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

Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys

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

Array of column names, where array order indicates left to right order in the archive.

`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\_ArchiveAgent\_SetChosenEntitiesAsync\_System\_String\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetChosenEntitiesAsync(string, string, string\[], RequestOptions)

Set the currently chosen entities for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveEntities: plus the archive provider name and gui name as its additionalInfo.

```csharp theme={null}
public Task SetChosenEntitiesAsync(string guiName, string providerName, string[] entities, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Array of entity 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)

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

Set the currently chosen entities for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveEntities: plus the archive provider name and gui name as its additionalInfo.

```csharp theme={null}
public Task SetChosenEntitiesV2Async(string guiName, string providerName, string context, string ownerKeys, string[] entities, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful

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

Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys

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

Array of entity 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)

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

Set the column widths for the given set of columns and GUI name.

```csharp theme={null}
public Task SetColumnWidthsAsync(string guiName, string[] columnWidths, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Array of column widths. A column width is specified either as a fixed number of character (10c) or as a percentage (10%). Percentages will be recalculated so that they add up to exactly 100 when the configuration is fetched again.

`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\_ArchiveAgent\_SetColumnWidthsV2Async\_System\_String\_System\_String\_System\_String\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetColumnWidthsV2Async(string, string, string, string, string\[], RequestOptions)

Set the column widths for the given set of columns and GUI name.

```csharp theme={null}
public Task SetColumnWidthsV2Async(string guiName, string providerName, string context, string ownerKeys, string[] columnWidths, RequestOptions requestOptions = null)
```

#### Parameters

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

String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything.

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

Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory.

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

Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful

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

Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys

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

Array of column widths. A column width is specified either as a fixed number of character (10c) or as a percentage (10%). Percentages will be recalculated so that they add up to exactly 100 when the configuration is fetched again.

`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.ArchiveConfiguration](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveConfiguration.md)
- [SuperOffice.WebApi.Data.ArchiveColumnData](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveColumnData.md)
- [SuperOffice.WebApi.Data.ArchiveColumnInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveColumnInfo.md)
- [SuperOffice.WebApi.Data.ArchiveListItem](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveListItem.md)
- [SuperOffice.WebApi.Data.ArchiveListResult](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveListResult.md)
- [SuperOffice.WebApi.Data.ArchiveOrderByInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ArchiveOrderByInfo.md)
