Rest menu items

Component ID

2733053

Component name

Rest menu items

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

6739

Component created

Component changed

Component body

Important notice

As of version 8.x-1.2 the structure of the returned JSON has changed. See #2837697: Alter the format of the json returned for more information.

This module provides a REST endpoint to retrieve menu items based on the menu name.

When enabled the REST endpoint "/api/menu_items/{menu_name}" becomes available. When calling this url and adding the menu name to the url, for instance "/api/menu_items/main" you will get a full menu tree of that menu.

If you add a query parameter like "?max_depth=1" or "?min_depth=2" you are able to determine what levels in the menu tree you would like to output into the webservice.

If you have any feature requests, please don't hesitate to add them to the issue queue!