Create SYN Protection rule.
POST/accounts/{account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules
Create a SYN Protection rule for an account.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Body ParametersJSON
name: string
The name of the SYN Protection rule. Value is relative to the ‘scope’ setting. For ‘global’ scope, name should be ‘global’. For either the ‘region’ or ‘datacenter’ scope, name should be the actual name of the region or datacenter, e.g., ‘wnam’ or ‘lax’.
Create SYN Protection rule.
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/advanced_tcp_protection/configs/syn_protection/rules \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"burst_sensitivity": "burst_sensitivity",
"mode": "mode",
"name": "name",
"rate_sensitivity": "rate_sensitivity",
"scope": "scope"
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "id",
"burst_sensitivity": "burst_sensitivity",
"created_on": "2019-12-27T18:11:19.117Z",
"mitigation_type": "mitigation_type",
"mode": "mode",
"modified_on": "2019-12-27T18:11:19.117Z",
"name": "name",
"rate_sensitivity": "rate_sensitivity",
"scope": "scope"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "id",
"burst_sensitivity": "burst_sensitivity",
"created_on": "2019-12-27T18:11:19.117Z",
"mitigation_type": "mitigation_type",
"mode": "mode",
"modified_on": "2019-12-27T18:11:19.117Z",
"name": "name",
"rate_sensitivity": "rate_sensitivity",
"scope": "scope"
}
}