# 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.
### 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.