Get a policy configuration by ID
GET/accounts/{account_id}/data-security/posture/policies/{policy_id}
Retrieves the details of a specific policy configuration, including its associated remediation and webhook actions.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Get a policy configuration by ID
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/data-security/posture/policies/$POLICY_ID \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://api-docs.dnstools.im/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://api-docs.dnstools.im/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"actions": {
"remediation_types": [
{
"display_name": "Remove Public Access",
"remediation_type": "remove_public_access",
"remediation_type_id": "5a7d9e2f-1b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
],
"webhook_configs": [
{
"display_name": "Send to Slack",
"webhook_config_id": "3f7b8c9d-6e5a-4f3b-9c2d-1e0a8b7c6d5e"
}
]
},
"applies_to_all_integrations": false,
"created_at": "2025-03-18T17:25:38.700541Z",
"description": "Automatically remove public access from files when detected",
"display_name": "Auto-remediate public files",
"enabled": true,
"finding_type_id": "5a7d9e2f-1b3c-4d5e-8f6a-7b8c9d0e1f2a",
"integration_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"updated_at": "2025-03-18T17:25:38.700541Z",
"disabled_at": "2025-03-18T17:25:38.700541Z",
"last_triggered_at": "2025-03-18T17:25:38.700541Z"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://api-docs.dnstools.im/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"messages": [
{
"code": 1000,
"message": "Request processed successfully",
"documentation_url": "https://api-docs.dnstools.im/api/operations/list-findings",
"source": {
"pointer": "/data/attributes/name"
}
}
],
"success": true,
"result": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"actions": {
"remediation_types": [
{
"display_name": "Remove Public Access",
"remediation_type": "remove_public_access",
"remediation_type_id": "5a7d9e2f-1b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
],
"webhook_configs": [
{
"display_name": "Send to Slack",
"webhook_config_id": "3f7b8c9d-6e5a-4f3b-9c2d-1e0a8b7c6d5e"
}
]
},
"applies_to_all_integrations": false,
"created_at": "2025-03-18T17:25:38.700541Z",
"description": "Automatically remove public access from files when detected",
"display_name": "Auto-remediate public files",
"enabled": true,
"finding_type_id": "5a7d9e2f-1b3c-4d5e-8f6a-7b8c9d0e1f2a",
"integration_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"updated_at": "2025-03-18T17:25:38.700541Z",
"disabled_at": "2025-03-18T17:25:38.700541Z",
"last_triggered_at": "2025-03-18T17:25:38.700541Z"
}
}