Get role details
What is returned: Returns complete information about a specific role, including all its permissions and metadata.
Role details include:
- Basic information: name, description, icon, type (normal or guest)
- Permission map: complete list of all permissions with their allowed/disallowed status
- Inheritance: parent role ID if permissions are inherited
- Metadata: creation date, last edit date, creator (for custom roles)
- Read-only status: indicates if this is a base role that cannot be modified
Permission values:
- true: Permission is explicitly allowed
- false: Permission is explicitly disallowed
- undefined/missing: Permission is inherited from parent role (if parent exists)
Base roles: Base roles (Root, CEO, Team Leader, Staff, Guest) are read-only and cannot be modified. Their permissions are predefined by the system.
Use cases:
- Display role details in role management interfaces
- Show permission matrix for a specific role
- Edit role permissions (for custom roles only)
- Understand permission inheritance from parent roles
GET
/administration/roles/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200
createdAtstring<date-time>ISO 8601 timestamp indicating when this custom role was created. Only present for custom roles, not base roles.
createdBystringUser ID of the person who created this custom role. Only present for custom roles, not base roles.
descriptionstringrequiredHuman-readable description of the role purpose and responsibilities, localized based on user language preference.
editedAtstring<date-time>ISO 8601 timestamp indicating when this custom role was last modified. Only present for custom roles, not base roles.
effectivePermissionsobjectrequiredPermission map after resolving the full parent chain and child overrides.
iconstringrequiredIcon identifier for the role. Can be a RemixIcon class name (e.g., "ri-user-line") or an emoji code (e.g., ":person_in_tuxedo:"). Used for visual identification in role lists.
idstringrequiredUnique identifier for the role. Base roles have IDs containing underscore-prefixed identifiers (e.g., "_root_", "_ceo_", "_staff_"). Custom roles have workspace-prefixed IDs.
namestringrequiredDisplay name of the role, localized based on user language preference.
parentIdstringID of the parent role if this role inherits permissions from another role. Undefined if the role has no parent (e.g., base roles or top-level custom roles).
permissionsobjectrequiredComplete map of all permissions for this role. Keys are permission identifiers (e.g., "projects.create", "tasks.delete"). Values are true if the permission is explicitly allowed, false if explicitly disallowed, or missing if inherited from parent role. This map includes both explicitly set permissions and inherited permissions.
rawPermissionsobjectrequiredPermissions explicitly stored or defined on this role before inheritance.
readOnlybooleanrequiredBoolean flag indicating if this is a base role (system-defined) that cannot be modified or deleted. Base roles include Root, CEO, Team Leader, Staff, and Guest.
typestringrequiredRole type indicating the intended use case. "normal" for internal team members, "guest" for external users. Determines permission restrictions.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/administration/roles/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/administration/roles/string", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/administration/roles/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"createdAt": "2024-01-01T00:00:00Z",
"createdBy": "string",
"description": "Standard employee role",
"editedAt": "2024-01-01T00:00:00Z",
"effectivePermissions": {
"profile.manage": true,
"tasks.create": true,
"tasks.delete": false
},
"icon": "ri-user-line",
"id": "workspace-id_employee",
"name": "Employee",
"parentId": "workspace-id_admin",
"permissions": {
"projects.create": true,
"projects.delete": false
},
"rawPermissions": {
"tasks.create": true,
"tasks.delete": false
},
"readOnly": false,
"type": "normal"
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions