Skip to main content
Monitoring & Collection/Logging

ValidateRegex

Validate a regular expression pattern for safety and correctness before use in filters

POST/api/v1/logs/tail/validate-regex

Operation ID

ValidateRegex

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • pattern
    StringRequired

    Regular expression pattern to validate for correctness and safety

    Example: error.*timeout

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • pattern
    String

    The regular expression pattern that was validated

    Example: error.*timeout

  • valid
    Boolean

    Whether the pattern is syntactically valid

    Example: true

  • safe
    Boolean

    Whether the pattern is safe from catastrophic backtracking (ReDoS)

    Example: true

  • error
    String

    Validation error message when valid is false

    Example: unexpected end of pattern