API DocsRESTCalculated channel service

UpdateCalculatedChannel

Update and create a new version of a calculated channel.

PATCH
/api/v2/calculated-channels

Request Body

application/jsonRequired

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
Required
object

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are name, description, units, query_configuration, archived_date, and asset_configuration.

userNotesstring

Optional user notes to describe changes.

curl -X PATCH "<API_URL>/api/v2/calculated-channels" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "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"
    },
    "updateMask": "string",
    "userNotes": "string"
  }'

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"
  },
  "inapplicableAssets": [
    {
      "assetId": "string",
      "assetName": "string",
      "tagNames": [
        "string"
      ],
      "missingChannels": [
        "string"
      ]
    }
  ]
}