Update a custom detection location of a zone.
PUT/zones/{zone_id}/leaked-credential-checks/detections/{detection_id}
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.
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)
Path Parameters
Body ParametersJSON
Update a custom detection location of a zone.
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/leaked-credential-checks/detections/$DETECTION_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"password": "lookup_json_string(http.request.body.raw, \\"secret\\")",
"username": "lookup_json_string(http.request.body.raw, \\"user\\")"
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "18a14bafaa8eb1df04ce683ec18c765e",
"password": "lookup_json_string(http.request.body.raw, \"secret\")",
"username": "lookup_json_string(http.request.body.raw, \"user\")"
},
"success": true
}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"
}
}
],
"result": {
"id": "18a14bafaa8eb1df04ce683ec18c765e",
"password": "lookup_json_string(http.request.body.raw, \"secret\")",
"username": "lookup_json_string(http.request.body.raw, \"user\")"
},
"success": true
}