CreateCalculatedChannel
curl --request POST \
--url https://api.siftstack.com/api/v2/calculated-channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"calculatedChannelConfiguration": {
"assetConfiguration": {
"allAssets": true
},
"queryConfiguration": {}
},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"userNotes": "<string>",
"units": "<string>",
"clientKey": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/calculated-channels"
payload = {
"name": "<string>",
"calculatedChannelConfiguration": {
"assetConfiguration": { "allAssets": True },
"queryConfiguration": {}
},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"userNotes": "<string>",
"units": "<string>",
"clientKey": "<string>"
}
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/v2/calculated-channels"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"calculatedChannelConfiguration\": {\n \"assetConfiguration\": {\n \"allAssets\": true\n },\n \"queryConfiguration\": {}\n },\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"description\": \"<string>\",\n \"userNotes\": \"<string>\",\n \"units\": \"<string>\",\n \"clientKey\": \"<string>\"\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))
}{
"calculatedChannel": {
"calculatedChannelId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"changeMessage": "<string>",
"userNotes": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"calculatedChannelConfiguration": {
"assetConfiguration": {
"allAssets": true,
"selection": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
}
},
"queryConfiguration": {
"sel": {
"expression": "<string>",
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelIdentifier": "<string>"
}
]
}
}
},
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"clientKey": "<string>",
"archivedDate": "2023-11-07T05:31:56Z",
"units": "<string>"
},
"inapplicableAssets": [
{
"assetId": "<string>",
"tagNames": [
"<string>"
],
"missingChannels": [
"<string>"
],
"assetName": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}CalculatedChannelService
CreateCalculatedChannel
Create a calculated channel.
POST
/
api
/
v2
/
calculated-channels
CreateCalculatedChannel
curl --request POST \
--url https://api.siftstack.com/api/v2/calculated-channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"calculatedChannelConfiguration": {
"assetConfiguration": {
"allAssets": true
},
"queryConfiguration": {}
},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"userNotes": "<string>",
"units": "<string>",
"clientKey": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/calculated-channels"
payload = {
"name": "<string>",
"calculatedChannelConfiguration": {
"assetConfiguration": { "allAssets": True },
"queryConfiguration": {}
},
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"description": "<string>",
"userNotes": "<string>",
"units": "<string>",
"clientKey": "<string>"
}
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/v2/calculated-channels"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"calculatedChannelConfiguration\": {\n \"assetConfiguration\": {\n \"allAssets\": true\n },\n \"queryConfiguration\": {}\n },\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"description\": \"<string>\",\n \"userNotes\": \"<string>\",\n \"units\": \"<string>\",\n \"clientKey\": \"<string>\"\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))
}{
"calculatedChannel": {
"calculatedChannelId": "<string>",
"organizationId": "<string>",
"versionId": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"changeMessage": "<string>",
"userNotes": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"modifiedDate": "2023-11-07T05:31:56Z",
"calculatedChannelConfiguration": {
"assetConfiguration": {
"allAssets": true,
"selection": {
"assetIds": [
"<string>"
],
"tagIds": [
"<string>"
]
}
},
"queryConfiguration": {
"sel": {
"expression": "<string>",
"expressionChannelReferences": [
{
"channelReference": "<string>",
"channelIdentifier": "<string>"
}
]
}
}
},
"createdByUserId": "<string>",
"modifiedByUserId": "<string>",
"functionDependencies": [
{
"userDefinedFunctionVersionId": "<string>"
}
],
"metadata": [
{
"key": {
"name": "<string>",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2023-11-07T05:31:56Z"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
],
"clientKey": "<string>",
"archivedDate": "2023-11-07T05:31:56Z",
"units": "<string>"
},
"inapplicableAssets": [
{
"assetId": "<string>",
"tagNames": [
"<string>"
],
"missingChannels": [
"<string>"
],
"assetName": "<string>"
}
]
}{
"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