Query Parsing

Parses a query

Parses a query and returns the parsed query. If the query is invalid, an error is returned.

post/v1/query/parse

Request

  • Base URL
    https://docs.grepr.ai (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header GREPR-API-KEY
    • or OpenID Connect (https://grepr-prod.us.auth0.com/.well-known/openid-configuration)

Request body

validationTarget'PARSED_QUERY_NODE' | 'EVENT_PREDICATE'

Which runtime representation to validate the query against. Defaults to PARSED_QUERY_NODE (returns the parsed tree for the in-browser matcher). Use EVENT_PREDICATE to validate against the Java predicate the Flink pipeline runs; no parsed tree is returned in that case.

Example request

{
  "query": {
    "query": "service:grepr-service-1"
  }
}

Response

Query is parsed successfully.

errorMessagestring

The error message if there is an error

validboolean

Whether a query is valid.

Example response

{
  "parsedQuery": {
    "root": {
      "attribute": "\"service\"",
      "term": "\"grepr-service-1\""
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.