Skip to main content

unassignRole

client.swarm.unassignRole(swarmId: string, roleId: string, data: UnassignRoleRequest): Promise<void>

Unassign a role from an agent in a swarm.

Removes a role from an agent, revoking the associated permissions and responsibilities. The agent will no longer be able to perform actions authorized by this role.

Parameters​

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
roleIdstringYesThe unique identifier of the role to unassign
dataUnassignRoleRequestYesThe role unassignment information

Returns​

Promise<void> — A promise that resolves when the role is unassigned

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.swarm.unassignRole('swarmId', 'roleId', /* UnassignRoleRequest */);
console.log(result);