Returns all permissions currently assigned to the role identified byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
roleId. The query joins the permissionXRole pivot table with the permissions table to return full permission records. If the role has no assigned permissions, an empty array is returned — this endpoint does not return 404 for an unrecognised roleId.
Authentication
Requires a valid JWT in theAuthorization header. No specific role permission is needed.
Request
Method:GET
Path: /api/v1/permission/getByRoleId
Headers
Bearer token obtained from the login endpoint. Format:
Bearer <token>Query Parameters
The numeric ID of the role whose permissions to retrieve. Must match
^\d+$ (digits only, no decimals or negative values).Response
200 OK
Returns the list of permissions assigned to the specified role, ordered byidPermission.
Always
true for successful responses.Human-readable status message. Value:
"Permiso obtenido por rol.".Array of permission objects assigned to the role. Returns an empty array if the role has no permissions or does not exist.
Example Response
Role With No Permissions Assigned
Error Responses
| Status | Description |
|---|---|
400 Bad Request | roleId is missing or is not a numeric string. |
401 Unauthorized | Missing or invalid JWT token. |
400 Bad Request
Code Example
cURL
Socket.IO Events
This is a read-only endpoint. Adata:changed broadcast is not emitted. The requesting client receives operation:progress events for the permissions:fetchByRole operation on their own socket only.
| Event | Target | Operation | Status sequence |
|---|---|---|---|
operation:progress | Requesting socket | permissions:fetchByRole | start → success |