CreateCalculatedChannel
Create a calculated channel.
POST
/
api
/v2
/calculated-channels
Request Body
application/json
Requiredname
Requiredstring
description
string
userNotes
string
units
string
clientKey
string
calculatedChannelConfiguration
Requiredobject
metadata
Requiredarray<object>
curl -X POST "<API_URL>/api/v2/calculated-channels" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"userNotes": "string",
"units": "string",
"clientKey": "string",
"calculatedChannelConfiguration": {
"assetConfiguration": {
"allAssets": true,
"selection": {
"assetIds": [
"string"
],
"tagIds": [
"string"
]
}
},
"queryConfiguration": {
"sel": {
"expression": "string",
"expressionChannelReferences": [
{
"channelReference": "string",
"channelIdentifier": "string"
}
]
}
}
},
"metadata": [
{
"key": {
"name": "string",
"type": "METADATA_KEY_TYPE_UNSPECIFIED",
"archivedDate": "2019-08-24T14:15:22Z"
},
"stringValue": "string",
"numberValue": 0.1,
"booleanValue": true,
"archivedDate": "2019-08-24T14:15:22Z"
}
]
}'
A successful response.
{
"calculatedChannel": {
"calculatedChannelId": "string",
"organizationId": "string",
"clientKey": "string",
"archivedDate": "2019-08-24T14:15:22Z",
"versionId": "string",
"version": 0,
"name": "string",
"description": "string",
"changeMessage": "string",
"userNotes": "string",
"units": "string",
"createdDate": "2019-08-24T14:15:22Z",
"modifiedDate": "2019-08-24T14:15:22Z",
"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": "2019-08-24T14:15:22Z"
},
"stringValue": "string",
"numberValue": 0.1,
"booleanValue": true,
"archivedDate": "2019-08-24T14:15:22Z"
}
]
},
"inapplicableAssets": [
{
"assetId": "string",
"assetName": "string",
"tagNames": [
"string"
],
"missingChannels": [
"string"
]
}
]
}