private function createApi()
    {
        $routes = $this->app["routes"];

        $actions = $this->getRouteActions($routes);

        return array(
            'url' => $this->app['request']->getBaseUrl().
                     $this->app['direct.route.pattern'],
            'type' => $this->app['direct.api.type'],
            'namespace' => $this->app['direct.api.namespace'],
            'id' => $this->app['direct.api.id'],
            'actions' => $actions
        );
    }