Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Entity Rest Extra

Security covered Under active development 21 sites

Part of the Entity ecosystem · 306 projects

This module provides additional REST resources to access entity configuration, such as bundles, view modes, and fields, which can be useful for external applications or headless Drupal implementations. It enables retrieving detailed information about entity types and their specific configurations through RESTful endpoints.

Extra Rest resources to enable access to entities configuration via Rest Resource

The following resources help to get admin information about Drupal 8 to be used by external implementation i.e Headless Drupal.

This idea was suggested as a patch to Drupal 8 Core more information at https://www.drupal.org/node/2355291#comment-9241689

Usage
Enable Rest Resources created by Entity Rest Extra.

Using the REST UI, enable Rest Resources created by Entity Rest Extra, setting the Authentication and format JSON is recommended.

Configure any necessary permissions around endpoints as well.

Get Entity bundles

End Point: /entity/{entity_type}/bundles
Entity: Could be any valid entity type i.e node or comment

Output:

{
  "article": {
    "label": "Article",
    "translatable": false,
    "description": "Use <em>articles</em> for time-sensitive content like news, press releases or blog posts."
  },
  "page": {
    "label": "Basic page",
    "translatable": true,
    "untranslatable_fields.default_translation_affected": false,
    "description": "Use <em>basic pages</em> for your static content, such as an 'About us' page."
  }
}

Get view modes by Entity and Bundle

End Point: /entity/{entity_type}/{bundle}/view_modes
Entity: Could be any valid entity type i.e node or comment
Bundle: Could be any valid bundle for entity provided i.e page, article

Output:

{
    "node.article.default": "default",
    "node.article.rss": "rss",
    "node.article.teaser": "teaser"
}

Get fields by Entity and Bundle

End Point: /entity/{entity_type}/{bundle}/fields
Entity: could be any valid entity type i.e node or comment
Bundle: could be any valid bundle for entity provided i.e page, article

Output:

{
    "body": {
    "uuid": "0614f505-95e1-4e36-8800-f8f8671a8e22",
    "langcode": "en",
    "status": true,
    .
    .
    .
    "id": "node.article.body",
    "field_name": "body",
    "entity_type": "node",
    "bundle": "article",
    "label": "Body",
    "description": "",
    "required": false,
    "translatable": true,
    .
    .
    .
}
Drupal 8–11

Ask your assistant about Entity Rest Extra

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

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jul 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Releases

Version Type Core PHP Release date
8.x-2.4 Stable 8–11 Nov 20, 2024
8.x-2.3 Stable 8–10 Jul 25, 2023