ValidateExpression
curl --request POST \
--url https://api.siftstack.com/api/v1/calculated-channels:validate-expression \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expression": {
"expression": "<string>",
"channelReferences": {},
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelId": "<string>"
}
],
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
},
"mode": "EXPRESSION_MODE_UNSPECIFIED"
}
'import requests
url = "https://api.siftstack.com/api/v1/calculated-channels:validate-expression"
payload = {
"expression": {
"expression": "<string>",
"channelReferences": {},
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelId": "<string>"
}
],
"functionDependencies": [{ "userDefinedFunctionVersionId": "<string>" }]
},
"mode": "EXPRESSION_MODE_UNSPECIFIED"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/calculated-channels:validate-expression"
payload := strings.NewReader("{\n \"expression\": {\n \"expression\": \"<string>\",\n \"channelReferences\": {},\n \"expressionChannelReferences\": [\n {\n \"channelReference\": \"<string>\",\n \"channelId\": \"<string>\"\n }\n ],\n \"functionDependencies\": [\n {\n \"userDefinedFunctionVersionId\": \"<string>\"\n }\n ]\n },\n \"mode\": \"EXPRESSION_MODE_UNSPECIFIED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"errorMessage": "<string>"
},
"success": {
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}CalculatedChannelsService
ValidateExpression
Used to validate whether or not an expression used for a calculated channel is valid.
POST
/
api
/
v1
/
calculated-channels:validate-expression
ValidateExpression
curl --request POST \
--url https://api.siftstack.com/api/v1/calculated-channels:validate-expression \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expression": {
"expression": "<string>",
"channelReferences": {},
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelId": "<string>"
}
],
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
]
},
"mode": "EXPRESSION_MODE_UNSPECIFIED"
}
'import requests
url = "https://api.siftstack.com/api/v1/calculated-channels:validate-expression"
payload = {
"expression": {
"expression": "<string>",
"channelReferences": {},
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelId": "<string>"
}
],
"functionDependencies": [{ "userDefinedFunctionVersionId": "<string>" }]
},
"mode": "EXPRESSION_MODE_UNSPECIFIED"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/calculated-channels:validate-expression"
payload := strings.NewReader("{\n \"expression\": {\n \"expression\": \"<string>\",\n \"channelReferences\": {},\n \"expressionChannelReferences\": [\n {\n \"channelReference\": \"<string>\",\n \"channelId\": \"<string>\"\n }\n ],\n \"functionDependencies\": [\n {\n \"userDefinedFunctionVersionId\": \"<string>\"\n }\n ]\n },\n \"mode\": \"EXPRESSION_MODE_UNSPECIFIED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"errorMessage": "<string>"
},
"success": {
"dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I