Chilkat Online Tools

Unicode C++ / Salesforce Platform APIs / Add filter expression in channel member

Back to Collection Items

void ChilkatSample(void)
    {
    json.UpdateString(L"FullName",L"MyChannelMember");    json.UpdateString(L"Metadata.eventChannel",L"MyChannel__chn");    json.UpdateString(L"Metadata.filterExpression",L"Text__c='Some value'");    json.UpdateString(L"Metadata.selectedEntity",L"Custom_Event__e");    json.UpdateNull(L"Metadata.urls");    http.put_AuthToken(L"<access_token>");    json.EmitSb(sbRequestBody);    success = http.HttpSb(L"PATCH",L"https://domain.com/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID",sbRequestBody,L"utf-8",L"application/json",resp);
    }

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-d '{
    "FullName": "MyChannelMember",
    "Metadata": {
        "eventChannel": "MyChannel__chn",
        "filterExpression": "Text__c=\'Some value\'",
        "selectedEntity": "Custom_Event__e",
        "urls": null
    }
}'
https://domain.com/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID

Postman Collection Item JSON

{
  "name": "Add filter expression in channel member",
  "protocolProfileBehavior": {
    "strictSSL": false
  },
  "request": {
    "method": "PATCH",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"FullName\": \"MyChannelMember\",\n    \"Metadata\": {\n        \"eventChannel\": \"MyChannel__chn\",\n        \"filterExpression\": \"Text__c='Some value'\",\n        \"selectedEntity\": \"Custom_Event__e\",\n        \"urls\": null\n    }\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/tooling/sobjects/PlatformEventChannelMember/:PLATFORM_EVENT_CHANNEL_MEMBER_ID",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "tooling",
        "sobjects",
        "PlatformEventChannelMember",
        ":PLATFORM_EVENT_CHANNEL_MEMBER_ID"
      ],
      "variable": [
        {
          "key": "PLATFORM_EVENT_CHANNEL_MEMBER_ID",
          "value": "0v8RM0000004Rr5YAE"
        }
      ]
    }
  },
  "response": [
  ]
}