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

# \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent">\</a> Class BatchAgent

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

Start, stop and monitor predefined batch tasks

```csharp theme={null}
public class BatchAgent : AgentBase, IBatchAgent, IAgentBase, IDisposable
```

#### Inheritance

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

#### Implements

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

## Constructors

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

Constructor: Start, stop and monitor predefined batch tasks

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

Constructor: Start, stop and monitor predefined batch tasks

```csharp theme={null}
public BatchAgent(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\_BatchAgent\_DeleteBatchTaskAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteBatchTaskAsync(int, RequestOptions)

Delete a batch task from the database.

```csharp theme={null}
public Task DeleteBatchTaskAsync(int batchTaskId, RequestOptions requestOptions = null)
```

#### Parameters

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

The batchTask id to delete.

`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\_BatchAgent\_DeleteBatchTasksAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteBatchTasksAsync(int\[], RequestOptions)

Delete batch tasks from the database.

```csharp theme={null}
public Task DeleteBatchTasksAsync(int[] batchTaskIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Array of batchTask ids to delete.

`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\_BatchAgent\_GetAllBatchTaskInfosByNameAndStateAsync\_System\_String\_SuperOffice\_WebApi\_Data\_BatchTaskState\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)

Get an array of system and user BatchTaskInfo for the provided task name and state.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetAllBatchTaskInfosByNameAndStateAsync(string taskName, BatchTaskState state, RequestOptions requestOptions = null)
```

#### Parameters

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

A task name, NULL or blank to get all tasks

`state` [BatchTaskState](SuperOffice.WebApi.Data.BatchTaskState.md)

The BatchTaskState to get batch tasks 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of user and system BatchTaskInfos.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetAllBatchTaskInfosByNameAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllBatchTaskInfosByNameAsync(string, RequestOptions)

Get an array of system and user BatchTaskInfo for the provided task name.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetAllBatchTaskInfosByNameAsync(string taskName, RequestOptions requestOptions = null)
```

#### Parameters

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

A task name, NULL or blank to get all tasks

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

Returns an array of user and system BatchTaskInfos.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetBatchTaskInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetBatchTaskInfoAsync(int, RequestOptions)

Get a single BatchTaskInfo based on Id.

```csharp theme={null}
public Task<BatchTaskInfo> GetBatchTaskInfoAsync(int id, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the BatchTaskInfo to get.

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

Override language/culture codes on this request.

#### Returns

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

Returns a BatchTaskInfo.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetBatchTaskInfosByAssociatesAndStateAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_Data\_BatchTaskState\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetBatchTaskInfosByAssociatesAndStateAsync(int\[], BatchTaskState, RequestOptions)

Get an array of BatchTaskInfo for the provided associate id's and batch task state.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetBatchTaskInfosByAssociatesAndStateAsync(int[] associateIds, BatchTaskState state, RequestOptions requestOptions = null)
```

#### Parameters

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

Array of associate id's. Empty array for all. 0 for system tasks, -1 for all users, or specific user ids.

`state` [BatchTaskState](SuperOffice.WebApi.Data.BatchTaskState.md)

The BatchTaskState to get batch tasks 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of BatchTaskInfo.

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

Get an array of BatchTaskInfo for the provided associate id's.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetBatchTaskInfosByAssociatesAsync(int[] associateIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Array of associate id's. empty array = all tasks, 0 = system tasks, -1 = all user tasks.

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

Returns an array of user's BatchTaskInfo.

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

Get an array of BatchTaskInfo for the provided associate id's and batch task definition name.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetBatchTaskInfosByNameAndAssociatesAsync(string name, int[] associateIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Batchtask definition name. Blank for all tasks.

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

Array of associate id's. Empty array for all. 0 for system tasks, -1 for all users, or specific user 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of BatchTaskInfo.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetBatchTaskInfosByNameAndStateAsync\_System\_String\_SuperOffice\_WebApi\_Data\_BatchTaskState\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)

