> ## 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.

# calculated_channels

> sift/calculated_channels/v1/calculated_channels.proto

<a name="sift_calculated_channels_v1_calculated_channels-proto" />

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

## Services

*RPC methods exposed by this API.*

### CalculatedChannelsService

| Method                    | Request                                                               | Response                                                                | Description                                                                                        |
| :------------------------ | :-------------------------------------------------------------------- | :---------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- |
| ListExpressionIdentifiers | [ListExpressionIdentifiersRequest](#listexpressionidentifiersrequest) | [ListExpressionIdentifiersResponse](#listexpressionidentifiersresponse) | Retrieves a list of valid identifiers that can be used as part of a calculated channel expression. |
| ValidateExpression        | [ValidateExpressionRequest](#validateexpressionrequest)               | [ValidateExpressionResponse](#validateexpressionresponse)               | Used to validate whether or not an expression used for a calculated channel is valid.              |

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

## Messages

*Data models used across requests/responses.*

### ErrorValidatingExpressionResult

| Field          | Type   | Label | Description |
| :------------- | :----- | :---- | :---------- |
| error\_message | string |       |             |

### ExpressionChannelReference

| Field                                                     | Type                                    | Label | Description |
| :-------------------------------------------------------- | :-------------------------------------- | :---- | :---------- |
| channel\_reference                                        | string                                  |       |             |
| channel\_id                                               | string                                  |       |             |
| oneof calculated\_channel\_reference. calculated\_channel | [ExpressionRequest](#expressionrequest) |       |             |

### ExpressionIdentifier

| Field         | Type                                                        | Label | Description |
| :------------ | :---------------------------------------------------------- | :---- | :---------- |
| name          | string                                                      |       |             |
| description   | string                                                      |       |             |
| type          | [ExpressionIdentifierType](#expressionidentifiertype)       |       |             |
| display\_name | string                                                      |       |             |
| library       | [ExpressionIdentifierLibrary](#expressionidentifierlibrary) |       |             |

### ExpressionRequest

| Field                           | Type                                                                                  | Label    | Description                                                                                                                                                                                        |
| :------------------------------ | :------------------------------------------------------------------------------------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| channel\_references             | [ExpressionRequest.ChannelReferencesEntry](#expressionrequest-channelreferencesentry) | repeated | **Deprecated.** A map from the channel reference in the expression string (e.g. \$1) to the channel id (uuid). This is deprecated and should be passed in expression\_channel\_references instead. |
| expression                      | string                                                                                |          |                                                                                                                                                                                                    |
| expression\_channel\_references | [ExpressionChannelReference](#expressionchannelreference)                             | repeated |                                                                                                                                                                                                    |
| function\_dependencies          | [sift.common.type.v1.FunctionDependency](#sift-common-type-v1-functiondependency)     | repeated |                                                                                                                                                                                                    |

### ExpressionRequest.ChannelReferencesEntry

| Field | Type   | Label | Description |
| :---- | :----- | :---- | :---------- |
| key   | string |       |             |
| value | string |       |             |

### ListExpressionIdentifiersRequest

| Field       | Type                              | Label | Description                      |
| :---------- | :-------------------------------- | :---- | :------------------------------- |
| page\_size  | uint32                            |       | Defaults to 1000. Max of 10,000. |
| page\_token | string                            |       |                                  |
| mode        | [ExpressionMode](#expressionmode) |       |                                  |

### ListExpressionIdentifiersResponse

| Field             | Type                                          | Label    | Description |
| :---------------- | :-------------------------------------------- | :------- | :---------- |
| identifiers       | [ExpressionIdentifier](#expressionidentifier) | repeated |             |
| next\_page\_token | string                                        | optional |             |

### SuccessValidatingExpressionResult

| Field      | Type                                                                        | Label | Description |
| :--------- | :-------------------------------------------------------------------------- | :---- | :---------- |
| data\_type | [sift.common.type.v1.ChannelDataType](#sift-common-type-v1-channeldatatype) |       |             |

### ValidateExpressionRequest

| Field      | Type                                    | Label | Description |
| :--------- | :-------------------------------------- | :---- | :---------- |
| expression | [ExpressionRequest](#expressionrequest) |       |             |
| mode       | [ExpressionMode](#expressionmode)       |       |             |

### ValidateExpressionResponse

| Field                 | Type                                                                    | Label | Description |
| :-------------------- | :---------------------------------------------------------------------- | :---- | :---------- |
| oneof result. error   | [ErrorValidatingExpressionResult](#errorvalidatingexpressionresult)     |       |             |
| oneof result. success | [SuccessValidatingExpressionResult](#successvalidatingexpressionresult) |       |             |

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

## Enums

*Allowed constant values used in message fields.*

### ExpressionIdentifierLibrary

| Name                                                      | Number | Description |
| :-------------------------------------------------------- | :----- | :---------- |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_UNSPECIFIED              | 0      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_MATH                     | 1      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_STRING                   | 2      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_LIST                     | 3      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_ITER                     | 4      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_STATEFUL                 | 5      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_SUMMARY                  | 6      |             |
| EXPRESSION\_IDENTIFIER\_LIBRARY\_USER\_DEFINED\_FUNCTIONS | 7      |             |

### ExpressionIdentifierType

| Name                                      | Number | Description     |
| :---------------------------------------- | :----- | :-------------- |
| EXPRESSION\_IDENTIFIER\_TYPE\_UNSPECIFIED | 0      | **Deprecated.** |
| EXPRESSION\_IDENTIFIER\_TYPE\_FUNCTION    | 1      |                 |
| EXPRESSION\_IDENTIFIER\_TYPE\_CHANNEL     | 2      |                 |

### ExpressionMode

| Name                                   | Number | Description     |
| :------------------------------------- | :----- | :-------------- |
| EXPRESSION\_MODE\_UNSPECIFIED          | 0      | **Deprecated.** |
| EXPRESSION\_MODE\_RULES                | 1      |                 |
| EXPRESSION\_MODE\_CALCULATED\_CHANNELS | 2      |                 |
| EXPRESSION\_MODE\_RULER                | 3      |                 |
| EXPRESSION\_MODE\_STRUCTURED\_DATA     | 4      |                 |
