Get Rule

JFrog REST APIs

Content Type
REST API

Description: Retrieve a specific rule by ID. You can optionally use the expand=template query parameter to include full template details.

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

Path Parameters:

Name

Type

Required

Description

ruleId

string

Yes

Unique identifier of the rule to retrieve

Query Parameters:

Parameter

Type

Required

Description

expand

string

Optional

Expand related entities, such as template

Sample Response:

{
  "id": "12345",
  "name": "Critical Vulnerability Check",
  "description": "Checks for critical security vulnerabilities in artifacts",
  "is_custom": false,
  "template_id": "67890",
  "template": {
    "id": "67890",
    "name": "Security Vulnerability Template",
    "category": "security",
    "scanners": ["sca"],
    "data_source_type": "xray"
  },
  "parameters": [
    {
      "name": "severity_threshold",
      "value": "critical"
    },
    {
      "name": "max_vulnerabilities",
      "value": "5"
    }
  ],
  "created_at": "2024-01-10T09:00:00Z",
  "created_by": "admin",
  "updated_at": "2024-02-01T11:15:00Z",
  "updated_by": "security-team"
}

Code Status

Code

Status

200

Success

401

Unauthorized

403

Forbidden

404

Internet server error

500

Internal Server Error