Get Channels
You can retrieve information about the Data Streams channels created in your project. This includes fetching a list of all channels or obtaining detailed metadata and configuration for a specific channel.
The datastreams reference used in the code below is the component instance created earlier.
Get All Channels
You can fetch the list of all Data Streams channels that are created in the project using the getAllChannels() method. The promise returned here will be resolved to an array of channel objects.
//Get all channels
const channels = await datastreams.getAllChannels();
Get Channel Details
You can retrieve the metadata and configuration details of a specific channel by passing the channel ID to the getChannelDetails() method. The promise returned here will be resolved to a channel object containing the channel’s configuration.
Parameters Used
| Parameter Name | Data Type | Definition |
|---|---|---|
| channelId | String | A Mandatory parameter. Holds the unique ID of the channel. |
//Get channel details by channel ID
const channel = await datastreams.getChannelDetails(CRICKET_CHANNEL_ID);
Last Updated 2026-10-05 20:43:57 +0530 IST
Yes
No
Send your feedback to us