Fetches a Page Shield policy by ID.
/zones/{zone_id}/page_shield/policies/{policy_id}
get
Page Shield
page-shield-get-a-page-shield-policy
{
"business": true,
"enterprise": true,
"free": false,
"pro": true
} null [
{
"in": "path",
"name": "zone_id",
"required": true,
"schema": {
"description": "Identifier",
"example": "023e105f4ecef8ad9ca31a8372d0c353",
"maxLength": 32,
"readOnly": true,
"type": "string"
}
},
{
"in": "path",
"name": "policy_id",
"required": true,
"schema": {
"description": "The ID of the policy.",
"example": "c9ef84a6bf5e47138c75d95e2f933e8f",
"maxLength": 32,
"minLength": 32,
"type": "string"
}
}
] null {
"200": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"properties": {
"action": {
"description": "The action to take if the expression matches",
"enum": [
"allow",
"log"
],
"example": "allow",
"type": "string"
},
"description": {
"description": "A description for the policy",
"example": "Checkout page CSP policy",
"type": "string"
},
"enabled": {
"description": "Whether the policy is enabled",
"example": true,
"type": "boolean"
},
"expression": {
"description": "The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax",
"example": "ends_with(http.request.uri.path, \"/checkout\")",
"type": "string"
},
"id": {
"description": "The ID of the policy",
"example": "c9ef84a6bf5e47138c75d95e2f933e8f",
"type": "string"
},
"value": {
"description": "The policy which will be applied",
"example": "script-src 'none';",
"type": "string"
}
}
}
]
}
}
},
"description": "Get a Page Shield policy response"
},
"4XX": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"properties": {
"action": {
"description": "The action to take if the expression matches",
"enum": [
"allow",
"log"
],
"example": "allow",
"type": "string"
},
"description": {
"description": "A description for the policy",
"example": "Checkout page CSP policy",
"type": "string"
},
"enabled": {
"description": "Whether the policy is enabled",
"example": true,
"type": "boolean"
},
"expression": {
"description": "The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax",
"example": "ends_with(http.request.uri.path, \"/checkout\")",
"type": "string"
},
"id": {
"description": "The ID of the policy",
"example": "c9ef84a6bf5e47138c75d95e2f933e8f",
"type": "string"
},
"value": {
"description": "The policy which will be applied",
"example": "script-src 'none';",
"type": "string"
}
}
}
]
},
{
"properties": {
"errors": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": [
{
"code": 7003,
"message": "No route for the URI"
}
],
"minLength": 1
},
"messages": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": []
},
"result": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"success": {
"description": "Whether the API call was successful",
"enum": [
false
],
"example": false,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
}
]
}
}
},
"description": "Get a Page Shield policy response failure"
}
} [
{
"api_email": [],
"api_key": []
}
]