Python
from openlayer import Openlayer
client = Openlayer()
rules = client.governance.frameworks.sections.list_rules(
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
framework_id="5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
include_subsection_rules=True,
)
for rule in rules.items:
print(rule.id, rule.name)import Openlayer from 'openlayer';
const client = new Openlayer();
const rules = await client.governance.frameworks.sections.listRules('2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f', {
frameworkId: '5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b',
includeSubsectionRules: true,
});
console.log(rules.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
rules, err := client.Governance.Frameworks.Sections.ListRules(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
openlayer.GovernanceFrameworkSectionListRulesParams{
IncludeSubsectionRules: openlayer.F(true),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", rules.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.sections.SectionListRulesParams;
import com.openlayer.api.models.governance.frameworks.sections.SectionListRulesResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
SectionListRulesParams params = SectionListRulesParams.builder()
.frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
.sectionId("2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f")
.includeResults(true)
.build();
SectionListRulesResponse rules = client.governance().frameworks().sections().listRules(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
rules = openlayer.governance.frameworks.sections.list_rules(
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
framework_id: "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
include_results: true
)
puts(rules)
curl --request GET \
--url 'https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/sections/2e4f6a8c-9b1d-4c3e-8f5a-7b9c0d1e2f3a/rules?includeSubsectionRules=true&includeResults=true' \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "7c9a1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Monitoring enabled",
"scope": "project",
"type": "platform",
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"description": "Each project must have Openlayer monitoring mode enabled.",
"evidenceType": "document",
"renewalCadenceDays": 90,
"automationType": "monitoring_mode_enabled",
"automationParams": {},
"deactivated": false,
"assigneeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
{
"id": "6e8a0c2d-4f5b-4a3c-9d7e-8f0a1b2c3d4e",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"creatorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Evaluation",
"immutable": false,
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"color": "<string>"
}
],
"frameworks": [
{
"id": "<unknown>",
"name": "<unknown>",
"avatar": "<unknown>",
"builtInSlug": "<unknown>",
"enabled": "<unknown>"
}
],
"results": [
{
"id": "5b7d9f1a-2c3e-4d5f-8a6b-9c0d1e2f3a4b",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ruleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "passing",
"deactivated": false,
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusMessage": "<string>",
"dateLastEvaluated": "2023-11-07T05:31:56Z",
"dateOfNextEvaluation": "2023-11-07T05:31:56Z",
"dateOfLatestEvidence": "2023-11-07T05:31:56Z",
"dateOfRenewal": "2023-11-07T05:31:56Z",
"deactivatedReason": "<string>",
"assigneeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockedBy": [],
"blocking": []
}
],
"resultsSummary": {
"passing": 1,
"total": 1
},
"immutable": true
}
]
}{
"code": 123,
"error": "<string>"
}Governance
List a section's rules
List the rules mapped to a document section.
Python
from openlayer import Openlayer
client = Openlayer()
rules = client.governance.frameworks.sections.list_rules(
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
framework_id="5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
include_subsection_rules=True,
)
for rule in rules.items:
print(rule.id, rule.name)import Openlayer from 'openlayer';
const client = new Openlayer();
const rules = await client.governance.frameworks.sections.listRules('2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f', {
frameworkId: '5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b',
includeSubsectionRules: true,
});
console.log(rules.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
rules, err := client.Governance.Frameworks.Sections.ListRules(
context.TODO(),
"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
openlayer.GovernanceFrameworkSectionListRulesParams{
IncludeSubsectionRules: openlayer.F(true),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", rules.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.governance.frameworks.sections.SectionListRulesParams;
import com.openlayer.api.models.governance.frameworks.sections.SectionListRulesResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
SectionListRulesParams params = SectionListRulesParams.builder()
.frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
.sectionId("2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f")
.includeResults(true)
.build();
SectionListRulesResponse rules = client.governance().frameworks().sections().listRules(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
rules = openlayer.governance.frameworks.sections.list_rules(
"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
framework_id: "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
include_results: true
)
puts(rules)
curl --request GET \
--url 'https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/sections/2e4f6a8c-9b1d-4c3e-8f5a-7b9c0d1e2f3a/rules?includeSubsectionRules=true&includeResults=true' \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "7c9a1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Monitoring enabled",
"scope": "project",
"type": "platform",
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"description": "Each project must have Openlayer monitoring mode enabled.",
"evidenceType": "document",
"renewalCadenceDays": 90,
"automationType": "monitoring_mode_enabled",
"automationParams": {},
"deactivated": false,
"assigneeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
{
"id": "6e8a0c2d-4f5b-4a3c-9d7e-8f0a1b2c3d4e",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"creatorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Evaluation",
"immutable": false,
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"color": "<string>"
}
],
"frameworks": [
{
"id": "<unknown>",
"name": "<unknown>",
"avatar": "<unknown>",
"builtInSlug": "<unknown>",
"enabled": "<unknown>"
}
],
"results": [
{
"id": "5b7d9f1a-2c3e-4d5f-8a6b-9c0d1e2f3a4b",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ruleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "passing",
"deactivated": false,
"dateCreated": "2026-03-22T11:31:01.185Z",
"dateUpdated": "2026-03-22T11:31:01.185Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusMessage": "<string>",
"dateLastEvaluated": "2023-11-07T05:31:56Z",
"dateOfNextEvaluation": "2023-11-07T05:31:56Z",
"dateOfLatestEvidence": "2023-11-07T05:31:56Z",
"dateOfRenewal": "2023-11-07T05:31:56Z",
"deactivatedReason": "<string>",
"assigneeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockedBy": [],
"blocking": []
}
],
"resultsSummary": {
"passing": 1,
"total": 1
},
"immutable": true
}
]
}{
"code": 123,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Path Parameters
The framework id.
The framework document section id.
Query Parameters
The page to return in a paginated query.
Required range:
x >= 1Maximum number of items to return per page.
Required range:
1 <= x <= 100Whether to include each rule's results inline, in a results array.
Only include items that apply to this project.
Whether to also include the rules mapped to the section's subsections.
Response
Status OK.
Show child attributes
Show child attributes
Was this page helpful?