The path prefix
/api/menu is configurable. Set nowo_dashboard_menu.api.path_prefix in your bundle configuration to change it. The route becomes GET {api.path_prefix}/{code}.Path parameters
The menu code to load (e.g.
sidebar, top-nav). Passed through MenuCodeResolverInterface before use, so the resolved code may differ from the hint depending on your resolver implementation.Query parameters
Override the request locale used to translate menu item labels. When omitted, the current request locale is used.Examples:
en, es, frJSON-encoded array of context objects. The bundle attempts each context object in order and returns the first menu whose
code and context both match. Use {} or null as the last item to fall back to the menu with no context.Example: [{"partnerId":1,"operatorId":1},{"partnerId":1},{}]Response
Returns an HTTP 200 with a JSON array of root-level menu tree nodes. Returns an empty array when no menu matches the resolved code.Node structure
Translated label for the resolved locale.
Resolved URL for the item. For Symfony route items this is the generated path; for external items it is the stored URL.
Symfony route name when the item uses an internal route link type.
null for external URL items or section items with no route.Resolved icon identifier (e.g.
bi:house) after icon_library_prefix_map has been applied. null when the item has no icon.Display type of the item. One of:
link— a standard clickable link (default)section— a label-only group header with no linkdivider— a horizontal rule with no label
Recursively nested child nodes with the same structure.
Examples
Basic request
Response
200
With locale override
cURL
With context sets
Use_context_sets to resolve a context-specific menu variant. The bundle tries each context object in order; the first matching menu is returned.
cURL
Empty response when menu not found
When no menu matches the resolved code, the endpoint returns an empty array with HTTP 200.200