Skip to content

Roles

2 methods on the Roles resource.

2 methods · 0 available to app tokens36 pages in SDK Reference

import { Compozy } from "@compozy/client";

2 of 2

getRole

Get effective background role configuration

compozy.roles.getRole({ path, query }) → Promise<RoleStatusResponse>

Options

rolestringpathrequired
Background role name
workspacestringquery
Workspace id, name, or path used to resolve effective role configuration

GET /api/roles/{role}app tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.roles.getRole({ path: { "role": "role" } });

listRoles

List effective background role configuration

compozy.roles.listRoles({ query }) → Promise<RolesResponse>

Options

workspacestringquery
Workspace id, name, or path used to resolve effective role configuration

GET /api/rolesapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.roles.listRoles();