Get Policies

JFrog REST APIs

Content Type
REST API

Description: Retrieve a list of lifecycle policies. Use filters to narrow by mode, scope, stage/gate, and more. Supports pagination and sorting.

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

Query Parameters:

Parameter

Type

Required

Description

enabled

boolean

No

Filter by enabled status.

mode

string

No

block or warning.

action_type

string

No

Action type (e.g., certify_to_gate).

scope_type

string

No

project or application.

stage_key

array[string]

No

Filter by stage keys.

stage_gate

array[string]

No

Gate filter: entry, exit, release.

project_key

string

No

Filter by project key.

application_key

array[string]

No

Filter by application keys.

application_labels

object

No

Exact label matches.

expand

string

No

Use rules to include rule summaries.

page

integer

No

Page offset (default: 0).

limit

integer

No

Items per page (1–250, default: 100).

sort_by

string

No

Sort field (e.g., name, created_at).

sort_order

string

No

asc or desc.

Sample Response:

{
  "items": [
    {
      "id": "policy-1001",
      "name": "Production Security Policy",
      "enabled": true,
      "mode": "block",
      "action": { "type": "certify_to_gate", "stage": { "key": "production", "gate": "entry" } },
      "scope": { "type": "project", "project_keys": ["my-project"] },
      "rules": [{ "id": "rule-12345" }, { "id": "rule-67890" }]
    }
  ],
  "offset": 0,
  "limit": 20,
  "page_size": 1,
  "total_count": 1
}

Status Codes

Code

Status

200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error