permissions

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

Required Permissions

Your root key must have the following permission:

  • rbac.*.read_permission
post/v2/permissions.getPermission

Request

  • Base URL
    https://api.unkey.com
  • URL
    https://api.unkey.com/v2/permissions.getPermission
  • Auth
    HTTP bearer

Request body

permissionstring required

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

Example request

{
  "permission": "perm_1234567890abcdef"
}

Response

Permission retrieved successfully

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "data": {
    "id": "perm_1234567890abcdef",
    "name": "users.read",
    "slug": "users-read",
    "description": "Allows reading user profile information and account details"
  }
}

Changes

    • breaking

      the request property's maxLength was decreased to 128

    • warning

      changed the pattern of the request property from ^[a-zA-Z][a-zA-Z0-9._-]*$ to ^[a-zA-Z0-9_:\-\.\*]+$

    • info

      the request property's minLength was decreased from 3 to 1

    • info

      the endpoint scheme security bearer was added to the API

    • info

      the endpoint scheme security rootKey was removed from the API