eCDN Logpush Filter

A successful response returns 201.

The following table shows the supported comparison operators along with example values.

To add filters, provide the filter criteria in the form of escaped JSON strings with the format {\"where\":{\"key"\:\"<field>\",\"operator\":\"<comparison_operator>\",\"value\":\"<value>\"}}.

The \“Key”\ field value must correspond to one of the available fields listed in eCDN Logpush Log Field.

NameOperator NotationSupported Field TypesExample
EqualeqString, Int, Bool{\“where\":{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}}
Not equal!eqString, Int, Bool{\“where\":{\"key\":\"ClientCountry\",\"operator\":\"!eq\",\"value\":\"ca\"}}
Less thanltInt{\“where\":{\"key\":\"BotScore\",\"operator\":\"lt\",\"value\":\"30\"}}
Less than or equalleqInt{\“where\":{\"key\":\"BotScore\",\"operator\":\"leq\",\"value\":\"30\"}}
Greater thangtInt{\“where\":{\"key\":\"BotScore\",\"operator\":\"gt\",\"value\":\"30\"}}
Greater than or equalgeqInt{\“where\":{\"key\":\"BotScore\",\"operator\":\"geq\",\"value\":\"30\"}}
Starts withstartsWithString{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"startsWith\",\"value\":\"/foo\"}}
Ends withendsWithString{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"endsWith\",\"value\":\"/foo\"}}
Does not start with!startsWithString{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"!startsWith\",\"value\":\"/foo\"}}
Does not end with!endsWithString{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"!endsWith\",\"value\":\"/foo\"}}
ContainscontainsString, Bool{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"contains\",\"value\":\"/static\"}}
Does not contain!containsString, Bool{\“where\":{\"key\":\"ClientRequestPath\",\"operator\":\"!contains\",\"value\":\"/static\"}}
Value is in a set of valuesinString, Int, Array{\“where\":{\"key\":\"EdgeResponseStatus\",\"operator\":\"in\",\"value\":[200,201]}}
Value is not in a set of values!inString, Int, Array{\“where\":{\"key\":\"EdgeResponseStatus\",\"operator\":\"!in\",\"value\":[200,201]}}
  • Filters can be connected using AND, OR logical operators.
  • Logical operators can be nested.

Here are some examples of how the logical operators can be implemented. X, Y, and Z are used to represent filter criteria:

  • X AND Y AND Z - {"where":{"and":[{X},{Y},{Z}]}}
  • X OR Y OR Z - {"where":{"or":[{X},{Y},{Z}]}}
  • X AND (Y OR Z) - {"where":{"and":[{X}, {"or":[{Y},{Z}]}]}}
  • (X AND Y) OR Z - {"where":{"or":[{"and": [{X},{Y}]},{Z}]}}

In this example, the eCDN logpush job sends the logs to the S3 bucket only if the log has ClientRequestPath that contains “/example-path” and EdgeResponseStatus includes 502, 503, and 504.