Skip to main content

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

ParameterTypeRequiredDescription
idstringYesThe id of the policy to patch
disabledbooleanYesWhether the policy is disabled

Query Parameters

ParameterTypeRequiredDescription
fieldsstringNoSpecifies which fields to update (if not provided, all fields are updated)

Headers

HeaderTypeRequiredDescription
If-MatchstringNoResource version for concurrency control

Request Body

{
"disabled": true
}

Output

FieldTypeDescription
typestringAlways "policies"
sizeintegerNumber of policies returned (always 1)
resourcesarray[Policy]Array containing the updated policy
errorsarray[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": []
}