Update Policy

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Updates an existing policy.

Security: Requires the "Manage Policies" role to be set on the User or Group level.

Usage: PUT /policies/{policy_name}

Consumes: application/json

Payload:

{
    "name": "sec_policy",
    "description": "Security policy",
    "type": "security",
    "rules": [
        {
            "name": "sec_rule",
            "criteria": {
                "min_severity": "medium"
            },
            "actions": {
                "webhooks": [
                    "sec_webhook"
                ],
                "block_download": {
                    "active": true,
                    "unscanned": true
                },
                "block_release_bundle_distribution": true,
                "block_release_bundle_promotion": true,
                "fail_build": true
            },
            "priority": 1
        }
    ]
}