You are browsing the documentation for version 2.7 which is not maintained anymore.
If some of your projects are still using this version, consider upgrading.
Getting Started With FOSRestBundle
Getting Started With FOSRestBundle¶
Bundle usage¶
Before you start using the bundle it is advised you run a quick look over the six sections listed below. This bundle contains many features that are loosely coupled so you may or may not need to use all of them. This bundle is just a tool to help you in the job of creating a REST API with Symfony.
FOSRestBundle provides several tools to assist in building REST applications:
- The view layer
- Listener support
- ExceptionController support
- Automatic route generation: single RESTful controller (for simple resources)
- Automatic route generation: multiple RESTful controllers (for resources with child/subresources)
- Manual definition of routes
Config reference¶
- Configuration reference for a reference on the available configuration options
- Annotations reference for a reference on the available configurations through annotations
Example applications¶
The following bundles/applications use the FOSRestBundle and can be used as a guideline:
- The FOSCommentBundle uses FOSRestBundle for its API.
- The Symfony2 Rest Edition provides a complete example of how to build a controller that works for both HTML as well as JSON/XML.
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.