Skip to main content

get-permission

Retrieve details about a specific permission in your Unkey workspace using the CLI including its name, description, and creation date.
1 min read

Retrieve details about a specific permission including its name, description, and metadata.

Use this to inspect a permission's current state, verify its configuration, or look up its name and description. The returned data includes the permission's unique ID, human-readable name, URL-safe slug, and optional description.

Required permissions:

  • rbac.*.read_permission (to read permissions in any workspace)
Note

See the API reference for the full HTTP endpoint documentation.

Usage#

Flags#

--permissionstringrequired#

The unique identifier of the permission to retrieve. Must be a valid permission ID that begins with perm_ and exists within your workspace.

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 permission details:

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