Entity Rest Extra module for Drupal 8

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
-enzo-'s picture

Hi folks

I publish a custom module for Drupal 8 https://github.com/enzolutions/entity_rest_extra/

This module enable two new Rest resources to enable to get admin information about Drupal 8 to be used by external implementation using Headless Drupal.

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

All resources require authentication with an user with permission "Administer content types"

  1. Get Entity bundles

End Point: http://example.com/bundles/{entity}

Entity: could be any valid entity type i.e node or comment

OUTPUT Sample

{
"article": "Article",
"page": "Basic page"
}

  1. Get view modes by Entity and Bundle

End Point: http://example.com/view_modes/{entity}/{bundle}

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 Sample

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