# ChannelDetails Channel metadata describes the current state of a channel, including whether it is active and its [occupancy](https://ably.com/docs/presence-occupancy/occupancy.md) metrics. It is represented by the `ChannelDetails` type, which a [`Channel`](https://ably.com/docs/pub-sub/api/javascript/rest/channel.md) returns from its [`status()`](https://ably.com/docs/pub-sub/api/javascript/rest/channel.md#status) method. #### Javascript ``` const channel = rest.channels.get('your-channel-name'); const details = await channel.status(); console.log(details.channelId, details.status.occupancy.metrics.connections); ``` ## ChannelDetails A `ChannelDetails` object contains information about a channel, along with its current state in a `ChannelStatus` object. | Property | Description | Type | | --- | --- | --- | | channelId | The name of the channel, including any qualifier. | String | | status | The current state of the channel. |
|
| Property | Description | Type | | --- | --- | --- | | isActive | Whether the channel is active. For events indicating regional activity, this reflects activity in that region rather than global activity. | Boolean | | occupancy | The occupancy of the channel. For events indicating regional activity, this reflects activity in that region rather than global activity. |
|
| Property | Description | Type | | --- | --- | --- | | metrics | The occupancy metrics for the channel. |
|
| Property | Description | Type | | --- | --- | --- | | connections | The number of connections attached to the channel. | Number | | publishers | The number of connections attached to the channel that are authorized to publish. | Number | | subscribers | The number of connections attached that are authorized to subscribe to messages. | Number | | presenceConnections | The number of connections that are authorized to enter members into the presence set. | Number | | presenceMembers | The number of members currently entered into the presence set. | Number | | presenceSubscribers | The number of connections that are authorized to subscribe to presence messages. | Number |
## Example The following is an example of a `ChannelDetails` payload: ### Json ``` { "channelId": "foo", "status": { "isActive": true, "occupancy": { "metrics": { "connections": 1, "publishers": 1, "subscribers": 1, "presenceConnections": 1, "presenceMembers": 0, "presenceSubscribers": 1 } } } } ``` ## Related Topics - [Channels](https://ably.com/docs/pub-sub/api/javascript/rest/channels.md): API reference for the Channels interface in the Ably Pub/Sub JavaScript REST SDK. - [Channel](https://ably.com/docs/pub-sub/api/javascript/rest/channel.md): API reference for the Channel interface in the Ably Pub/Sub JavaScript REST SDK. - [Message](https://ably.com/docs/pub-sub/api/javascript/rest/message.md): API reference for the Message interface in the Ably Pub/Sub JavaScript REST SDK. - [RestAnnotations](https://ably.com/docs/pub-sub/api/javascript/rest/rest-annotations.md): API reference for message annotations (the RestAnnotations interface) in the Ably Pub/Sub JavaScript REST SDK. ## Documentation Index To discover additional Ably documentation: 1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages. 2. Identify relevant URLs from that index. 3. Fetch target pages as needed. Avoid using assumed or outdated documentation paths.