-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:logsRelated to LogsRelated to Logs
Description
Existing documentation URL(s)
What changes are you suggesting?
The second "filter" example here, given as
# Filter when the status code returned from Cloudflare is either 200 or 201:
"filter": "{\"where\":{\"and\":[{\"key\":\"EdgeResponseStatus\",\"operator\":\"in\",\"value\":\"200,201\"}]}}"
will throw an error when given as-is:
$ curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/logpush/edge/jobs" --request POST --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" --json '{
"fields": "ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,ClientSSLProtocol,ClientSSLCipher,OriginResponseBytes,OriginResponseStatus",
"sample": 100,
"filter": "{\"where\":{\"and\":[{\"key\":\"EdgeResponseStatus\",\"operator\":\"in\",\"value\":\"200,201\"}]}}",
"kind": "instant-logs"
}'
{"errors":[{"code":1004,"message":"creating a new instant logs job is not allowed: bad predicate: failed to decode value \"\\\"200,201\\\"\", supported kinds: []uint64"}],"messages":[],"result":null,"success":false}
Suggested edit:
# Filter when the status code returned from Cloudflare is either 200 or 201:
"filter": "{\"where\":{\"and\":[{\"key\":\"EdgeResponseStatus\",\"operator\":\"in\",\"value\":[200,201]}]}}"
Additional information
No response
Metadata
Metadata
Assignees
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:logsRelated to LogsRelated to Logs