Plugins You can find out about all the publicly available Grails plugins.

RESTful API Plugin

  • Tags: /
  • Latest: 1.0.0
  • Last Updated: 07 October 2014
  • Grails version: 2.2.0 > *
0 vote
compile "org.grails.plugins:restful-api:1.0.0"

 Documentation  Source  Issues


The resful-api plugin facilitates exposing a non-trivial, versioned RESTful API. The plugin provides a DSL that may be used to declaratively specify how resources should be marshalled. Please see the for details.



See for complete documentation. Key features of this plugin include:
  • A DSL-based configuration that is used to expose resources
  • Use of custom media types to identify representations (and versioning)
  • Declarative marshaling and extraction of versioned representations (JSON and XML)
  • Include, omit, and rename properties
  • Add affordances (support HATEOAS)
  • Ability to configure custom marshallers and extractors (e.g., PDF, iCalendar, binary formats)
  • Route API requests to a single controller that delegates to transactional services
  • An ability to configure service adapters to accomodate services exposing a different contract
  • Consistent use of HTTP status codes and headers, including caching headers and CORS
  • Ability to 'query by POST' (to allow query criteria to be provided within the request body)
  • Extensive regression tests to provide confidence when adopting this plugin