Use the ably rooms occupancy get command to get the current occupancy metrics for a chat room.
Synopsis
ably rooms occupancy get <room-name> [options]Arguments
room-name Required
Required
The name of the chat room to get occupancy for.
Options
--json
Output results as compact JSON. Mutually exclusive with --pretty-json.
--pretty-json
Output results in formatted JSON. Mutually exclusive with --json.
--verbose | -v
Enable verbose logging. Can be combined with --json or --pretty-json.
Examples
Get current occupancy for a room:
ably rooms occupancy get my-roomGet occupancy in JSON format:
ably rooms occupancy get my-room --jsonGet room occupancy using an API key environment variable:
ABLY_API_KEY="YOUR_API_KEY" ably rooms occupancy get my-roomGet room occupancy in formatted JSON output:
ably rooms occupancy get my-room --pretty-jsonSee also
- Rooms — Explore all
ably roomscommands. - CLI reference — Full list of available commands.