Skip to content

ControlsResource

API reference for the Controls resource.

Methods

list

List all controls with optional filtering.

typescript
async list(options?: ListOptions & { standard?: string }): Promise<ListResponse<Control>>

Parameters:

NameTypeDescription
options.standardstringFilter by standard (e.g., 'ISO 27001')
options.page.sizenumberItems per page
options.page.numbernumberPage number

get

Get a single control by ID.

typescript
async get(id: string): Promise<Control>

getByStandard

Get all controls for a specific standard.

typescript
async getByStandard(standard: string): Promise<Control[]>

Types

Control

typescript
interface Control {
  id: string;
  type: 'control';
  controlId: string;
  name: string;
  description?: string;
  standard: string;
  category?: string;
  createdAt: Date;
  updatedAt: Date;
}

Example

typescript
// Get all ISO 27001 controls
const controls = await client.controls.getByStandard('ISO 27001');

for (const control of controls) {
  console.log(`${control.controlId}: ${control.name}`);
}

Released under the MIT License.