Use the ably spaces locks get command to get a lock or all locks in a space.
Synopsis
ably spaces locks get <space-name> [lock-id]Arguments
space-name Required
Required
The name of the space to get locks for.
lock-id
The identifier of a specific lock to get. Omit to get all locks in the space.
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 all locks in a space:
ably spaces locks get my-spaceGet a specific lock:
ably spaces locks get my-space my-lockGet all locks in JSON format:
ably spaces locks get my-space --jsonGet all locks in formatted JSON output:
ably spaces locks get my-space --pretty-jsonGet a specific lock in JSON format:
ably spaces locks get my-space lock-id --jsonGet a specific lock in formatted JSON output:
ably spaces locks get my-space lock-id --pretty-jsonSee also
- Spaces — Explore all
ably spacescommands. - CLI reference — Full list of available commands.