Create a rule
Create a rule in a workspace.
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 workspace id.
Body
Response
Rule created. It belongs to no framework until you map it to one in the Openlayer app.
A single requirement Openlayer tracks. platform rules are evaluated automatically from the state of your workspace, and evidence rules are satisfied by attaching evidence. A rule can belong to several frameworks, or to none.
The rule id.
"7c9a1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d"
The id of the workspace the rule belongs to.
The rule name.
255"Monitoring enabled"
Whether the rule is evaluated once for the whole workspace, or once per project the rule's frameworks apply to. Must be project for platform rules. Fixed once the rule is created.
project, workspace "project"
platform rules are evaluated automatically from the state of your Openlayer workspace. evidence rules are satisfied by attaching evidence. Fixed once the rule is created.
platform, evidence "platform"
The creation date.
"2026-03-22T11:31:01.185Z"
The last update date.
"2026-03-22T11:31:01.185Z"
What the rule requires.
"Each project must have Openlayer monitoring mode enabled."
The kind of evidence that satisfies the rule. Set it for evidence rules; omit or null for platform rules. Fixed once the rule is created.
document, text, url, categoryValue, null How often evidence must be renewed, in days. Once evidence is older than this, the rule result becomes due_soon and then failing. The window restarts whenever evidence is attached. Omit or null for platform rules.
x >= 190
Which workspace signal a platform rule checks, for example monitoring_mode_enabled, test_setup, or project_owner_set. Set it for platform rules; omit or null for evidence rules. Fixed once the rule is created.
"monitoring_mode_enabled"
Configuration for the platform check, when the automation takes parameters. Omit or null for evidence rules. Fixed once the rule is created.
Whether the rule is excluded from compliance calculations.
The user responsible for satisfying the rule.
The rule tags associated with the rule.
The frameworks that include this rule.
The rule's results, one per entity the rule is evaluated against. Only returned when includeResults is true.
Pass-rate counts across all of the rule's entities, independent of any status filter applied to the request.
Whether the rule is managed by Openlayer. These rules can't be renamed or deleted; set deactivated to exclude one from compliance instead.