Skip to main content
PUT
Update a security policy

Authorizations

Authorization
string
header
required

JWT access token.

Path Parameters

organizationId
string<uuid>
required
policyId
string<uuid>
required

Body

application/json
yamlContent
string
required

Full YAML policy definition. Example:

Example:

"version: '1.0'\nname: Updated Security Policy\nscope: PROJECT\npriority: 15\nenabled: true\nprojectIds:\n - 550e8400-e29b-41d4-a716-446655440000\nrules:\n - name: Block Critical\n type: severity\n operator: eq\n value: CRITICAL\n action: block"

Response

200 - application/json

Policy updated

id
string
required

Policy ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

scope
enum<string>
required

Policy scope

Available options:
ORGANIZATION,
TEAM,
PROJECT
Example:

"PROJECT"

organizationId
string
required

Organization ID the policy belongs to

Example:

"550e8400-e29b-41d4-a716-446655440001"

name
string
required

Policy name

Example:

"Production Security Policy"

priority
number
required

Priority (lower = higher priority)

Example:

10

config
object
required

Policy configuration

Example:
isEnabled
boolean
required

Whether the policy is enabled

Example:

true

createdAt
string
required

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

updatedAt
string
required

Last update timestamp

Example:

"2024-01-15T10:30:00Z"

projectIds
string[]

Project IDs targeted by this policy (for PROJECT scope)

Example:
teamIds
string[]

Team IDs targeted by this policy (for TEAM scope)

Example:
description
string

Policy description

Example:

"Security policy for production environment"

createdBy
string

User ID who created the policy

updatedBy
string

User ID who last updated the policy