Sift | Docs

UpdateChannel

Update a channel.

PATCH
/api/v3/channels

Request Body

application/jsonRequired

The request for a call to ChannelService_UpdateChannel.

channel
Required
object

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are display_description, display_units, and metadata.

curl -X PATCH "<API_URL>/api/v3/channels" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": {
      "channelId": "string",
      "name": "string",
      "assetId": "string",
      "description": "string",
      "unitId": "string",
      "createdDate": "2019-08-24T14:15:22Z",
      "modifiedDate": "2019-08-24T14:15:22Z",
      "createdByUserId": "string",
      "modifiedByUserId": "string",
      "dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
      "enumTypes": [
        {
          "name": "string",
          "key": 0,
          "isSigned": true
        }
      ],
      "bitFieldElements": [
        {
          "name": "string",
          "index": 0,
          "bitCount": 0
        }
      ],
      "displayDescription": "string",
      "displayUnitId": "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"
        }
      ]
    },
    "updateMask": "string"
  }'

A successful response.

{
  "channel": {
    "channelId": "string",
    "name": "string",
    "assetId": "string",
    "description": "string",
    "unitId": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "createdByUserId": "string",
    "modifiedByUserId": "string",
    "dataType": "CHANNEL_DATA_TYPE_UNSPECIFIED",
    "enumTypes": [
      {
        "name": "string",
        "key": 0,
        "isSigned": true
      }
    ],
    "bitFieldElements": [
      {
        "name": "string",
        "index": 0,
        "bitCount": 0
      }
    ],
    "displayDescription": "string",
    "displayUnitId": "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"
      }
    ]
  }
}