<a id=“SuperOffice_WebApi_Agents_IBatchAgent”></a> Interface IBatchAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Start, stop and monitor predefined batch tasks
Implements
IAgentBase, IDisposableMethods
<a id=“SuperOffice_WebApi_Agents_IBatchAgent_DeleteBatchTaskAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteBatchTaskAsync(int, RequestOptions)
Delete a batch task from the database.Parameters
batchTaskId int
The batchTask id to delete.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IBatchAgent_DeleteBatchTasksAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> DeleteBatchTasksAsync(int[], RequestOptions)
Delete batch tasks from the database.Parameters
batchTaskIds int[]
Array of batchTask ids to delete.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
taskName string
A task name, NULL or blank to get all tasks
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user and system BatchTaskInfos.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_GetAllBatchTaskInfosByNameAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetAllBatchTaskInfosByNameAsync(string, RequestOptions)
Get an array of system and user BatchTaskInfo for the provided task name.Parameters
taskName string
A task name, NULL or blank to get all tasks
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user and system BatchTaskInfos.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_GetBatchTaskInfoAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetBatchTaskInfoAsync(int, RequestOptions)
Get a single BatchTaskInfo based on Id.Parameters
id int
Id of the BatchTaskInfo to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo> Returns a BatchTaskInfo.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
associateIds int[]
Array of associate id’s. Empty array for all. 0 for system tasks, -1 for all users, or specific user ids.
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of BatchTaskInfo.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_GetBatchTaskInfosByAssociatesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> GetBatchTaskInfosByAssociatesAsync(int[], RequestOptions)
Get an array of BatchTaskInfo for the provided associate id’s.Parameters
associateIds int[]
Array of associate id’s. empty array = all tasks, 0 = system tasks, -1 = all user tasks.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user’s BatchTaskInfo.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
name string
Batchtask definition name. Blank for all tasks.
associateIds int[]
Array of associate id’s. Empty array for all. 0 for system tasks, -1 for all users, or specific user ids.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of BatchTaskInfo.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
name string
Batchtask definition name. Blank for all tasks.
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user BatchTaskInfo. System tasks are excluded.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_GetBatchTaskInfosByStateAsync_SuperOffice_WebApi_Data_BatchTaskState_SuperOffice_WebApi_RequestOptions_”></a> GetBatchTaskInfosByStateAsync(BatchTaskState, RequestOptions)
Gets an array of user BatchTaskInfo with state defined by a BatchTaskState.Parameters
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of user BatchTaskInfo. System tasks are excluded.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
taskName string
A task name, NULL or blank to get all tasks
state BatchTaskState
The BatchTaskState to get batch tasks for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of system BatchTaskInfos.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_GetSystemBatchTaskInfosByNameAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSystemBatchTaskInfosByNameAsync(string, RequestOptions)
Get an array of system BatchTaskInfo for the provided task name.Parameters
taskName string
A task name, NULL or blank to get all tasks
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo[]> Returns an array of system BatchTaskInfos.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_StartBatchJobAsync_SuperOffice_WebApi_Data_BatchTaskInfo_SuperOffice_WebApi_RequestOptions_”></a> StartBatchJobAsync(BatchTaskInfo, RequestOptions)
Start a batch job based on BatchTaskInfo.Parameters
batchTaskInfo BatchTaskInfo
Use BatchTaskInfo to describe the new batch job.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Returns the id of the created batch job.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_StopBatchJobAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> StopBatchJobAsync(int, RequestOptions)
Stop a batch job based on Id.Parameters
id int
Id of the batch job to stop.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Returns true if the job was stopped successfully.<a id=“SuperOffice_WebApi_Agents_IBatchAgent_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.Parameters
batchTaskInfo BatchTaskInfo
The updated information to save.
requestOptions RequestOptions
Override language/culture codes on this request.