List Custom Channels and Channel Members
User Permissions Needed | |
---|---|
To query PlatformEventChannel and PlatformEventChannelMember Tooling objects: | View Setup and Configuration |
To use REST with Tooling API: | API Enabled |
To perform SOQL queries, make a REST query call or use the Query Editor in the Developer Console with the Tooling API option selected. To make REST calls using Postman, set up Postman with the Salesforce Platform APIs collection. See Quick Start: Connect Postman to Salesforce in Trailhead.
Perform a GET request to this endpoint with the SOQL query appended.
/services/data/v64.0/tooling/query?q=<query>
This query returns all the custom channels. The query results in this page are based on the Order_Channel__chn channel.
SELECT Id, DeveloperName, ChannelType, MasterLabel FROM PlatformEventChannel
If you're using Postman, expand
, and then click List event channels.Sample result:
- Id
- 0YLRM0000004CEI4A2
- DeveloperName
- Order_Channel
- ChannelType
- event
- MasterLabel
- Custom Channel for Orders
And this query returns all the channel members.
SELECT Id, DeveloperName,EventChannel, SelectedEntity FROM PlatformEventChannelMember
If you're using Postman, expand
, and then click List channel members.For example, the query returns the two channel members created earlier. The SelectedEntity field references the ID of the custom platform event.
First channel member:
- Id
- 0v8RM0000000N6uYAE
- DeveloperName
- Order_Channel_chn_Order_NorthAmer_e
- EventChannel
- 0YLRM0000004CEI4A2
- SelectedEntity
- 01IRM0000006w522AA
Second channel member:
- Id
- 0v8RM0000004VPJYA2
- DeveloperName
- Order_Channel_chn_Order_EMEA_e
- EventChannel
- 0YLRM0000004CEI4A2
- SelectedEntity
- 01IRM0000006w572AA