This screencast provides an introduction to the new Grails 2.3 REST support for creating APIs. This is the first in a series of screencasts that I hope to publish focused on building APIs with Grails 2.3.

This first one covers the different ways to create RESTful controllers as well as how to quickly modify the response.  Future screencasts will cover more advanced topics like implementing custom renderers, versioning and integration with Spring Security OAuth.  If you have additional topic suggestions, please let me know in the comments!  Thanks for watching!

7 comments so far

Add Your Comment
  1. Great video Bobby. I came from ASP.NET and I´m accustomed to have good content and information. And I think that is one of the reasons a technology become popular.

  2. Very nice. I’m looking forward to seeing more. I’ll be forwarding your screencasts to the rest of the dev team.

    One suggestion for the future – highlight the differences between the Grails @Transactional vs the Spring @Transactional annotations.

  3. thanks for the info Bobby, great job and an amazing job by the grails team.

    i have a question im excluding the property class from domain class but when i go to books i see the class propery when i access a single book the class is exclude, is this the expected behaver or we need to do other step?

    thanks again im looking forward to seeing more

  4. Great stuff. This screencast makes a great addendum to the official docs. Your GR8CONF session was excellent as well–particularly noting the bugs between M2 and the released versions. There were some nasty gotchas for a bit there.

    A huge gap in Grails based API development documentation online exists in implementing API key based security. There are a few half baked suggestions around the web, but nothing that integrates elegantly with non-API key authentication. Perhaps something that could become a plugin that works with the Grails spring-security plugin? You mentioned you use API key auth in your conference talk. Any thoughts on it would be greatly appreciated!

  5. Awesome talk Bobby and chance you can post the git repo with the sample code

  6. i’ve come a little late to the party. gotta say you’re stuff is required reading/watching because of the dearth of quality documentation and tutorials.

    thank you so much –from us noobs

  7. thanks so much for this tutorial!!

    i have not been able to successfully code up a save(). i cannot seem to get the parameters being sent over. with the curl command:

    curl -X POST http://localhost:8080/IAT-Core/caseFolder/ –header “Content: applcation/json” -d @data.json

    inside @data.json contains {“caseName”:”foo”}

    my code printlns show params as:
    [{“caseName”:”foo”}:, action:[GET:list, POST:save], controller:caseFolder]

    any ideas??

    thanks in advance