Chilkat Online Tools

Unicode C++ / Salesforce Platform APIs / Update channel

Back to Collection Items

void ChilkatSample(void)
    {
    json.UpdateString(L"FullName",L"Carbon_Comparison_Channel__chn");    json.UpdateString(L"Metadata.channelType",L"event");    json.UpdateString(L"Metadata.label",L"Carbon Comparison Channel 2");    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/PlatformEventChannel/:PLATFORM_EVENT_CHANNEL_ID",sbRequestBody,L"utf-8",L"application/json",resp);
    }

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-d '{
    "FullName": "Carbon_Comparison_Channel__chn",
    "Metadata": {
        "channelType": "event",
        "label": "Carbon Comparison Channel 2",
        "urls": null
    }
}'
https://domain.com/services/data/v{{version}}/tooling/sobjects/PlatformEventChannel/:PLATFORM_EVENT_CHANNEL_ID

Postman Collection Item JSON

{
  "name": "Update channel",
  "protocolProfileBehavior": {
    "strictSSL": false
  },
  "request": {
    "method": "PATCH",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"FullName\": \"Carbon_Comparison_Channel__chn\",\n    \"Metadata\": {\n        \"channelType\": \"event\",\n        \"label\": \"Carbon Comparison Channel 2\",\n        \"urls\": null\n    }\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/tooling/sobjects/PlatformEventChannel/:PLATFORM_EVENT_CHANNEL_ID",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "tooling",
        "sobjects",
        "PlatformEventChannel",
        ":PLATFORM_EVENT_CHANNEL_ID"
      ],
      "variable": [
        {
          "key": "PLATFORM_EVENT_CHANNEL_ID",
          "value": ""
        }
      ]
    }
  },
  "response": [
  ]
}