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,
    .
    .
    .
}
Supporting organizations: 
Development
D10 Development

Project information

Releases