API DocsRESTCalculated channel service

ResolveCalculatedChannel

Resolve a calculated channel into an expression with references

POST
/api/v2/calculated-channels/resolve

Request Body

application/jsonRequired

The request for a call to CalculatedChannelService_ResolveCalculatedChannel to get the all possible calculated channels.

  1. If the calculated channel has a selection of assets and tags then those assets will be used as a base and then filtered down by the given assets and assets from the run.
  2. If the calculated channel is enabled for all assets then: a) If the request has run and assets from the run will be used as a base and then filtered down by the given assets. b) If the request has run and no assets then those assets will be used. c) If the request has only assets then those assets will be used. The organization_id argument is only required if using client_key and the user belongs to multiple organizations.

calculatedChannelIdobject

calculatedChannelConfigurationobject

organizationIdstring

This field is only required if your user belongs to multiple organizations.

assetsobject

runobject

curl -X POST "<API_URL>/api/v2/calculated-channels/resolve" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "calculatedChannelId": {
      "id": "string",
      "clientKey": "string"
    },
    "calculatedChannelConfiguration": {
      "assetConfiguration": {
        "allAssets": true,
        "selection": {
          "assetIds": [
            "string"
          ],
          "tagIds": [
            "string"
          ]
        }
      },
      "queryConfiguration": {
        "sel": {
          "expression": "string",
          "expressionChannelReferences": [
            {
              "channelReference": "string",
              "channelIdentifier": "string"
            }
          ]
        }
      }
    },
    "organizationId": "string",
    "assets": {
      "ids": {
        "ids": [
          "string"
        ]
      },
      "names": {
        "names": [
          "string"
        ]
      }
    },
    "run": {
      "id": "string",
      "clientKey": "string"
    }
  }'

A successful response.

{
  "calculatedChannelId": {
    "id": "string",
    "clientKey": "string"
  },
  "resolved": [
    {
      "assetName": "string",
      "expressionRequest": {
        "channelReferences": {
          "property1": "string",
          "property2": "string"
        },
        "expression": "string",
        "expressionChannelReferences": [
          {
            "channelReference": "string",
            "channelId": "string"
          }
        ]
      },
      "outputDataType": "CHANNEL_DATA_TYPE_UNSPECIFIED"
    }
  ],
  "unresolved": [
    {
      "assetName": "string",
      "errorMessage": "string"
    }
  ]
}