Skip to main content
GET
/
api
/
Menu
curl --request GET \
  --url https://your-api-host/api/Menu \
  --header 'Authorization: Bearer <token>'
[
  {
    "ModuloId": 1,
    "Nombre": "Usuario",
    "Ruta": "/Module/Usuario",
    "Icono": null,
    "Agregar": true,
    "Editar": true,
    "Eliminar": false,
    "Consultar": true,
    "Detalle": true
  },
  {
    "ModuloId": 2,
    "Nombre": "Perfil",
    "Ruta": "/Module/Perfil",
    "Icono": null,
    "Agregar": false,
    "Editar": false,
    "Eliminar": false,
    "Consultar": true,
    "Detalle": true
  }
]
Returns the list of modules the authenticated user is allowed to access, based on their profile permissions. The response is used to build the application’s navigation menu dynamically.

Authentication

Requires a valid Bearer token. The user’s identity is extracted from the JWT claims — no separate user ID parameter is needed.
Authorization: Bearer <token>
No additional permission check is required to call this endpoint. The response is already scoped to the modules the user can access.

How the menu is built

The service reads the authenticated user’s profile and returns only the modules for which the profile has at least one permission granted. Profiles with the administrator flag set see all modules regardless of individual permission assignments.

Response fields

[]
MenuDTO[]
Array of menu items, one per accessible module.
The menu only includes modules for which at least one permission flag is true. The permission flags embedded in each item reflect the specific grants held by the authenticated user’s profile, so the client can conditionally render action buttons (e.g., show “Add” only when Agregar is true).

Examples

curl --request GET \
  --url https://your-api-host/api/Menu \
  --header 'Authorization: Bearer <token>'
[
  {
    "ModuloId": 1,
    "Nombre": "Usuario",
    "Ruta": "/Module/Usuario",
    "Icono": null,
    "Agregar": true,
    "Editar": true,
    "Eliminar": false,
    "Consultar": true,
    "Detalle": true
  },
  {
    "ModuloId": 2,
    "Nombre": "Perfil",
    "Ruta": "/Module/Perfil",
    "Icono": null,
    "Agregar": false,
    "Editar": false,
    "Eliminar": false,
    "Consultar": true,
    "Detalle": true
  }
]

Build docs developers (and LLMs) love