I am trying to configure Change Data Capture for the ChangeEvents
channel via the REST API as you can in Setup Change Data Capture when using the Salesforce UI.
I am able to add records of PlatformEventChannelMember
via a REST POST
call:
/services/data/v50.0/tooling/sobjects/PlatformEventChannelMember
. The current documentation is clear on the payload required.
The documentation indicates that REST DELETE
is available for PlatformEventChannelMember
, but I haven't had success using it. I couldn't find an example or documentation for the payload. I made an attempt using the same payload as had succeeded for POST
. This results in a 405
error. HTTP Method 'DELETE' not allowed
. DELETE
is documented as available for the endpoint.
I also attempted to use DELETE
with both the /services/data/v50.0/sobjects/{{ObjectId}}
and /services/data/v50.0/tooling/sobjects/{{ObjectId}}
REST paths unsuccessfully. Though the object id is easily queried via SOQL using the tooling API. Both return a 404
The requested resource does not exist
error. The provided {{ObjectId}}
was returned by both the successful POST
on PlatformEventChannelMember
, and by a tooling API Soql query:
SELECT Id FROM PlatformEventChannelMember WHERE SelectedEntity = 'DeleteableGrommet__c'