NewWacht Bench is live — AI-assisted development for Wacht

listWorkspaceRoles()

Returns workspace roles scoped to one workspace id.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function listWorkspaceRoles(workspaceId: string) {  const client = await wachtClient();  return client.workspaces.listWorkspaceRoles(workspaceId);}

Signature

function listWorkspaceRoles(  workspaceId: string,): Promise<PaginatedResponse<WorkspaceRole>>

Parameters

workspaceId?: string | undefined;
Target workspace id.

Return value

data?: WorkspaceRole[] | undefined;
Workspace role rows.
total?: number | undefined;
Total number of workspace roles matching the current query.
limit?: number | undefined;
Effective page size from backend response.
offset?: number | undefined;
Effective page offset from backend response.

Behavior

  • Lists role definitions scoped to a workspace.
  • Use role ids from this response in membership assignment flows.

On this page