curl --request PATCH \
--url https://api.siftstack.com/api/v2/calculated-channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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
},
"queryConfiguration": {}
},
"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>"
},
"updateMask": "<string>",
"userNotes": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/calculated-channels"
payload = {
"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 },
"queryConfiguration": {}
},
"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>"
},
"updateMask": "<string>",
"userNotes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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 \"calculatedChannel\": {\n \"calculatedChannelId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"versionId\": \"<string>\",\n \"version\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"changeMessage\": \"<string>\",\n \"userNotes\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"modifiedDate\": \"2023-11-07T05:31:56Z\",\n \"calculatedChannelConfiguration\": {\n \"assetConfiguration\": {\n \"allAssets\": true\n },\n \"queryConfiguration\": {}\n },\n \"createdByUserId\": \"<string>\",\n \"modifiedByUserId\": \"<string>\",\n \"functionDependencies\": [\n {\n \"userDefinedFunctionVersionId\": \"<string>\"\n }\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 \"clientKey\": \"<string>\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"units\": \"<string>\"\n },\n \"updateMask\": \"<string>\",\n \"userNotes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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>"
}
]
}UpdateCalculatedChannel
Update and create a new version of a calculated channel.
curl --request PATCH \
--url https://api.siftstack.com/api/v2/calculated-channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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
},
"queryConfiguration": {}
},
"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>"
},
"updateMask": "<string>",
"userNotes": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v2/calculated-channels"
payload = {
"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 },
"queryConfiguration": {}
},
"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>"
},
"updateMask": "<string>",
"userNotes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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 \"calculatedChannel\": {\n \"calculatedChannelId\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"versionId\": \"<string>\",\n \"version\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"changeMessage\": \"<string>\",\n \"userNotes\": \"<string>\",\n \"createdDate\": \"2023-11-07T05:31:56Z\",\n \"modifiedDate\": \"2023-11-07T05:31:56Z\",\n \"calculatedChannelConfiguration\": {\n \"assetConfiguration\": {\n \"allAssets\": true\n },\n \"queryConfiguration\": {}\n },\n \"createdByUserId\": \"<string>\",\n \"modifiedByUserId\": \"<string>\",\n \"functionDependencies\": [\n {\n \"userDefinedFunctionVersionId\": \"<string>\"\n }\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 \"clientKey\": \"<string>\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"units\": \"<string>\"\n },\n \"updateMask\": \"<string>\",\n \"userNotes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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
The request for a call to CalculatedChannelService_UpdateCalculatedChannel to update a calculated channel. Updating a calculated
channel creates a new version of the calculated channel, leaving the previous untouched. If no update is deemed necessary, then the
the current version is returned. To archive calculated channel, specify archived_date in the update mask as well as a non-null
value for archived_date in the calculated_channel object. To unarchive a calculated channel, specify archived_date in the
update mask and a null value for archived_date in the calculated_channel object.
The request for a call to CalculatedChannelService_UpdateCalculatedChannel to update a calculated channel. Updating a calculated
channel creates a new version of the calculated channel, leaving the previous untouched. If no update is deemed necessary, then the
the current version is returned. To archive calculated channel, specify archived_date in the update mask as well as a non-null
value for archived_date in the calculated_channel object. To unarchive a calculated channel, specify archived_date in the
update mask and a null value for archived_date in the calculated_channel object.
Show child attributes
Show child attributes
The list of fields to be updated. The fields available to be updated are name, description, units, metadata,
query_configuration, archived_date, and asset_configuration.
Optional user notes to describe changes.
Was this page helpful?