Patch Policy
Route
/v2/policies/{id}
Description
Update specific fields of an existing policy. The 'If-Match' header with the resource version can be optionally specified for concurrency control.
Method
PATCH
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id of the policy to patch |
disabled | boolean | Yes | Whether the policy is disabled |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | string | No | Specifies which fields to update (if not provided, all fields are updated) |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
If-Match | string | No | Resource version for concurrency control |
Request Body
{
"disabled": true
}
Output
| Field | Type | Description |
|---|---|---|
type | string | Always "policies" |
size | integer | Number of policies returned (always 1) |
resources | array[Policy] | Array containing the updated policy |
errors | array[Error] | Any errors encountered |
Rate Limit
- 60 requests per minute per API key
- 5 concurrent requests per endpoint
Example Response
{
"type": "policies",
"size": 1,
"resources": [
{
"id": "policy-123",
"version": "v1.2.5",
"type": "data_protection",
"name": "Customer PII Protection",
"description": "Protect customer personal information",
"severity": "high",
"disabled": true,
"selection_type": "dataset",
"dataset_ids": ["dataset-456"],
"created_at": "2024-01-15T10:30:00Z",
"last_modified": "2024-01-25T17:30:00Z"
}
],
"errors": []
}