Skip to main content
GET
/
api
/
Menu
/
Lista
List User Menus
curl --request GET \
  --url https://api.example.com/api/Menu/Lista
{
  "status": true,
  "value": [
    {
      "idMenu": 123,
      "nombre": "<string>",
      "icono": "<string>",
      "url": "<string>"
    }
  ],
  "msg": "<string>"
}
Retrieves the list of menu items accessible to a specific user based on their permissions.

Endpoint

GET /api/Menu/Lista

Query Parameters

idUsuario
integer
required
The unique identifier of the user whose menu items should be retrieved

Response

Returns an array of menu items the user has access to.
status
boolean
required
Indicates if the request was successful
value
array
List of menu items accessible to the user
msg
string
Error message if status is false

Example Request

curl -X GET "https://api.example.com/api/Menu/Lista?idUsuario=5" \
  -H "Content-Type: application/json"

Example Response

{
  "status": true,
  "value": [
    {
      "idMenu": 1,
      "nombre": "Dashboard",
      "icono": "dashboard-icon",
      "url": "/dashboard"
    },
    {
      "idMenu": 2,
      "nombre": "Usuarios",
      "icono": "users-icon",
      "url": "/usuarios"
    },
    {
      "idMenu": 3,
      "nombre": "Productos",
      "icono": "products-icon",
      "url": "/productos"
    },
    {
      "idMenu": 4,
      "nombre": "Ventas",
      "icono": "sales-icon",
      "url": "/ventas"
    },
    {
      "idMenu": 5,
      "nombre": "Reportes",
      "icono": "reports-icon",
      "url": "/reportes"
    }
  ],
  "msg": null
}

Error Response

{
  "status": false,
  "value": null,
  "msg": "Error retrieving menu list for user"
}

Use Cases

  • Build dynamic navigation menus based on user permissions
  • Implement role-based UI rendering
  • Control feature access in single-page applications
  • Generate breadcrumbs and navigation hierarchies

Build docs developers (and LLMs) love