List Rules

JFrog REST APIs

Content Type
REST API

Description: Retrieve a list of all defined rules. You can filter results by ID, name, scanner type, or template attributes, and control pagination and sorting.

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

Query Parameters:

Parameter

Type

Required

Description

id

array[string]

Optional

Filter by rule IDs

name

array[string]

Optional

Filter by rule names

scanner_types

array[string]

Optional

Filter by scanner types (e.g., sca, secrets)

template_data_source

string

Optional

Filter by template data source (e.g., xray, catalog)

template_category

string

Optional

Filter by template category (e.g., security, quality)

expand

string

Optional

Expand related fields, such as template

page

integer

Optional

Page offset (default: 0)

limit

integer

Optional

Items per page (1-250, default: 100)

sort_by

string

Optional

Sort field: namecreated_at

sort_order

string

Optional

Sort direction: ascdesc

Sample Response:

{
  "items": [
    {
      "id": "12345",
      "name": "Critical Vulnerability Check",
      "description": "Checks for critical vulnerabilities in artifacts",
      "is_custom": false,
      "template_id": "67890",
      "template_name": "Security Vulnerability Template",
      "created_at": "2024-01-10T09:00:00Z",
      "created_by": "admin",
      "updated_at": "2024-02-01T11:15:00Z",
      "updated_by": "security-team",
      "parameters": [
        {
          "name": "severity_threshold",
          "value": "critical"
        },
        {
          "name": "max_vulnerabilities",
          "value": "5"
        }
      ]
    }
  ],
  "offset": 0,
  "limit": 100,
  "page_size": 1,
  "total_count": 1
}

Code Status

Code

Status

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error