Skip to main content
PATCH
/
api
/
v2
/
calculated-channels
UpdateCalculatedChannel
curl --request PATCH \
  --url https://your-sift-api-url.com/api/v2/calculated-channels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "calculatedChannel": {
    "calculatedChannelId": "<string>",
    "organizationId": "<string>",
    "clientKey": "<string>",
    "archivedDate": "2023-11-07T05:31:56Z",
    "versionId": "<string>",
    "version": 123,
    "name": "<string>",
    "description": "<string>",
    "changeMessage": "<string>",
    "userNotes": "<string>",
    "units": "<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"
      }
    ]
  },
  "updateMask": "<string>",
  "userNotes": "<string>"
}'
{
  "calculatedChannel": {
    "calculatedChannelId": "<string>",
    "organizationId": "<string>",
    "clientKey": "<string>",
    "archivedDate": "2023-11-07T05:31:56Z",
    "versionId": "<string>",
    "version": 123,
    "name": "<string>",
    "description": "<string>",
    "changeMessage": "<string>",
    "userNotes": "<string>",
    "units": "<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"
      }
    ]
  },
  "inapplicableAssets": [
    {
      "assetId": "<string>",
      "assetName": "<string>",
      "tagNames": [
        "<string>"
      ],
      "missingChannels": [
        "<string>"
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

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.

calculatedChannel
object
required
updateMask
string
required

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.

userNotes
string

Optional user notes to describe changes.

Response

A successful response.

The response of a call to CalculatedChannelService_UpdateCalculatedChannel.

calculatedChannel
object
required
inapplicableAssets
object[]
required