Gets an array of user BatchTaskInfo with state defined by a BatchTaskState and the batchtask definition name.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetBatchTaskInfosByNameAndStateAsync(string name, BatchTaskState state, RequestOptions requestOptions = null)
```

#### Parameters

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

Batchtask definition name. Blank for all tasks.

`state` [BatchTaskState](SuperOffice.WebApi.Data.BatchTaskState.md)

The BatchTaskState to get batch tasks 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of user BatchTaskInfo. System tasks are excluded.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetBatchTaskInfosByStateAsync\_SuperOffice\_WebApi\_Data\_BatchTaskState\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetBatchTaskInfosByStateAsync(BatchTaskState, RequestOptions)

Gets an array of user BatchTaskInfo with state defined by a BatchTaskState.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetBatchTaskInfosByStateAsync(BatchTaskState state, RequestOptions requestOptions = null)
```

#### Parameters

`state` [BatchTaskState](SuperOffice.WebApi.Data.BatchTaskState.md)

The BatchTaskState to get batch tasks 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of user BatchTaskInfo. System tasks are excluded.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetSystemBatchTaskInfosByNameAndStateAsync\_System\_String\_SuperOffice\_WebApi\_Data\_BatchTaskState\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetSystemBatchTaskInfosByNameAndStateAsync(string, BatchTaskState, RequestOptions)

Get an array of system BatchTaskInfo for the provided task name and state.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetSystemBatchTaskInfosByNameAndStateAsync(string taskName, BatchTaskState state, RequestOptions requestOptions = null)
```

#### Parameters

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

A task name, NULL or blank to get all tasks

`state` [BatchTaskState](SuperOffice.WebApi.Data.BatchTaskState.md)

The BatchTaskState to get batch tasks 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\[]\&gt;

Returns an array of system BatchTaskInfos.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_GetSystemBatchTaskInfosByNameAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetSystemBatchTaskInfosByNameAsync(string, RequestOptions)

Get an array of system BatchTaskInfo for the provided task name.

```csharp theme={null}
public Task<BatchTaskInfo[]> GetSystemBatchTaskInfosByNameAsync(string taskName, RequestOptions requestOptions = null)
```

#### Parameters

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

A task name, NULL or blank to get all tasks

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

Returns an array of system BatchTaskInfos.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_StartBatchJobAsync\_SuperOffice\_WebApi\_Data\_BatchTaskInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> StartBatchJobAsync(BatchTaskInfo, RequestOptions)

Start a batch job based on BatchTaskInfo.

```csharp theme={null}
public Task<int> StartBatchJobAsync(BatchTaskInfo batchTaskInfo, RequestOptions requestOptions = null)
```

#### Parameters

`batchTaskInfo` [BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)

Use BatchTaskInfo to describe the new batch job.

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

Returns the id of the created batch job.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_StopBatchJobAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> StopBatchJobAsync(int, RequestOptions)

Stop a batch job based on Id.

```csharp theme={null}
public Task<bool> StopBatchJobAsync(int id, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the batch job to stop.

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if the job was stopped successfully.

### \<a id="SuperOffice\_WebApi\_Agents\_BatchAgent\_UpdateBatchTaskAsync\_SuperOffice\_WebApi\_Data\_BatchTaskInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UpdateBatchTaskAsync(BatchTaskInfo, RequestOptions)

Update information about a BatchTask. Only the following properties can be updated: State, Description, Response and Request.

```csharp theme={null}
public Task<BatchTaskInfo> UpdateBatchTaskAsync(BatchTaskInfo batchTaskInfo, RequestOptions requestOptions = null)
```

#### Parameters

`batchTaskInfo` [BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)

The updated information 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)\<[BatchTaskInfo](SuperOffice.WebApi.Data.BatchTaskInfo.md)\&gt;

The updated BatchTaskInfo


## Related topics

- [SuperOffice.WebApi.Data.Batch](/en/api/reference/webapi/SuperOffice.WebApi.Data.Batch.md)
- [SuperOffice.WebApi.Data.BatchTaskInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.BatchTaskInfo.md)
- [SuperOffice.WebApi.Agents.AgentBase](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase.md)
- [SuperOffice.WebApi.Agents.IBatchAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IBatchAgent.md)
- [Delete Batch Task](/en/api/reference/restful/agent/batch_agent/delete-batch-task.md)
- [Delete Batch Tasks](/en/api/reference/restful/agent/batch_agent/delete-batch-tasks.md)
