Update Rule

JFrog REST APIs

Content Type
REST API

Description: Updates the definition of an existing rule with new values. PUT replaces the full rule representation—send the complete desired state, including parameters. Updates take effect immediately for any policies that reference this rule.

Usage: PUT https://{{artifactory-host}}/unifiedpolicy/api/v1/rules/{ruleId}

Consumes: application/json

Produces: application/json

Path Parameters:

Parameter

Type

Required/Optional

Description

name

string

Required

Updated rule name.

description

string

Optional

Updated description of the rule purpose.

is_custom

boolean

Optional

 

template_id

string

Required

Template ID the rule references. May remain unchanged or be switched to a compatible template.

parameters

array[object]

Required

Complete parameter list for the rule. Each entry must match the template’s parameter schema.

parameters[] object

Parameter

Type

Required

Description

name

string

required

Template parameter name.

value

string

 

Assigned value. Use string form; validation follows the template schema.

Sample Request

PUT 'https://{host}.jfrog.io/apptrust/api/v1/rules/rule-12345'
Content-Type: application/json
Authorization: Bearer <token>

{
  "name": "High+ CVEs (7.0–10.0)",
  "description": "Triggers on High and Critical CVEs; skip Not Applicable",
  "is_custom": false,
  "template_id": "tmpl-cve-severity",
  "parameters": [
    { "name": "CVE_severity", "value": "High" },
    { "name": "min_value", "value": "7.0" },
    { "name": "max_value", "value": "10.0" },
    { "name": "skip_not_applicable", "value": "true" }
  ]
}

Sample Response

{
  "id": "rule-12345",
  "name": "High+ CVEs (7.0–10.0)",
  "description": "Triggers on High and Critical CVEs; skip Not Applicable",
  "is_custom": false,
  "template_id": "tmpl-cve-severity",
  "template_name": "CVE Severity Range",
  "parameters": [
    { "name": "CVE_severity", "value": "High" },
    { "name": "min_value", "value": "7.0" },
    { "name": "max_value", "value": "10.0" },
    { "name": "skip_not_applicable", "value": "true" }
  ],
  "created_at": "2025-10-09T10:25:00Z",
  "created_by": "admin",
  "updated_at": "2025-10-09T10:40:10Z",
  "updated_by": "admin"
}

Status Codes

Code

Description

200

Rule updated successfully

400

Bad Request (validation error)

401

Unauthorized

403

404

409

Conflict (e.g., name already in use, incompatible update)

500

Internal Server Error