I would like to share my tutorial how to setup API in Yii2. It is written on my blog http://budiirawan.com/setup-restful-api-yii2/
I used Yii2 advanced template and created dedicated for API folder. I also wrote about the configuration you should made for make it works. I hope it can help someone who want to build RESTful API in Yii2. Any suggestion are welcome!