Using Drupal Console to manage your RESTful endpoints

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader
Thumbnail
$ ./vendor/bin/drupal debug:rest
Thumbnail
./vendor/bin/drupal debug:rest entity:node
Thumbnail
./vendor/bin/drupal rest:enable entity:node
$ ./vendor/bin/drupal rest:enable entity:node

commands.rest.enable.arguments.methods:
[0] GET
[1] POST
[2] DELETE
[3] PATCH
> 0
$ ./vendor/bin/drupal rest:enable entity:node

commands.rest.enable.arguments.methods:
[0] GET
[1] POST
[2] DELETE
[3] PATCH
> 0

Selected Method GET

commands.rest.enable.arguments.formats:
[0] json
[1] xml
> json
$ ./vendor/bin/drupal rest:enable entity:node

commands.rest.enable.arguments.methods:
[0] GET
[1] POST
[2] DELETE
[3] PATCH
> 0

Selected Method GET

commands.rest.enable.arguments.formats:
[0] json
[1] xml
> json

commands.rest.enable.messages.selected-format json

Available Authentication Providers:
[0] basic_auth
[1] cookie
> cookie
Selected Authentication Providers cookie
Rest ID "entity:node" enabled
Thumbnail
$ ./vendor/bin/drupal debug:config | grep "rest.resource"
rest.resource.entity.node
./vendor/bin/drupal config:edit rest.resource.entity.node
Thumbnail

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store