| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/api/resources/fraud/methods/update | [Back] [Original] |
Update Fraud Detection settings for a zone.
Notes on username_expressions behavior:
[], all expressions will be cleared.The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYThe previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Fraud Detection WriteConfiguration for classifying login authentication outcomes based on the origin response.
Requires user_profiles to be enabled.
success_criteria
leaves failure codes untouched, and vice versa.authentication_settings entirely to leave both unchanged.Criterion for identifying failed login responses.
HTTP status codes to match against the origin response.
[] to clear codes on update.Criterion for identifying successful login responses.
HTTP status codes to match against the origin response.
[] to clear codes on update.List of expressions to detect usernames in write HTTP requests.
[] to clear all expressions on update.messages array.Configuration for classifying login authentication outcomes based on the origin response.
Requires user_profiles to be enabled.
success_criteria
leaves failure codes untouched, and vice versa.authentication_settings entirely to leave both unchanged.Criterion for identifying failed login responses.
HTTP status codes to match against the origin response.
[] to clear codes on update.Criterion for identifying successful login responses.
HTTP status codes to match against the origin response.
[] to clear codes on update.List of expressions to detect usernames in write HTTP requests.
[] to clear all expressions on update.messages array.curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/fraud_detection/settings \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"user_profiles": "disabled",
"username_expressions": [
"string"
]
}'{
"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": {
"authentication_settings": {
"failure_criteria": {
"kind": "status_code",
"status_codes": [
200,
201
]
},
"success_criteria": {
"kind": "status_code",
"status_codes": [
200,
201
]
}
},
"user_profiles": "disabled",
"username_expressions": [
"http.request.body.form[\"username\"][0]",
"lookup_json_string(http.request.body.raw, \"username\")"
]
}
}{
"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": {
"authentication_settings": {
"failure_criteria": {
"kind": "status_code",
"status_codes": [
200,
201
]
},
"success_criteria": {
"kind": "status_code",
"status_codes": [
200,
201
]
}
},
"user_profiles": "disabled",
"username_expressions": [
"http.request.body.form[\"username\"][0]",
"lookup_json_string(http.request.body.raw, \"username\")"
]
}
}| Web Proxy Viewer | New URL | Original Page |