Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

REST menu items

Security covered Under active development 2,136 sites

This module provides a REST API endpoint to fetch menu items from your Drupal site by menu name. It's particularly useful for headless or decoupled Drupal setups, allowing your frontend applications to easily access menu structures. You can customize the output and control which menus are exposed.

Overview

REST Menu Items provides a REST endpoint to retrieve menu items by menu name.

Request for example https://example.com/api/menu_items/main?_format=json to get the full menu tree of the main menu as JSON.

This module is useful for decoupled and headless Drupal architectures where a JavaScript front end needs access to Drupal menu structures via a web service.

Features

  • REST endpoint for any Drupal menu: /api/menu_items/{menu_name}
  • Control output depth with max_depth and min_depth query parameters
  • Configurable output values (title, URI, alias, UUID, weight, etc.)
  • Restrict which menus are exposed via the configuration form
  • Supports JSON, HAL+JSON, and XML formats
  • Two alter hooks for customizing the output:
    • hook_rest_menu_items_resource_manipulators_alter — modify menu tree manipulators
    • hook_rest_menu_items_output_alter — modify the output array

Documentation

Questions or feature requests?

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

🤖 Assisted Development

This module is maintained with the help of AI assistants for code generation, review, testing, and documentation. All code is carefully reviewed by the maintainers to ensure that quality and security standards are met.

Drupal 11 · not 10

Ask your assistant about REST menu items

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • rest Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Oct 2024
Latest release
2 weeks ago
Releases (12 mo)
3 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.1.0 Stable 11 Sep 25, 2026
3.0.7 Stable 10–11 May 29, 2026
3.0.6 Stable 10–11 Feb 7, 2026
3.0.5 Stable 10–11 May 29, 2025
3.0.4 Stable 10–11 Oct 8, 2024