Skip to main content
cURL

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.

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.

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.

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. null for platform rules.

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.

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. null for evidence rules.

Example:

"monitoring_mode_enabled"

automationParams
object | null

Configuration for the platform check, when the automation takes parameters.

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 and cannot be edited.