Skip to main content
Python

Authorizations

Authorization
string
header
required

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

workspaceId
string<uuid>
required

The workspace id.

Body

application/json
name
any
required
scope
any
required
type
any
required
description
any
evidenceType
any
renewalCadenceDays
any
automationType
any
automationParams
any
deactivated
any
assigneeId
any
tagIds
any

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.

id
string<uuid>
required
read-only

The rule id.

Example:

"7c9a1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d"

workspaceId
string<uuid>
required
read-only

The id of the workspace the rule belongs to.

name
string
required

The rule name.

Maximum string length: 255
Example:

"Monitoring enabled"

scope
enum<string>
required

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.

Available options:
project,
workspace
Example:

"project"

type
enum<string>
required

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.

Available options:
platform,
evidence
Example:

"platform"

dateCreated
string<date-time>
required
read-only

The creation date.

Example:

"2026-03-22T11:31:01.185Z"

dateUpdated
string<date-time>
required
read-only

The last update date.

Example:

"2026-03-22T11:31:01.185Z"

description
string | null

What the rule requires.

Example:

"Each project must have Openlayer monitoring mode enabled."

evidenceType
enum<string> | null

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.

Available options:
document,
text,
url,
categoryValue,
null
renewalCadenceDays
integer | 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.

Required range: x >= 1
Example:

90

automationType
string | null

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.

Example:

"monitoring_mode_enabled"

automationParams
object | null

Configuration for the platform check, when the automation takes parameters. Omit or null for evidence rules. Fixed once the rule is created.

deactivated
boolean
default:false

Whether the rule is excluded from compliance calculations.

assigneeId
string<uuid> | null

The user responsible for satisfying the rule.

tags
object[] | null
read-only

The rule tags associated with the rule.

frameworks
object[]
read-only

The frameworks that include this rule.

results
object[]
read-only

The rule's results, one per entity the rule is evaluated against. Only returned when includeResults is true.

resultsSummary
object | null
read-only

Pass-rate counts across all of the rule's entities, independent of any status filter applied to the request.

immutable
boolean
read-only

Whether the rule is managed by Openlayer. These rules can't be renamed or deleted; set deactivated to exclude one from compliance instead.