Skip to main content

deleteRole

client.swarm.deleteRole(swarmId: string, roleId: string): Promise<void>

Delete a role from a swarm.

Permanently removes a role and unassigns all agents from it. Agents will lose the permissions and responsibilities associated with the role.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
roleIdstringYesThe unique identifier of the role to delete

Returns

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

Example

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

const client = new CodeBoltClient();

const result = await client.swarm.deleteRole('swarmId', 'roleId');
console.log(result);