---
title: "Get role permissions"
method: GET
path: "/api/v1/permissions/role/{roleId}"
tags: ["Permissions"]
---

# Get role permissions

`GET /api/v1/permissions/role/{roleId}`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/permissions/role/{roleId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/permissions/role/:roleId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves all hosts and folders where a role has permissions defined, organized by asset with full permission matrices. Admin users can view any role. Non-admin users can only view permissions for roles they belong to.

## Path parameters

- `roleId` string, required

## Response `200`

Role permissions retrieved successfully

- ResponseEntityRolePermissionsView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` RolePermissionsView
    - `roleId` string, required: Role identifier
    - `roleName` string, required: Role display name
    - `assets` UserPermissionAssetView[], required: List of permission assets (hosts and folders) with their permission assignments
      - `id` string, required: Asset identifier (host identifier for HOST type, folder inode for FOLDER type)
      - `type` 'HOST' | 'FOLDER', required: Asset type
      - `name` string, required: Asset name (hostname for HOST, folder name for FOLDER)
      - `path` string, required: Full path to the asset
      - `hostId` string, required: Host identifier (same as id for HOST type, parent host for FOLDER type)
      - `canEditPermissions` boolean, required: Whether the requesting user can edit permissions on this asset
      - `inheritsPermissions` boolean, required: Whether this asset inherits permissions from its parent
      - `permissions` object, required: Map of permission types (INDIVIDUAL, HOST, FOLDER, etc.) to sets of permission level names (READ, WRITE, PUBLISH, EDIT_PERMISSIONS, CAN_ADD_CHILDREN)
        - `empty` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400`: Bad request - invalid role id
- `403`: Forbidden - user does not have access to view this role's permissions

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/permissions/role/:roleId/get.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
