Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

REST menu items

2,153 sites Security covered Drupal 10–11
View on drupal.org

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.

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
4
Tracked since
Oct 2024
Latest release
3 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
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