Skip to main content
Monitoring & Collection/Logging
POSTLoggingSince 1.0SynchronousAuth Required

ValidateRegex

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

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • patternStringRequired

    Regular expression pattern to validate for correctness and safety

    Example: error.*timeout

Responses

200 OK

On success, this API returns the following response structure.

  • patternString

    The regular expression pattern that was validated

    Example: error.*timeout

  • validBoolean

    Whether the pattern is syntactically valid

    Example: true

  • safeBoolean

    Whether the pattern is safe from catastrophic backtracking (ReDoS)

    Example: true

  • errorString

    Validation error message when valid is false

    Example: unexpected end of pattern

Endpoint

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

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

Operation ID

ValidateRegex

Permalink

Request Example

curl -X POST '{host}/api/v1/logs/tail/validate-regex' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"pattern":"error.*timeout"}'

Response Example

200
{
  "pattern": "error.*timeout",
  "valid": true,
  "safe": true,
  "error": "unexpected end of pattern"
}

Change History

This API has no change history records yet.

View all change history