TaskServices.ReassignTasksAsync
Description
The API re-assigns the specified task IDs to the provided user ID inside the AI Command Center.
Signature [C#]
Task ReassignTasksAsync(int userId, int[] taskIds);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
userId | int | Required | Specify the user ID to re-assign the task. |
taskIds | int[] | Required | Specify the task IDs to be assigned to a user. |
Remarks
Use ReassignTasksAsync API to re-assign the tasks to a specified user from the connected AI Command Center.
Example
C#
public async Task ReAssignTasks()
{
IControlRoomContext context = LoginControlRoom();
try
{
int userId = 1;
int[] taskIds =
{
1,
2
};
await context.Tasks.ReassignTasksAsync(userId, taskIds);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}
See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.