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

# filter_grammar

> sift/filters/v1/filter_grammar.proto

<a name="sift_filters_v1_filter_grammar-proto" />

<a name="sift_filters_v1_filter_grammar-proto-services" />

## Services

*RPC methods exposed by this API.*

### FilterGrammarService

FilterGrammarService describes the CEL filter capabilities shared by every
resource: the operators and member functions available for each built-in
field type, plus the functions usable anywhere in an expression. It does not
vary by resource, org, or user, so a client fetches it once and caches it,
then uses it to render and label the per-field tokens returned in FilterField.

| Method           | Request                                             | Response                                              | Description |
| :--------------- | :-------------------------------------------------- | :---------------------------------------------------- | :---------- |
| GetFilterGrammar | [GetFilterGrammarRequest](#getfiltergrammarrequest) | [GetFilterGrammarResponse](#getfiltergrammarresponse) |             |

<a name="sift_filters_v1_filter_grammar-proto-messages" />

## Messages

*Data models used across requests/responses.*

### FilterFunction

A CEL function, with display copy for a UI.

| Field         | Type   | Label | Description                                                   |
| :------------ | :----- | :---- | :------------------------------------------------------------ |
| name          | string |       | The CEL function name, e.g. "contains", "getFullYear", "now". |
| display\_name | string |       | Short label for a UI control, e.g. "Contains", "Year".        |
| description   | string |       | Optional longer explanation of what the function does.        |

### FilterOperator

A CEL infix operator, with display copy for a UI.

| Field         | Type   | Label | Description                                               |
| :------------ | :----- | :---- | :-------------------------------------------------------- |
| token         | string |       | The literal CEL token, e.g. "==", "!=", "\<", "in".       |
| display\_name | string |       | Short label for a UI control, e.g. "Equals", "In".        |
| description   | string |       | Optional longer explanation of what the operator matches. |

### FilterTypeGrammar

FilterTypeGrammar lists the operators and member functions valid for one
built-in field type.

| Field     | Type                                                              | Label    | Description |
| :-------- | :---------------------------------------------------------------- | :------- | :---------- |
| type      | [sift.common.v1.FilterFieldType](#sift-common-v1-filterfieldtype) |          |             |
| operators | [FilterOperator](#filteroperator)                                 | repeated |             |
| functions | [FilterFunction](#filterfunction)                                 | repeated |             |

### GetFilterGrammarRequest

The request for a call to `FilterGrammarService_GetFilterGrammar`.

*This message has no fields.*

### GetFilterGrammarResponse

The response of a call to `FilterGrammarService_GetFilterGrammar`.

| Field             | Type                                    | Label    | Description                                                                                                         |
| :---------------- | :-------------------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------ |
| types             | [FilterTypeGrammar](#filtertypegrammar) | repeated | Operators and member functions available for each built-in field type.                                              |
| global\_functions | [FilterFunction](#filterfunction)       | repeated | Functions usable anywhere in an expression rather than bound to a field, e.g. now(), duration(...), timestamp(...). |

<a name="sift_filters_v1_filter_grammar-proto-enums" />

## Enums

*Allowed constant values used in message fields.*
