Description: Updates an existing lifecycle policy. PUT is a full update—send the complete desired state (including mode, action, scope, and rule IDs).
Usage: PUT https://{{artifactory-host}}/unifiedpolicy/api/v1/policies/{policyId}
Consumes: application/json
Path Parameters:
Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Policy identifier. |
Request Body
Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Updated policy name. |
| string | No | Updated description. |
| boolean | Yes | Whether the policy is active. |
| string | Yes |
|
| object | Yes | Lifecycle action governed by the policy. |
| string | Yes | Action type (e.g., |
| string | Yes | Lifecycle stage key. |
| string | Yes | Lifecycle gate ( |
| object | Yes | Policy scope (project or application). |
| string | Yes |
|
| array[string] | No | Projects to include (for |
| array[string] | No | Applications to include (for |
| array[object] | No | Label filters ( |
| array[string] | Yes | IDs of rules enforced by this policy. |
Sample Request
PUT 'https://{host}.jfrog.io/unifiedpolicy/api/v1/policies/policy-1001'
Content-Type: application/json
Authorization: Bearer <token>
{
"name": "Prod Sec Policy (Warnings First)",
"description": "Warn on High+, block later",
"enabled": true,
"mode": "warning",
"action": { "type": "certify_to_gate", "stage": { "key": "production", "gate": "entry" } },
"scope": { "type": "project", "project_keys": ["my-project"] },
"rule_ids": ["rule-12345"]
}
Sample Response
{
"id": "policy-1001",
"name": "Prod Sec Policy (Warnings First)",
"enabled": true,
"mode": "warning",
"action": { "type": "certify_to_gate", "stage": { "key": "production", "gate": "entry" } },
"scope": { "type": "project", "project_keys": ["my-project"] },
"rule_ids": ["rule-12345"],
"created_at": "2025-10-09T10:30:00Z",
"created_by": "admin",
"updated_at": "2025-10-09T11:00:00Z",
"updated_by": "admin"
}
Status Codes
Code | Description |
|---|---|
200 | Policy updated successfully |
400 | Bad Request (validation error) |
401 | Unauthorized |
403 | Forbidden |
404 | Policy not found |
409 | Conflict (e.g., invalid rule references) |
500 | Internal Server Error |