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:
| Name | Type | Description |
|---|---|---|
options.standard | string | Filter by standard (e.g., 'ISO 27001') |
options.page.size | number | Items per page |
options.page.number | number | Page 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}`);
}