Skip to main content

list-permissions

List all permissions in your Unkey workspace using the CLI. View every permission defined in your RBAC system for auditing and management.
2 min read

Retrieve all permissions in your workspace.

Results are paginated and sorted by their id. Use the --limit and --cursor flags to traverse large permission sets efficiently.

Required permissions:

  • rbac.*.read_permission
Note

See the API reference for the full HTTP endpoint documentation.

Usage#

Flags#

--limitinteger#

Maximum number of permissions to return in a single response. Accepts a value between 1 and 100. Defaults to 100 when omitted.

--cursorstring#

Pagination cursor from a previous response to fetch the next page of permissions. Include this value when you need to retrieve additional permissions beyond the initial response. Leave empty or omit this flag to start from the beginning of the permission list. Cursors are temporary and may expire -- always handle cases where a cursor becomes invalid.

Global Flags#

FlagTypeDescription
--root-keystringOverride root key ($UNKEY_ROOT_KEY)
--api-urlstringOverride API base URL (default: https://api.unkey.com)
--configstringPath to config file (default: ~/.unkey/config.toml)
--outputstringOutput format. Use json for raw JSON
--bodystringSend this JSON string as the request body. You cannot combine it with request-building flags.

Examples#

Output#

Default output shows the request ID, followed by the list of permissions:

With --output=json, the full response envelope including pagination metadata is returned: