To start writing RestFull API in symfony we will need bundles:
"friendsofsymfony/oauth-server-bundle": "^1.6",
"friendsofsymfony/rest-bundle": "^2.7",
"friendsofsymfony/user-bundle": "^2.1",
"jms/serializer-bundle": "^3.5",
"nelmio/api-doc-bundle": "^3.5",
"sensio/framework-extra-bundle": "^5.2",
"symfony/apache-pack": "^1.0",