> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rule expression grammar

> Returns the canonical grammar for the rule expression language: the variable forms, operators, aggregate functions, and window units a rule condition may use. Use it to build an editor or to validate expressions before saving a rule. The response is a description of the language and does not depend on any project.



## OpenAPI

````yaml GET /rules/syntax
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /rules/syntax:
    get:
      summary: Get rule expression grammar
      description: >-
        Returns the canonical grammar for the rule expression language: the
        variable forms, operators, aggregate functions, and window units a rule
        condition may use. Use it to build an editor or to validate expressions
        before saving a rule. The response is a description of the language and
        does not depend on any project.
      operationId: get-rule-syntax
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    variables:
                      description: >-
                        Reference data with {{...}} placeholders. Form depends
                        on the rule's target_type.
                      forms:
                        - syntax: '{{data-point.<slug>}}'
                          description: Event data point by slug. Used in data_point rules.
                          example: '{{data-point.carbon_content}}'
              schema:
                type: object
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````