public function indexApiAction()
{
$apiResources = [array('Posts' => $this->generateUrl('api_v1_get_posts')), array('Comments' => $this->generateUrl('api_v1_get_comments'))];
$view = $this->view($apiResources)->setTemplate('RestBundle::api_index.html.twig');
return $this->handleView($view);
}